Let $f:X\rightarrow Y$ and $g:Y\rightarrow X$ satisfice $g\circ f=1_x$. Prove $f$ is injective and $g$ is surjective.
We need define $f(x)=x$ and $g(y)=y$ then $(g \circ f)(x)=g(f(x))=g(x)=x$
Prove $f$ is injective:
Let $x_1,x_2\in X$ such that $f(x_1)=f(x_2)$ then by definition $x_1=x_2$.
$f$ is injective.
Prove $g$ is surjective:
Here 'im a little stuck. Can someone help me?