Five Lemma

Theorem
Let $A$ be a commutative ring with unity.

Let:


 * $\begin{xy}\xymatrix@L+2mu@+1em{

M_1 \ar[r]^*{\alpha_1} \ar[d]^*{\phi_1} & M_2 \ar[r]^*{\alpha_2} \ar[d]^*{\phi_2} & M_3 \ar[r]^*{\alpha_3} \ar[d]^*{\phi_3} & M_4 \ar[r]^*{\alpha_4} \ar[d]^*{\phi_4} & M_5 \ar[d]^*{\phi_5} \\ N_1 \ar[r]_*{\beta_1} & N_2 \ar[r]_*{\beta_2} & N_3 \ar[r]_*{\beta_3} & N_4 \ar[r]_*{\beta_4} & N_5 }\end{xy}$

be a commutative diagram of $A$-modules.

Suppose that the rows are exact.

Then:
 * If $\phi_2$ and $\phi_4$ are surjective and $\phi_5$ is injective then $\phi_3$ is surjective.
 * If $\phi_2$ and $\phi_4$ are injective and $\phi_1$ is surjective then $\phi_3$ is injective.

Proof
First suppose that $\phi_2$ and $\phi_4$ are surjective and $\phi_5$ is injective.

Let $n_3 \in N_3$ be any element.

We want to find $x \in M_3$ such that $\phi_3\left({ x }\right) = n_3$.

Let $n_4 = \beta_3\left({ n_3 }\right) \in N_4$.

Since $\phi_4$ is surjective, there exists $m_4 \in M_4$ such that $\phi_4\left({ m_4 }\right) = n_4$.

Since the rows are exact, we have that:
 * $\beta_4\left({ n_4 }\right) = \beta_4 \circ \beta_3\left({ n_3 }\right) = 0$

That is, $\beta_4\circ \phi_4\left({ m_4 }\right) = 0$.

Since the diagram is commutative, this implies that $\phi_5\circ \alpha_4\left({ m_4 }\right) = 0$.

Since $\phi_5$ is injective, this means that $\alpha_4\left({ m_4 }\right) = 0$.

That is, $m_4 \in \ker \alpha_4$.

Since the rows are exact, this means that $m_4 \in \operatorname{im} \alpha_3$, say $m_4 = \alpha_3\left({ m_3 }\right)$.

Thus we have:
 * $\beta_3\left({ n_3 }\right) = n_4 = \phi_4\circ \alpha_3\left({ m_3 }\right) = \beta_3\circ\phi_3\left({ m_3 }\right)$

Using the fact that $\beta_3$ is a homomorphism this means that $n_3 - \phi_3\left({ m_3 }\right) \in \ker \beta_3$.

By exactness of the rows we therefore have $n_3 - \phi_3\left({ m_3 }\right) = \beta_2\left({ n_2 }\right)$ for some $n_2 \in N_2$.

By hypothesis $\phi_2$ is surjective, so there exists $m_2 \in M_2$ such that $n_3 - \phi_3\left({ m_3 }\right) = \beta_2\circ \phi_2\left({ m_2 }\right)$.

Since the diagram is commutative, we have therefore $n_3 - \phi_3\left({ m_3 }\right) = \phi_3 \circ\alpha_2\left({ m_2 }\right)$.

Finally by the homomorphism property this shows that:
 * $n_3 = \phi_3\left({ m_3 + \alpha_2\left({ m_2 }\right) }\right)$

as required.

Now suppose that $\phi_2$ and $\phi_4$ are injective and $\phi_1$ is surjective.

Let $m_3 \in M_3$ such that $\phi_3\left({ m_3 }\right) = 0$.

We want to show that $m_3 = 0$.

First of all $\phi_3\left({ m_3 }\right) = 0$ implies that $\beta_3\circ \phi_3\left({ m_3 }\right) = 0$.

Since the diagram is commutative, this implies that $\phi_4\circ\alpha_3\left({ m_3 }\right) = 0$.

Since $\phi_4$ is injective we have $\alpha_3\left({ m_3 }\right) = 0$.

Since the rows are exact, we therefore have $m_3 = \alpha_2\left({ m_2 }\right)$ for some $m_2 \in M_2$.

Let $n_2 = \phi_2\left({ m_2 }\right) \in N_2$.

By commutativity of the diagram, we have:
 * $\beta_2\left({ n_2 }\right) = \phi_3\circ\alpha_2\left({ m_2 }\right) = \phi_3\left({ m_3 }\right) = 0$

By exactness of the rows it follows that there exists $n_1 \in N_1$ such that $n_2 = \beta_1\left({ n_1 }\right)$.

Since $\phi_1$ is assumed surjective this means that $n_1 = \phi_1\left({ m_1 }\right)$ for some $m_1 \in M_1$.

Now:
 * $\phi_2\left({ m_2 }\right) = \beta_1\circ\phi_1\left({ m_1 }\right) = \phi_2\circ\alpha_1\left({ m_1 }\right)$

Thus by the homomorphism property, $m_2 - \alpha_1\left({ m_1 }\right) \in \ker \phi_2$.

Since $\phi_2$ is assumed injective this means that $m_2 = \alpha_1\left({ m_1 }\right)$.

Finally, since the rows are exact we have:
 * $m_3 = \alpha_2\left({ m_2 }\right) = \alpha_2\circ\alpha_1\left({ m_1 }\right) = 0$

as required.