If a function $f$ is injective then is $g\circ f$ also injective even if nothing is said about $g$

functions

I have been struggling with the following two questions:
For any nonempty sets $A,B,C$ and for any functions $f: A\to B$ and $g: B\to C$,
a) if (f) is injective, then $(g \circ f) $ is injective
b) if (g) is surjective, then $(g\circ f)$ is surjective

My main confusion comes from how for example part a, it doesn't say anything about whether or not g is injective. we know if $f(x)$ is injective, then $f(x_1)=f(x_2)$ implies $x_1=x_2$. But for g if $g(x) = \sqrt{x}$, and f(x)= 9, g(fx) = 3 or -3. So in this case can i still call $g \circ f$ an injective function?

Best Answer

If $f$ is injective, $g\circ f$ doesn't have to be injective too. Suppose that $A$ has more than one point and that $g$ is constant.

Related Question