Let $f : X \rightarrow Y$ and $g : Y \rightarrow Z$ be functions. We can define the composition of $f$ and $g$ to be the function $g \circ f : X \rightarrow Z$ for which the image of each $x \in X$ is $g( f (x))$. That is, plug $x$ into $f$, then plug the result into $g$ (just like composition in algebra and calculus).
(a) If $f$ and $g$ are both injective, must $g \circ f$ be injective? Explain.
(b) If $f$ and $g$ are both surjective, must $g \circ f$ be surjective? Explain.
(c) Suppose $g \circ f$ is injective. What, if anything, can you say about $f$ and $g$? Explain.
(d) Suppose $g \circ f$ is surjective. What, if anything, can you say about $f$ and $g$? Explain.