Injectivity and Surjectivity of Composition Function The question asks:
Let $g : A \to B$ and $f : B \to C$ be two functions.
Show that if $f \circ g$ is a bijection, then $f$ is a surjection and $g$ is an injection
I know how to prove if it's given that either $f$ or $g$ is either injective or surjective, but I am not quite sure how to approach this question since it's asking for both.
Also, how do I show that $f \circ g$ is a bijection?
 A: Use the fact that $f\circ g$ is a surjection to prove that $f$ is a surjection, too. As a great big hint: $(f\circ g)(x)=f\bigl(g(x)\bigr).$
Use the fact that $f\circ g$ is an injection to prove that $g$ is an injection, too. As a great big hint: $(f\circ g)(x)=f\bigl(g(x)\bigr)$ and $(f\circ g)(y)=f\bigl(g(y)\bigr).$
A: First, we note that $f \circ g$ will be a map $A \to C$. If we assume that $f \circ g$ is bijective, we automatically have the following two observations:


*

*Surjectivity: for each $c \in C$, there exists $a \in A$ such that $(f \circ g)(a) = c$.

*Injectivity: if $(f \circ g)(a) = (f \circ g)(a^\prime)$, then we must have $a = a^\prime$.


All that is needed from here are the two properties above. I'll write out the injectivity part and leave the surjective part to you.
To check that $g$ is injective, we proceed directly using the definition. Let's assume that $g(a) = g(a^\prime)$ for two $a,a^\prime \in A$. Applying $f$ to both sides of this equation, we find that
$$
(f \circ g)(a) = f(g(a)) = f(g(a^\prime)) = (f \circ g)(a^\prime)
$$
whence we must have $a = a^\prime$ (why? which property is used here?). Using 1. in a similar way, we can show that $f$ must be surjective as well.
Also, the hypothesis is that $f \circ g$ is bijective. Consequently, you do not need to prove that $f \circ g$ is bijective as this property is given!
A: Hint:
Prove these more general assertions:

  
*
  
*If $f\circ g$ is injective, then $g$ is injective (by contrapositive).
  
*If $f\circ g$ is surjective, then $f$ is surjective (observe that $(f\circ g)(A)\subset g(B)$).
  

