“*Proving the snake lemma is something that should not be done in public…*” ~ Paolo Aluffi.

The Snake Lemma is a theorem about exact sequences of modules, and is an important tool in homological algebra. Almost every textbook that includes the Snake Lemma leaves it as an “easy” exercise. Atiyah–MacDonald is kind enough to construct the “snake” itself (Prop 2.10), but leaves all the other details to the reader. Mac Lane in his *Categories* does prove it, but for a general abelian category and not in the more pedestrian context of modules over a ring. It seems an actual proof of this fact written down is quite hard to come by because, well, Aluffi is right: it ain’t pretty.

I get the feeling that the proof is straightforward to those who already have lot of experience with diagram chasing; it took me a long time to solve this problem, and I struggled to think clearly about cokernels in particular. Recently however I watched part of a YouTube video on the lemma and saw how the host demonstrated exactness at one of the “easy” nodes. After this, I found the zen of the diagram chase and was able to complete rest of the proof quite rapidly.

Here I will briefly recall the relevant definitions, and then give a complete proof in full gory detail, against the better judgment of Aluffi: even if it is not pretty, the information should be available *somewhere*. If you’ve not proved the snake lemma before, you should give it a good go yourself as an instructive introduction to diagram chasing, and then read my solution if you get stuck. You can always have a go at the five-lemma yourself afterwards. Because page space is not as big an issue on a website as in a print book, I have tried to include every sub-diagram I refer to, even if it seems a little excessive.

So, let be a commutative ring. Recall that a sequence of homomorphisms of -modules is called *exact* at if . Recall also that the cokernel of a homomorphism is .

**Theorem: **The Snake Lemma.

*Let*

be a commutative diagram of -modules and homomorphisms with exact rows. Then this induces a long exact sequence

This obtains for us a rather pretty diagram

The proof has several steps. We deal first with the “easy” steps. At all times, one should refer to the following enormous diagram, which is exact in every row and every column.

#### The existence of the tilded arrows

The first step is to show that the “easy” arrows exist at all. Firstly, we deal with and . These arrows are simply the restriction of and to the kernels of and . The question is whether they are well-defined. In other words, given , is and similarly for . This is not too difficult to see. Take, for example, . Choose . Since the square

commutes, we have since is chosen to be in the kernel, and

so is in the kernel of . Therefore this restriction of the domain and codomain of makes sense. The argument holds identically for as a restriction of .

Next, we’ll work on . This arrow is defined by sending

To show that this is well defined, we need to show that sends elements of to (it should become clear why this is sufficient shortly). Choose an element in , say . Lift it back to . Then , which by commutativity of the square

means that . In other words, . This means that given any element of , say , we can lift back up to an element in , say , and then maps to in , because as we have justed checked, maps into . Hence this is well defined. The case for is again exactly analogous.

#### Exactness at the tilded arrows

We start with the easier cases. Firstly, we wish to show that the sequence is exact at . But this is just to say that is injective, and since it is just the restriction of an injective map, this is immediate. Now for exactness at , let be in . Take a representative . Since is surjective, we can choose . Now if we mod out by , we have , whose image under is .

Now we wish to show exactness at . It is easy to show that . Indeed, consider . Since the tilde maps are just restrictions, we know that , and so . Now suppose that . We need to show that it arises as the image of some under . So embed into . Since it must be the case that . We hence know that there exists such that , because the sequence is exact at . We just need to show that . But again we just appeal to the fact that the diagram

commutes. We have

Thus the sequence is exact at .

Now we want exactness at . Let . Then

But , so . Finally, let . We can lift to something in , say . Now by definition of , we have that , so we can then lift to some such that . This lifts again to some such that . Now is a representative of , and we calculate

Since the diagram

commutes we have . But due to our choice of , we have , so . Thus by exactness at it follows that lifts uniquely back to such that . Therefore, , so this coset is in the image of . After all this, we have shown exactness at all the easy arrows.

#### Construction of

Let , and lift to such that . By the commutativity of the diagram

we have , so . Thus there is a unique such that , and we define

We need to check a couple of things. We had to make a choice, choosing . We must show the image of under independent of the choice. Let and be such that . Then by commutativity, we have . We now use exactness at to lift back to and such that and . Since these are homomorphisms, we have . Now , so . That means there is a unique such that . But by commutativity of

we have

But is injective, so it follows that . Hence , and is well defined as a set-theoretic function.

The next question is whether is a homomorphism. This is the only bit I won’t explain in detail because it’s too ugly even for this post, but we essentially check this by recognizing that we constructed by pushing things through and lifting things back up through existing homomorphisms.

#### Exactness at and

We’re almost there! Let’s do exactness at . Firstly, let where . Following our prescription for , we choose the unique such that . But , therefore , so . Now suppose that . It means that we lift to some , obtain , and remark by the usual commutativity of

argument that this pulls back to . The statement means that for some . Consider then . Clearly

If we can show is also in the kernel of we’re done. And indeed:

So and . So the sequence is exact at .

Now for exactness at . Let . We can apply to any representative, say the used to construct the image of in the first place, and was chosen to be such that for some , and so

Thus . Finally, let . It means that . Now

so by commutativity of

we have , and by simply following through the construction of on , we have . The proof is now complete.

Links:

https://www.youtube.com/watch?v=rxEnGgg8YhY — this is the video that helped me get started with the proof.