# Proof of More Flexible Mayer-Vietoris for Calculating Homology Groups

On pg. 150 of Hatcher's Algebraic Topology, the author writes:

Let $X$ be a topological space and $A$ and $B$ be subspaces of $X$ such that $X=A\cup B$. Suppose there are open subspaces $U$ and $V$ of $X$ such that $U$ and $V$ deformation retract to $A$ and $B$ respectively, and $U\cap V$ deformation retracts to $A\cap B$. Then we have a Mayer-Vietoris sequence for $A$ and $B$, that is, we have an exact sequence:

$\cdots\rightarrow H_n(A\cap B) \xrightarrow{\Phi} H_n(A)\oplus H_n(B)\xrightarrow{\Psi} H_n(X) \xrightarrow{\partial} H_{n-1}(A\cap B) \rightarrow \cdots$

The main point in the argument given in Hatcher is the following:

The five-lemma implies that the inclusions $C_n(A+B)\to C_n(U+V)$ induce isomorphisms in homology groups.

Here $C_n(A+B)$ is the subgroups of $C_n(X)$ generated by $C_n(A)$ and $C_n(B)$, and simililarly for $C_n(U+V)$.

I am not able to see how the five-lemma is being applied here. Can somebody please help.

There is a commutative diagram $$\require{AMScd} \begin{CD} 0 @>>>C_*(A\cap B)@>{}>> C_*(A)\oplus C_*(B) @>>> C_*(A+B) @>>>0\\ & @VVV @VVV @VVV \\ 0 @>>>C_*(U\cap V)@>{}>> C_*(U)\oplus C_*(V) @>>> C_*(U+V) @>>>0\\ \end{CD}$$ where the rows are short exact sequences of chain complexes. This gives a commutative diagram of long exact sequences: $$\begin{CD} H_n(A\cap B) @>{}>> H_n(A)\oplus H_n(B) @>>> H_n(A+B) @>>>H_{n-1}(A\cap B) @>{}>> H_{n-1}(A)\oplus H_{n-1}(B)\\ @VVV @VVV @VVV @VVV @VVV\\ H_n(U\cap V) @>{}>> H_n(U)\oplus H_n(V) @>>> H_n(U+V) @>>>H_{n-1}(U\cap V) @>{}>> H_{n-1}(U)\oplus H_{n-1}(V) \end{CD}$$ By hypothesis, all the vertical maps except the middle one are isomorphisms, so by the five lemma the middle map is also an isomorphism. Since $H_n(U+V)\cong H_n(X)$, this gives the Mayer-Vietoris sequence for $A$ and $B$.