The snake lemma is a fundamental diagram-chase statement in the category of RR-modules, and more generally in any .

It relates and (compare also ) across two exact rows ().

Theorem (Snake lemma)

Suppose we have a commutative diagram of RR-modules with exact rows

0→A′→iA→pA′′→0↓f′↓f↓f′′0→B′→jB→qB′′→0\begin{array}{ccccccccc} 0 &\to& A' &\xrightarrow{i}& A &\xrightarrow{p}& A'' &\to& 0\\ & & \downarrow f' & & \downarrow f & & \downarrow f'' & & \\ 0 &\to& B' &\xrightarrow{j}& B &\xrightarrow{q}& B'' &\to& 0 \end{array}

Then there is a canonical connecting homomorphism (boundary map)

δ:ker⁡(f′′)⟶coker⁡(f′)\delta:\ker(f'') \longrightarrow \operatorname{coker}(f')

such that the following sequence is exact:

0→ker⁡(f′)→ker⁡(f)→ker⁡(f′′)→ δ coker⁡(f′)→coker⁡(f)→coker⁡(f′′)→0.0 \to \ker(f') \to \ker(f) \to \ker(f'') \xrightarrow{\ \delta\ } \operatorname{coker}(f') \to \operatorname{coker}(f) \to \operatorname{coker}(f'') \to 0.

This δ\delta is natural in the diagram, and is the prototype for the appearing in long exact sequences.

Construction of δ\delta (explicit)

Given x∈ker⁡(f′′)⊆A′′x\in \ker(f'')\subseteq A'':

  1. pick a∈Aa\in A with p(a)=xp(a)=x;
  2. since f′′(x)=0f''(x)=0, commutativity implies q(f(a))=0q(f(a))=0, hence f(a)∈im⁡(j)f(a)\in \operatorname{im}(j);
  3. choose b′∈B′b'\in B' with j(b′)=f(a)j(b')=f(a);
  4. define δ(x)\delta(x) to be the class of b′b' in coker⁡(f′)=B′/im⁡(f′)\operatorname{coker}(f')=B'/\operatorname{im}(f').

A standard diagram chase shows this is well-defined (independent of choices) and gives exactness.

Examples
  1. Induced map on quotients: the “kernel–cokernel” exact sequence. Let g:M→M′g:M\to M' be an RR-linear map, and let N⊆MN\subseteq M, N′⊆M′N'\subseteq M' satisfy g(N)⊆N′g(N)\subseteq N'. Consider the commutative diagram with exact rows:
    0→N→M→M/N→0↓g∣N↓g↓g‾0→N′→M′→M′/N′→0\begin{array}{ccccccccc} 0 &\to& N &\to& M &\to& M/N &\to& 0\\ & & \downarrow g|_N & & \downarrow g & & \downarrow \overline g & & \\ 0 &\to& N' &\to& M' &\to& M'/N' &\to& 0 \end{array}
    The snake lemma produces the exact sequence
    0→ker⁡(g∣N)→ker⁡(g)→ker⁡(g‾)→δcoker⁡(g∣N)→coker⁡(g)→coker⁡(g‾)→0,0\to \ker(g|_N)\to \ker(g)\to \ker(\overline g)\xrightarrow{\delta} \operatorname{coker}(g|_N)\to \operatorname{coker}(g)\to \operatorname{coker}(\overline g)\to 0,
    which cleanly measures how kernels/cokernels change when passing to quotients.
  1. Boundary map in homology from a short exact sequence of complexes. Given a degreewise short exact sequence of
    0→C∙′→C∙→C∙′′→0,0\to C'_\bullet \to C_\bullet \to C''_\bullet \to 0,
    one applies the snake lemma to the diagram of cycles and boundaries in each degree to construct the connecting map
    ∂:Hn(C∙′′)⟶Hn−1(C∙′),\partial: H_n(C''_\bullet)\longrightarrow H_{n-1}(C'_\bullet),
    yielding the usual long exact sequence in . (This is the chain-complex analogue of .)
  1. Computing a boundary map concretely (multiplication on a quotient). Fix integers m,nm,n and consider the diagram
    0→Z→⋅mZ→Z/m→0↓⋅n↓⋅n↓⋅n0→Z→⋅mZ→Z/m→0\begin{array}{ccccccccc} 0&\to& \mathbb Z &\xrightarrow{\cdot m}& \mathbb Z &\to& \mathbb Z/m &\to& 0\\ && \downarrow \cdot n && \downarrow \cdot n && \downarrow \cdot n &&\\ 0&\to& \mathbb Z &\xrightarrow{\cdot m}& \mathbb Z &\to& \mathbb Z/m &\to& 0 \end{array}
    The connecting map δ:ker⁡(⋅n:Z/m→Z/m)→coker⁡(⋅n:Z→Z)≅Z/n\delta:\ker(\cdot n:\mathbb Z/m\to \mathbb Z/m)\to \operatorname{coker}(\cdot n:\mathbb Z\to \mathbb Z)\cong \mathbb Z/n sends a class x‾∈Z/m\overline{x}\in\mathbb Z/m with nx∈mZnx\in m\mathbb Z to the class of nxm\frac{nx}{m} in Z/n\mathbb Z/n. This is a concrete instance of how δ\delta encodes the failure of lifting across the diagram.