I found part of my answer here: [If g(f(x)) is one-to-one (injective) show f(x) is also one-to-one (given that...)](https://math.stackexchange.com/questions/28123/if-gfx-is-one-to-one-injective-show-fx-is-also-one-to-one-given-that); however I wanted to flesh out the last two statements I had in a proposition in my notes.

> 
> **Proposition:** 
>  Let $f: A \rightarrow B$ and $g: B \rightarrow C$. Then:
> 
> 
> (i) If $g \circ f$ is one-to-one, then $f$ is one-to-one.
> 
> 
> (ii) If $g \circ f$ is onto, then $g$ is onto.
> 
> 
> 

Proof:
(i) Suppose $f(x)=f(y)$ for some $x,y$.

Since $g \circ f$ is one-to-one: $$g\circ f(x) = g\circ f(y) \Rightarrow x=y,\forall x,y \in A.$$ 

Therefore $f$ must be one-to-one.

(ii) Since $g \circ f (x)$ is onto, then for every $c \in C$ there exists an $a \in A$ such that $c=g(f(a))$. Then there exists a $b \in B$ with $b=f(a)$ such that $g(b)=c$. Thus g is onto.

I wanted to confirm that these proofs are both correct for my peace of mind (as they weren't proven in class).
['https://math.stackexchange.com/questions/203891', 'https://math.stackexchange.com', 'https://math.stackexchange.com/users/8324/']
Both of your proofs are correct.
(i) If $f \circ g$ is one-to-one, then it is invertible. Its inverse is $g^{-1} \circ f^{-1}.$ Thus $f^{-1}$ exists. Therefore, $f$ is invertible, and thus is one-to-one. QED.