# How to show that the composition of two surjective functions is injective?

I know how to show the composition of two surjective functions is surjective or two injective functions is injective, but I don't understand this case problem.

• Have you looked at examples? I mean, suppose one of the functions is the identity.
– lulu
Sep 4 '17 at 13:12

That's not true in general.We can take a counterexample to show one case when it is not true:

Let $f:A\to B$ and $g:B\to C$ be two surjective functions and let $h:A\to C$ be their composition such that: $A=\{a,b\}$,$B=\{c,d\}$ and $C=\{e\}$ then

$f(a)=c$; $f(b)=d$ and

$g(c)=e$; $g(d)=e$

It is obvious that $h(a)=e$ and $h(b)=e$ so $h$ is not injective.

So we found an example where the composition of two surjective functions is not injective, therefore your statement is not always true.

You can't, because it's not true. Here is a counter-example.

Simplifying Linda's answer, take sets $A=\{a,b\}$ and $B=\{q\}$
and constant function $f: A\to B$ and identity function $g:B\to B$.

Then $$g\circ f$$ is a surjection but not an injection.