Basic Theorems on the Composition of Two Functions

# Basic Theorems on the Composition of Two Functions

Recall from The Composition of Two Functions page that if $f : A \to B$ and $g : B \to C$ are functions then the composition of $f$ and $g$ is the function $g \circ f : A \to C$ defined for all $x \in A$ by $(g \circ f)(x) = g(f(x))$.

On that page, we proved that:

• If $f$ and $g$ are injective then $g \circ f$ is injective.
• If $f$ and $g$ are surjective then $g \circ f$ is surjective.
• If $f$ and $g$ are bijective then $g \circ f$ is bijective.

We will now look at some slightly stronger theorems regarding the composition of two functions.

 Theorem 1: Let $f : A \to B$, $g : B \to C$, and let $g \circ f$ be injective. Then $f$ is injective.
• Proof: Let $g \circ f$ be injective. Suppose that $f(x) = f(y)$. Then by applying $g$ to both sides of the equation above we have that:
(1)
\begin{align} \quad g(f(x)) = g(f(y)) \end{align}
• Since $g \circ f$ is injective, we have that from the equation above that then $x = y$. Therefore $f$ is injective. $\blacksquare$
 Theorem 2: Let $f : A \to B$, $g : B \to C$, and let $g \circ f$ be surjective. Then $g$ is surjective.
• Proof: Let $g \circ f$ be surjective. Then for each $y \in C$ there exists $x \in A$ such that $g(f(x)) = y$. Let $b = f(x)$. Then for every $y \in C$ there exists a $f(x) = b \in B$ such that:
(2)
\begin{align} \quad g(f(x)) = g(b) = y \end{align}
• Therefore $g$ is surjective. $\blacksquare$
 Corollary 1: Let $f : A \to B$, $g : B \to C$, and let $g \circ f$ be bijective. Then $f$ is injective and $g$ is surjective.
• Proof: Let $g \circ f$ be bijective. Then $g \circ f$ is both injective and surjective. By Theorem 1 we have that then $f$ is injective, and by Theorem 2 we have that then $g$ is surjective. $\blacksquare$