Need examples about injection (1-1) and surjection (onto) of composite functions The task is that I have to come up with examples for the following 2 statements:

1/ If the composite $g o f$ is injective (one-to-one), then $f$ is one-to-one, but $g$ doesn't have to be.
2/ If the composite $g o f$ is surjective (onto), the $g$ is onto, but $f$ doesn't have to be.

I have some difficulties when I try to think of examples, especially the "one-to-one" statement.
** For #1, I try to go about letting the function $f$ being something in the nature of $f(x) = kx$, which is clearly 1-1, and $g$ being something in the nature of $g(x) = x^2$, which is not 1-1.  But then when I try to make g o f out of these two by all of $+, -, x$, and division, it turns out I can't find a 1-1 function $g o f$.
** For #2, I firstly think about letting $f$ being $e^x$, which only covers the positive values of $y$, and then g being something like $k - e^x$.  I thought g o f would cover the whole real line, but when I tries that on matlab, it only covers the negative values of $y$.  So I'm totally wrong >_<

Little note: I finished the proofs on showing f must be 1-1 (for #1), and g must be onto (for #2).  I just need examples on the "doesn't to be" parts.

Would someone please give me some suggestions ?  I appreciate any help.
Thank you ^_^

Consider maps $\{0\}\xrightarrow{f}\{0,1\}\xrightarrow{g}\{0\}$, or $\{0\}\xrightarrow{f}A\xrightarrow{g}\{0\}$ where $A$ is any set with more than one element.
