Let $X,y,Z$ be sets and $f:X\to Y$, $g:Y\to Z$ functions. Prove: $g\circ f$ surjective $\implies$ $g$ is surjective
Let $g\circ f$ be surjective and $z\in Z$. Choose $x\in X$ such that $g(f(x))=z$. Hence $g(y)=z$ with $y=f(x)$ and thus $g$ is surjective.
I don't understand why $g(y)=z$ with $y=f(x)$ implies that $g$ is surjective???
Thanks in advance..