Sujective, injective and bijective proof. Let $A$ and $B$ be sets and let $f:A\rightarrow B$ and $g: B\rightarrow A$ be functions. 


*

*Suppose that $f$ is injective, and $g$ is a left inverse of $f$. Prove that $g$ is surjective.


So I have this:
Let $a \in A$, then $g∘f(a)=g(f(a))=g(b)=a$. Therefore this means that for any $a \in A$ there is a $b$ such that $g(b)=a$. Hence, $g$ is surjective. 


*Suppose that $f$ is surjective, and that $g$ is a right inverse of $f$. Prove that g is injective.


For all $y \in B$, there is an $x \in A$ such that $f(x)=y$. Then $(f∘g)(y)=I_A(y)=y$. Let be $x=g(y)\in A$. Then $x=g(y) \in A$, $f(x)=y$
Did I prove that g is injective?


*Suppose that $f$ is bijective, and that $g$ is an inverse of $f$. Prove that g is bijective. 


How do I prove the last one?
 A: $2$. I did not understand your proof. Let's prove it. To prove that $g$ is injective, we must show 
$$g(x)=g(y)\Rightarrow x=y$$
for all $x,y\in B$. If there are $x,y\in B$ such that $g(x)=g(y)$, then 
$$x=(f\circ g)(x)=f(g(x))=f(g(y))=(f\circ g)(y)=y.$$
$3$. Since $g$ is an inverse of $f$, then $g$ is a left and right inverse of $f$. For $1$ and $2$, we have that $g$ is surjective and injective, that is, $g$ is a bijection.
A: Let $A$ and. $B $ be sets and $f : A \rightarrow  B$ and $g : B \rightarrow A$ be functions.
1)Suppose $f$ is injective, and $g$ is a left inverse of $f$. Prove that $g$ is surjective.
NB. Possibly $f(A) \subset B$. So, a little more precise, $g$ is left inverse of $f$ on $f(A)$.
Let $a \in A $, and $b =  f(a)$,  then $g(b) = g(f(a)) = a$ , since $g$ is left inverse of $f$  on  $f(A)$,  hence $g$ is surjective.
2) Suppose $f$ is surjective and $g$ is right inverse of $f$. Prove that $g$ is injective.
$f(A) = B$, since $f$ is surjective.
Let $x,y \in B$, $x \ne y$ , and consider $g(x), g(y)$.
Since $g$ is right inverse of $f$:
$x = f(g(x)) \ne  y = f(g(y))$, hence the arguments of the function $f$ are not equal,  i.e. $g(x) \ne g(y)$, $g$ is injective.
3) Answer by Rafael Hollande.
