In mathematics, particularly homological algebra, the zig-zag lemma asserts the existence of a particular long exact sequence in the homology groups of certain chain complexes.  The result is valid in every abelian category.

Statement 
In an abelian category (such as the category of abelian groups or the category of vector spaces over a given field), let  and  be chain complexes that fit into the following short exact sequence:

  

Such a sequence is shorthand for the following commutative diagram:

where the rows are exact sequences and each column is a chain complex. 

The zig-zag lemma asserts that there is a collection of boundary maps

 

that makes the following sequence exact:

The maps  and  are the usual maps induced by homology.  The boundary maps  are explained below.  The name of the lemma arises from the "zig-zag" behavior of the maps in the sequence. A variant version of the zig-zag lemma is commonly known as the "snake lemma" (it extracts the essence of the proof of the zig-zag lemma given below).

Construction of the boundary maps 
The maps  are defined using a standard diagram chasing argument.  Let  represent a class in , so .  Exactness of the row implies that  is surjective, so there must be some  with .  By commutativity of the diagram, 

By exactness, 

Thus, since  is injective, there is a unique element  such that .  This is a cycle, since  is injective and

since .  That is, .  This means  is a cycle, so it represents a class in .  We can now define

With the boundary maps defined, one can show that they are well-defined (that is, independent of the choices of c and b).  The proof uses diagram chasing arguments similar to that above.  Such arguments are also used to show that the sequence in homology is exact at each group.

See also 
 Mayer–Vietoris sequence

References

Homological algebra
Lemmas in category theory