# The Unapologetic Mathematician

## The Snake Lemma

And now for what has to be the most popular theorem in all of homological algebra: the snake lemma.

This shows up in every first course in algebraic topology, and always with the same diagram-chasing proof (though not with the same semantic sugar as we’re using). And some grad student always raises the same objection halfway through (I did it in my class). And the follow-up is always the same. Weibel’s An Introduction to Homological Algebra points out that the proof is best seen visually, but I don’t have a video camera like The Catsters. Weibel also points out that a good visual presentation appears in the 1980 movie It’s My Turn. I looked around everywhere but couldn’t find a clip online. So, if you have access to the movie it’s old enough that I’m sure the producers wouldn’t mind a teensy clip posted for The Good of Mathematics. Call it “fair use”.

[UPDATE]: Down in the comments, Graham points out that someone at Harvard has posted the clip here. Tough to see, though.

Now, down to business. We consider the following diagram:

We start with two short exact sequences and a morphism $(f,g,h)$ from one to the other. We construct the kernel and cokernel of each arrow, and then use their universal properties to construct arrows between the kernels and cokernels. It is straightforward to show that the given rows are exact — in particular, $m_0$ is monic and $e_1$ is epic.

However, the upper and lower rows are not necessarily short exact sequences. That is, $e_0$ may fail to be epic and $m_1$ may fail to be monic. Amazingly, though, these two fail to happen in exactly the same way at exactly the same time! It turns out that there is a morphism $\delta:\mathrm{Ker}(h)\rightarrow\mathrm{Cok}(f)$ so that the sequence
$\mathbf{0}\rightarrow\mathrm{Ker}(f)\rightarrow\mathrm{Ker}(g)\rightarrow\mathrm{Ker}(h)\rightarrow\mathrm{Cok}(f)\rightarrow\mathrm{Cok}(g)\rightarrow\mathrm{Cok}(h)\rightarrow\mathbf{0}$
is exact.

Now, if you really want to see the chase you can get someone to walk you through it, try to construct it yourself, or beg Netflix to stock more early 1980s romances between Jill Clayburgh and Michael Douglas. Here I’ll do a much more insightful proof that gets to the heart of what the connecting morphism really is. The proof depends on this diagram:

We start with the same middle rows as before and construct $\mathrm{Ker}(h)$ and $\mathrm{Cok}(f)$. Now we use one of our lemmas (and its dual) to construct the pullback $D$, the pushout $D'$, and the two dashed arrows. Notice that here we’re using the (unshown) facts that $m$ is monic and $e'$ is epic. We have an arrow $\delta_0=p'\circ g\circ k'$, which satisfies $s'\circ\delta_0=h\circ k\circ u$ and $\delta_0\circ s=u'\circ p\circ f$. And then since $u'$ is the kernel of $s'$ and $u$ is the cokernel of $s$, we see that $\delta_0$ factors as $u'\circ\delta\circ u$ for some unique $\delta:\mathrm{Ker}(h)\rightarrow\mathrm{Cok}(f)$.

What does this arrow do to a member $x\in\mathrm{Ker}(h)$? Well first it gets sent to $k\circ x$. Then because $e$ is epic there must be a $y\in_mB$ with $e\circ y\equiv k\circ x$. We calculate that $e'\circ g\circ y=h\circ e\circ y\equiv h\circ k\circ x\equiv0$. But then by exactness there must be $z\in_mA'$ with $m'\circ z\equiv g\circ y$. This is the usual diagram chase given to construct the connecting morphism. Now I claim that $\delta\circ x\equiv p\circ z$.

This happens because $D$ is a pullback, so there is a member $x_0\in_mD$ with $u\circ x_0\equiv x$ and $k'\circ x_0\equiv y$. Then
$u'\circ\delta\circ x\equiv u'\circ\delta\circ u\circ x_0\equiv\delta_0\circ x_0\equiv p'\circ g\circ y\equiv u'\circ p\circ z$
Since $u'$ is monic we have $\delta\circ x\equiv p\circ z$, as desired. This also shows that the equivalence class of $p\circ z$ is independent of the choices made in the construction of the last paragraph, which is the standard objection I mentioned earlier, now handled in a very slick (but not diagram-chasing) way.

So now we need to verify the exactness of the long sequence. We’ll show the exactness at $\mathrm{Ker}(h)$, and that at $\mathrm{Cok}(f)$ will follow by duality.

First of all we need to see that $\delta\circ e_0=0$. For this, we show that $\delta\circ e_0\circ w=0$ for any $w\in_m\mathrm{Ker}(g)$. Now when we use the diagram chase our first step is to choose a $y\in_mB$ with $e\circ y\equiv k\circ e_0\circ w=e\circ j\circ w$, where $j:\mathrm{Ker}(g)\rightarrow B$ is the kernel map. This shows we can choose $y=j\circ w$. But then $g\circ y=g\circ j\circ w\equiv0$, and so we choose $z=0$ and find $\delta\circ e_0\circ w=p\circ z=0$.

Now take $x\in_m\mathrm{Ker}(h)$ with $\delta\circ x\equiv0$, meaning that we construct $p\circ z\equiv0$. By the definition of the cokernel there will be $w\in_mA$ with $f\circ w\equiv z$, so $g\circ m\circ w=m'\circ z\equiv g\circ y$. The “subtraction” rule gives us a $y_0\in_mB$ with $e\circ y_0\equiv e\circ y=k\circ x$ and $g\circ y_0$. But now by the definition of $\mathrm{Ker}(g)$ we have $x_0\in_m\mathrm{Ker}(g)$ with $j\circ x_0\equiv y_0$. Then $k\circ e_0\circ x_0=e\circ y_0\equiv k\circ x$, and so $x\equiv e_0\circ x_0$ because $k$ is monic. And thus the sequence is exact at $\mathrm{Ker}(h)$.

Incidentally, what the setup of the snake lemma tells us is that the category $\mathbf{Ses}(\mathcal{C})$, while always enriched over $\mathbf{Ab}$, is not generally abelian itself. If it were an abelian category the upper and lower rows of the first diagram would have to be short exact sequences themselves. That doesn’t quite happen, but we can exactly capture the obstruction to existence of kernels and cokernels in a single connecting morphism. If this morphism $\delta$ is the zero morphism, then we can insert $\mathbf{0}$ into the long exact sequence and then break it into the two short exact sequences, and thus we have a kernel and a cokernel for the triple $(f,g,h)$.

Notice here that $\delta\in\hom_\mathcal{C}(\mathrm{Ker}(h),\mathrm{Cok}(f)$, so the obstruction lives in this abelian group, which is determined by $f$ and $h$. Thus in a sense a morphism of short exact sequences has or fails to have a kernel and a cokernel on $g$ alone. I’ll leave this to you to ponder: if we’ve given $f$ and $h$, must there exist a $g$ so that $(f,g,h)$ has a kernel and a cokernel — so that $\delta=0$? And if so, how can we find it?

October 2, 2007 - Posted by | Category theory

1. I might be missing something here, but your $\delta_0$ isn’t an arrow…you can’t do that composition with the diagram as written.

Comment by Charles | October 2, 2007 | Reply

2. Oops, I mistyped… editing…

There. $\delta_0$ should be the vertical arrow straight down the middle of the second diagram.

Comment by John Armstrong | October 2, 2007 | Reply

3. Mathematics in Movies, sixth clip.

Comment by Graham | October 2, 2007 | Reply

4. You lost me in the middle. Why is u the cokernel of s?

Comment by Homologically Confused | October 3, 2007 | Reply

5. HC: I’m composing this on the fly while I wait for my plane, so I’m hoping I don’t make a mistake here. If I recall correctly, that’s something that follows from the lemma about pullbacks we proved earlier. It should be in one of the posts linked at the top of this post.

If I’m wrong, point out where you lose it and I’ll give it another look when I’m back at a real computer instead of my iPhone.

Comment by John Armstrong | October 3, 2007 | Reply

6. HC: I think that follows from the axioms of abelian categories: every epic is cokernel of its kernel. Since e is epic, so is u with kernel s by the lemma. Then u is cokernel of its kernel s.

Comment by Dohyeong Kim | September 25, 2008 | Reply