Surjectivity and composition in functions

elementary-set-theoryfunctions

Sorry for this pretty dumb question, but I couldn't find any answer to it.

Supposing we have a set $A$ and functions $f,g:A\to A$. Prove that if $f$ isn't surjective then $f \circ g$ isn't surjective.

Basically as I think, In order for a composite function to be surjective' both the functions that are getting composited (In this case functions $f$ and $g$) should be surjective.

Is that right or wrong? And how can I prove that?

EDIT: Question is solved, Check my answer.

Best Answer

The statement is equivalent to $f\circ g$ surjective implies $f$ surjective, which is rather clear since : Let $y\in A$, there is $x\in A$ s.t. $y=f(g(x))$. In particular, if $u=g(x)$, then $y=f(u)$. We proved that $$\forall y\in A, \exists u\in A: y=f(u),$$ and thus surjectivity of $f$.

Related Question