# Composition function

If $f:S \to T$ and $g:T\to U$ are functions how can I prove that if $(g o f )$ is one-to-one, so is $f$, and find an example where $(g o f )$ is one-to-one but $g$ is not one-to-one.

-

I'll try to give you some general hints instead of the solution, since I think that will be more helpful for your future life with mathematics:

Try prove by contradiction: Suppose $f$ was not one-to-one. What does this mean? Then, how is $g\circ f$ defined?

To construct an example where $g\circ f$ is one-to-one, but $g$ is not, write down some functions that you know of, that are not one-to-one. Sometimes it helps to restrict the domain or similar things to chose a suitable $f$ for such $g$.

-

HINT for the example:

$\qquad\qquad$

-