# Proving that if $g(x)$ is injective, and $g(f(x))$ is injective, then $f(x)$ is injective

Conjecture: If $g(x)$ is injective, and $g(f(x))$ is injective, then $f(x)$ is injective

How can I prove that conjecture formally?

Thanks!

-
I think you should specify domains and codomains of f and g. –  Moritzplatz Dec 15 '12 at 15:03

Let $f(a)=f(b)$. Hence $g(f(a))=g(f(b))$. Since $gf$ is injective. Therefore $a=b$
Note that this works even if $g$ is not assumed to be injective. –  Santiago Canez Dec 15 '12 at 15:07
If $f(x)=x^2$, then $g\circ f$ will not be injective (on $\mathbb{R}$). –  Benji Dec 15 '12 at 15:20