Let $f:A\to B$ be a bijection for any set A and B. Show there exists $g:B\to A$ which is also a bijection. Show $g=f^-1$.
This is what I have done: Proof: Suppose $g(y_1)=g(y_2)$ for some $y_1$ and $y_2$ in B. Since f is surjective, $ \exists$ $x_1$ and $x_2$ such that $y_1=f(x_1)$ and $y_2=f(x_2)$. By assumption, $g(f(x_1))=g(f(x_2))$. Hence, $x_1=x_2$. Then $f(x_1)=f(x_2)$, therefore $y_1=y_2$. Hence, g is injective.
To show g is surjective: For any x in A, $ \exists$ y in B such that $y_1=f(x_1)$. Then for that y, $g(y_1)=g(f(x_1))=x_1$.
Therefore, g is bijective.
Now, I do not even know where to start to show taht $g=f^{-1}$. Any help is appreciated. Thank you.