Question:
Let $ \ f: A \to B$ and $ \ g : B \to C$ and $ g\circ f: A \to C. $
Provide a counter example to disprove that $ g\circ f$ surjective $ \implies $ $f$ surjective.
My attempt:
$ f : \mathbb{R} \to \mathbb{R}$ via $ \ f(x) = x^2$, not surjective
$ g : \mathbb{R} \to \ [0, \infty]$ via $ \ f(x) = x^2$
Then,
$ g\circ f: \mathbb{R} \to [0,\infty]$ via $ g(f(x)) = g(x^2) = x^4$, which is surjective
Is this counter example correct?
Yes, but it's more complicated than necessary. Don't bother with formulas. Can you build an example when $A$ and $C$ have one element each and $B$ has many? That's the essence of your argument.