# Prove that given $f,g:A \to A$ , if $g$ is not onto and $f$ is one to one $\Rightarrow \ \ f \circ g$ is not onto

I need to prove that given $f,g:A \to A$ ($A$ is some set), if $g$ is not onto and $f$ is one to one $\Rightarrow \ \ f \circ g$ is not onto.

First of all I don't understand why do I need to know that $f$ is one-to-one, I tried finding a counter example for the case that $f$ is not one to one but couldn't.

And I'm having a hard time realizing intuitively why is that true let alone formalize a mathematical proof, so I'd really appreciate some help :)

• Is A a strictly finite set? Else there'd be a problem with $n \mapsto 2n \mapsto n$ in $\mathbb{N}$. – blsmfrth Aug 30 '13 at 14:30
• @blsmfrth not necessarily – Red Aug 30 '13 at 14:32
• @blsmfrth, your $f$ is not one-to-one, however it is defined for odd numbers. – lhf Aug 30 '13 at 14:32
• You are right, how unobservant of me. – blsmfrth Aug 30 '13 at 14:34

If $f \circ g$ is onto, but $g$ is not, consider $f(a)$ for $a$ not in the image of $g$. All values in $A$ are taken by the values of $f$ on the image of $g$ and nothing is left for $a$ if $f$ is one-to-one.