Injection if Composite is Injection

Theorem
Let $$f$$ and $$g$$ be mappings such that their composite $$g \circ f$$ is an injection. Then $$f$$ is an injection.

Proof
Let $$g \circ f$$ be injective.

We need to show that $$f \left({a}\right) = f \left({b}\right) \Longrightarrow a = b$$.

So suppose $$f \left({a}\right) = f \left({b}\right)$$. Then:

... thus $$a = b$$ as $$g \circ f$$ is an injection.