Category Theory & Homological Algebra

The Snake Lemma: Connecting Homology Across Exact Rows

Give the Snake Lemma two exact rows joined by three vertical maps, and it hands you a single exact sequence of six terms — three kernels, then three cokernels — stitched together by a "connecting homomorphism" δ that literally snakes from the top-right kernel down to the bottom-left cokernel. This one map is the engine behind every long exact sequence in homology and cohomology.

Precisely: in an abelian category, given a commutative diagram with exact rows 0 → A → B → C → 0 and 0 → A′ → B′ → C′ → 0 and vertical maps f: A→A′, g: B→B′, h: C→C′, there is an exact sequence ker f → ker g → ker h →δ coker f → coker g → coker h, and it extends to 0 → ker f on the left (if A → B is mono) and coker h → 0 on the right (if B′ → C′ is epi).

  • FieldHomological algebra / category theory
  • SettingAny abelian category (or R-modules)
  • Statement6-term exact sequence ker f → ker g → ker h →δ coker f → coker g → coker h
  • Key deviceConnecting homomorphism δ (well-defined by a diagram chase)
  • Proof techniqueDiagram chase / Salamander lemma / Freyd–Mitchell embedding
  • UnlocksLong exact sequences in (co)homology, derived functors, Tor and Ext

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

The precise statement

Work in an abelian category 𝒜 (concretely, take left R-modules; nothing is lost by Freyd–Mitchell). Suppose we have a commutative diagram

0 → A →ᵃ B →ᵇ C → 0
0 → A′ →ᵃ′ B′ →ᵇ′ C′ → 0

with exact rows and vertical maps f: A→A′, g: B→B′, h: C→C′ making both squares commute (a′f = ga, b′g = hb). Then f, g, h restrict to maps on kernels and descend to maps on cokernels, and there is a canonical morphism δ: ker h → coker f, the connecting homomorphism, such that

0 → ker f → ker g → ker h →δ coker f → coker g → coker h → 0

is exact. Strictly, the leftmost 0 requires a monic and the rightmost 0 requires an epic; the inner six-term sequence is exact whenever the rows are exact at B, C, A′, B′. Everything is natural: a morphism of such diagrams induces a commuting morphism of six-term sequences.

The picture: why it looks like a snake

Draw the two rows stacked. Above them sit the three kernels ker f, ker g, ker h; below them the three cokernels coker f, coker g, coker h. The induced maps run left-to-right across the kernels on the top and left-to-right across the cokernels on the bottom. The connecting map δ starts at the top-right (ker h), drops down through the middle of the diagram, and lands at the bottom-left (coker f). Trace the whole path — right along the top, down and across through the interior, then right along the bottom — and it draws an S: the snake.

Morally, δ measures the obstruction to lifting an element of ker h back to ker g. You can always lift c ∈ ker h to some b ∈ B, but g(b) need not be zero — it lands in A′ (because b maps to 0 in C′), and its class in coker f is exactly what refuses to vanish. δ records that leftover.

Key idea of the proof: constructing δ by a chase

The heart is defining δ: ker h → coker f and checking it is well-defined. Take x ∈ ker h ⊆ C. Since b: B → C is surjective, pick b ∈ B with b(b)=x. Now b′(g(b)) = h(b(b)) = h(x) = 0, so g(b) ∈ ker b′ = im a′; by injectivity of a′ there is a unique y ∈ A′ with a′(y) = g(b). Define δ(x) = ȳ, the class of y in coker f = A′/im f.

Well-defined: a different lift b changes b by an element of ker b = im a, i.e. by a(z) for z ∈ A; this shifts y by f(z), which vanishes in coker f. So δ is independent of choices, and it is a homomorphism. Exactness at each of the six spots is then a bounded diagram chase (there are exactly the same four verifications on each side). The slick modern packaging is Bergman's salamander lemma, which produces δ and all six exactness statements from a single lemma about intertwined 3×3 squares.

A canonical worked example

Multiplication by n on the integers, applied to a short exact sequence of abelian groups 0 → A → B → C → 0, with the vertical maps being ·n. The two rows are the sequence and itself; the squares commute since multiplication by n is a homomorphism. Here ker(·n) is the n-torsion A[n], and coker(·n) is A/nA. The Snake Lemma yields

0 → A[n] → B[n] → C[n] →δ A/nA → B/nB → C/nC → 0.

Take 0 → ℤ →·2 ℤ → ℤ/2 → 0 as the sequence itself and multiply by 2: you recover the familiar Bockstein-type connecting map. Concretely, for 0 → ℤ →·3 ℤ → ℤ/3 → 0 with vertical ·2, δ: (ℤ/3)[2] = 0 → ℤ/2 is zero, and the sequence degenerates cleanly. Swapping in a non-split extension makes δ genuinely nonzero — that is the interesting regime.

Why the hypotheses matter

Exactness of the rows is essential. If the top row fails to be exact at B (a ∘ ... breaks), the ambiguity in lifting b ∈ B by an element of im a is no longer controlled, and δ stops being well-defined. Drop surjectivity of b: B→C and you cannot even lift x ∈ ker h into B — the very first step of the chase collapses.

Abelianness is essential. The construction quietly uses that kernels and cokernels exist and behave well, that im = ker of the next map, and that subobjects add. In a non-abelian category (groups!) cokernels are replaced by quotients that need not be normal, and the naive six-term sequence fails; one only recovers a pointed exact sequence, and δ requires extra data. The Freyd–Mitchell embedding theorem is what licenses doing the element-chase in an arbitrary abelian category: it embeds any small abelian category fully, faithfully, exactly into R-Mod.

Applications and significance

The Snake Lemma is the mechanism that turns a short exact sequence of chain complexes 0 → C• → D• → E• → 0 into the long exact sequence in homology …→ Hₙ(C) → Hₙ(D) → Hₙ(E) →∂ Hₙ₋₁(C) → …. You apply the lemma degree-by-degree to the diagram whose vertical maps are the boundary operators; the connecting map ∂ is exactly δ. This single move underlies the long exact sequences of a pair in singular homology, Mayer–Vietoris, the Ext and Tor long exact sequences from derived functors, the les of sheaf cohomology, and the les in group and Lie-algebra cohomology.

It is also the base case for the Five Lemma and the 3×3 (nine) lemma, and the prototype of "δ-functor" behavior axiomatized by Grothendieck (1957) and Cartan–Eilenberg (1956). Whenever you see a boundary or connecting homomorphism in topology or algebra, a Snake Lemma is running underneath.

How the six-term exact sequence responds to strengthening the hypotheses on the rows
Hypothesis addedEffect on the sequenceReason
Rows exact only in the middle (no 0 on the ends)Middle six terms ker f → ker g → ker h →δ coker f → coker g → coker h are exactδ and the four naturally induced maps only need exactness at B, C, A′, B′
A → B is monic (0 → A on the left)Sequence extends: 0 → ker f → ker g → ker h → …Left-exactness of the kernel functor makes ker f → ker g injective
B′ → C′ is epic (C′ → 0 on the right)Sequence extends: … → coker f → coker g → coker h → 0Right-exactness of the cokernel functor makes coker g → coker h surjective
h monic and f epicδ = 0, so it splits into 0→ker f→ker g→ker h→0 and 0→coker f→coker g→coker h→0No element of ker h can lift ambiguously; nothing to connect
All of f, g, h isomorphismsAll six terms vanishKernels and cokernels of isomorphisms are 0 — the Five Lemma degenerate case

Frequently asked questions

Where does the connecting homomorphism δ actually come from?

δ: ker h → coker f is built by lifting. Given x ∈ ker h ⊆ C, lift it to b ∈ B (possible since B ↠ C is onto), then note g(b) lies in im a′ ≅ A′, giving a unique y ∈ A′; set δ(x) = class of y in coker f = A′/im f. Different lifts of x differ by im a, which shifts y by im f, so the class is well-defined.

Why must the rows be exact, not merely complexes?

Two exactness facts are used. Surjectivity of B ↠ C lets you lift x ∈ ker h into B at all. Exactness at B′ (ker b′ = im a′) is what forces g(b) to come from A′, producing the target of δ. If the rows are only chain complexes (im ⊆ ker but not equal), those steps break and δ is neither defined nor natural.

Does the Snake Lemma hold in any abelian category, or only for modules?

It holds in every abelian category. You can either verify it internally via subobject/quotient arguments, or — much easier — invoke the Freyd–Mitchell embedding theorem, which embeds any small abelian category fully, faithfully and exactly into R-Mod for some ring R. Since the statement is about exactness, which the embedding preserves and reflects, an element-chase proof in modules transfers verbatim.

How is the Snake Lemma related to the long exact sequence in homology?

They are the same theorem applied in a loop. A short exact sequence of chain complexes gives, in each degree, a Snake diagram whose vertical maps are boundary operators. The kernels/cokernels assemble into cycles and boundaries, and the connecting δ becomes the boundary map ∂: Hₙ(E) → Hₙ₋₁(C). Iterating over all n splices the six-term sequences into one infinite long exact sequence.

When is the connecting map δ zero?

δ = 0 exactly when the six-term sequence splits into two short exact sequences 0→ker f→ker g→ker h→0 and 0→coker f→coker g→coker h→0. Sufficient conditions include h monic and f epic, or the whole diagram being a direct sum of the two rows. A nonzero δ is precisely the obstruction to the kernel and cokernel sequences being independently short exact.

What is the naturality of the Snake Lemma good for?

Naturality means a map between two Snake diagrams induces a commuting ladder between their six-term sequences. This is indispensable: it is what makes the long exact sequence in homology functorial in the short exact sequence of complexes, lets you compare Mayer–Vietoris sequences, and is required to prove that derived functors and their connecting maps are well-behaved (the δ-functor axioms).