# 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

## 1 Answer

Let $f(a)=f(b)$. Hence $g(f(a))=g(f(b))$. Since $gf$ is injective. Therefore $a=b$

-
Very nice Amr. Thanks! – pie Dec 15 '12 at 15:02
Yes I didnt see that – Amr Dec 15 '12 at 15:04
Note that this works even if $g$ is not assumed to be injective. – Santiago Canez Dec 15 '12 at 15:07
@pie you can accept this answer. – leo Dec 15 '12 at 15:14
If $f(x)=x^2$, then $g\circ f$ will not be injective (on $\mathbb{R}$). – Benji Dec 15 '12 at 15:20