I'm trying to (for self-study) determine whether if $g \circ f$ is injective, $g$ must be injective. Intuitively, I don't believe $g$ must be because it's very possible that there are problem points ($a \neq b$) which are not elements of the image of $f$ which $g$ maps to the same point. In fact, one such point would suffice.
I thought about the squaring function, which is injective when restricted to $x \geq 0$ but not injective over all of $\mathbb{R}$ because, for example, $f(2) = 4 = f(-2)$. My idea was then to try to define $f$ in such a way that it only outputs non-negative values, so that $g$ restricted to the image of $f$ is injective, even if it isn't injective as a function of $\mathbb{R}$. I then tried to define $g(x) = f(x) = x^2$, both functions from $\mathbb{R} \to \mathbb{R}$. The problem then is, for any $x$, $$ (g \circ f)(x) = g(f(x)) = g(x^2) = (x^2)^2 = x^4, $$ so $g \circ f$ is equal to the function $x \mapsto x^4$, which is not injective as a function from $\mathbb{R} \to \mathbb{R}$ (in fact, it's similarly even), so my logic must have been wrong.
Can someone fill me in on where I went wrong?
Try this idea with odd powers
– Leonidas Lanier Feb 20 '23 at 23:05