# Prove Injectivity and Surjectivity of functions like $g \circ f$

I am trying to prove the following by the given:

1. $g \circ f$ Surjective
2. $f:A\rightarrow B$
3. $g:B\rightarrow C$

1) Assuming that $g$ is Injective I want to prove the $f$ is Surjective.
2) there is option to say that $f$ is surjective without the assumption that $g$ is Injective?
Any suggestions? Thanks!

-
Assume $f$ is not surjective, they what does this imply about gf? – Owen Sizemore Aug 2 '13 at 15:19
Composition is better written as $g\circ f$, in latex g \circ f, and also as $gf$, less common $g(f(-))\ \ \ \ \ \ \ \ \$ – Stefan Hamcke Aug 2 '13 at 15:28
There is another related point. That is, we can have $f$ one-to-one and $g$ onto but $g\circ f$ is neither onto, nor one-to-one. If you want it I can give you the counter example. – Babak S. Aug 2 '13 at 15:32

You could prove that $g$ is surjective by the fact that $g\circ f$ is surjective. Then, if $g$ is assumed to be injective, it is bijective and thus has an inverse $g^{-1}:C\to B$. Now $f$ can be written as $g^{-1}\circ(g\circ f)$. Can you deduce that $f$ is surjective?
2) Try to find $f$ and $g$ such that $f$ and $g\circ f$ are surjective, but $g$ is not injective. Hint: If $C=\{c\}$, then $g\circ f$ is always surjective, but $g$ is only injective if $B$ has only one element.
what I did now is to draw 3 diagram $A,B,C$ and let say I have some $x\in A$ and $f:A\rightarrow B$ so its point to $y=f(x) \in B$ now I have $g:B\rightarrow C$ so $g(y) \in C$ so I know that $g\circ f$ Surjective than $g \circ f(x) = g(y)$ implies that $g(fx)=g(y)$ so if $g$ is Injective $\rightarrow f(x)=y$ and $f$ Surjective. its correct? – Ofir Attia Aug 2 '13 at 15:39
so from the last line how I can say that $f$ is surjective? because $f(x) = y$? why? – Ofir Attia Aug 2 '13 at 15:48
@OfirAttia: You have to start with an arbitrary $y\in B$. Then $g(y)\in C$. Since $gf$ is surjective, there is an $x\in X$ such that $g(f(x))=g(y)$. And then by injectivity of $g$, it follows that $f(x)=y$. – Stefan Hamcke Aug 2 '13 at 19:17
You can prove from 1 that $g$ is surjective. With the assumption that it is injective, you can compose by $g^{-1}$ (which is a bijection too) to the left to see that $f = g^{-1} \circ g \circ f$ is surjective, as required. However, if $g$ is not assumed injective you cannot say anything about $f$.