let f: From A to B. let g: From B to A.
How do I prove f(g(x)) = x (indentity function) implies f is onto (surjective).
More explicitly (like HallsOfIvy said)
Problem: Suppose that $\displaystyle f:X\mapsto Y$ and $\displaystyle g:Y\mapsto X$ are functions such that $\displaystyle f\circ g=\iota_Y$ (identity mapping on Y). Prove that $\displaystyle f:X\mapsto Y$ is surjective.
Proof: Let $\displaystyle y\in Y$. Since $\displaystyle g:Y\mapsto X$ we know that $\displaystyle g(y)\in X$. Therefore $\displaystyle f(g(y))=y$ since $\displaystyle f\circ g=\iota_Y$. And since $\displaystyle y$ was arbitrary this proves surjectivity.