The snake lemma is a tool used in
mathematics, particularly
homological algebra
Homological algebra is the branch of mathematics that studies homology in a general algebraic setting. It is a relatively young discipline, whose origins can be traced to investigations in combinatorial topology (a precursor to algebraic topology ...
, to construct
long exact sequence
An exact sequence is a sequence of morphisms between objects (for example, groups, rings, modules, and, more generally, objects of an abelian category) such that the image of one morphism equals the kernel of the next.
Definition
In the conte ...
s. The snake lemma is valid in every
abelian category
In mathematics, an abelian category is a category in which morphisms and objects can be added and in which kernels and cokernels exist and have desirable properties. The motivating prototypical example of an abelian category is the category of ...
and is a crucial tool in homological algebra and its applications, for instance in
algebraic topology
Algebraic topology is a branch of mathematics that uses tools from abstract algebra to study topological spaces. The basic goal is to find algebraic invariants that classify topological spaces up to homeomorphism, though usually most classif ...
. Homomorphisms constructed with its help are generally called ''connecting homomorphisms''.
Statement
In an
abelian category
In mathematics, an abelian category is a category in which morphisms and objects can be added and in which kernels and cokernels exist and have desirable properties. The motivating prototypical example of an abelian category is the category of ...
(such as the category of
abelian group
In mathematics, an abelian group, also called a commutative group, is a group in which the result of applying the group operation to two group elements does not depend on the order in which they are written. That is, the group operation is com ...
s or the category of
vector space
In mathematics and physics, a vector space (also called a linear space) is a set whose elements, often called '' vectors'', may be added together and multiplied ("scaled") by numbers called '' scalars''. Scalars are often real numbers, but ...
s over a given
field), consider a
commutative diagram
350px, The commutative diagram used in the proof of the five lemma.
In mathematics, and especially in category theory, a commutative diagram is a diagram such that all directed paths in the diagram with the same start and endpoints lead to the ...
:
:
where the rows are
exact sequence
An exact sequence is a sequence of morphisms between objects (for example, groups, rings, modules, and, more generally, objects of an abelian category) such that the image of one morphism equals the kernel of the next.
Definition
In the conte ...
s and 0 is the
zero object.
Then there is an exact sequence relating the
kernels and
cokernels of ''a'', ''b'', and ''c'':
:
where ''d'' is a homomorphism, known as the ''connecting homomorphism''.
Furthermore, if the morphism ''f'' is a
monomorphism, then so is the morphism
, and if ''g is an
epimorphism, then so is
.
The cokernels here are:
,
,
.
Explanation of the name
To see where the snake lemma gets its name, expand the diagram above as follows:
:
and then note that the exact sequence that is the conclusion of the lemma can be drawn on this expanded diagram in the reversed "S" shape of a slithering
snake
Snakes are elongated, limbless, carnivorous reptiles of the suborder Serpentes . Like all other squamates, snakes are ectothermic, amniote vertebrates covered in overlapping scales. Many species of snakes have skulls with several more j ...
.
Construction of the maps
The maps between the kernels and the maps between the cokernels are induced in a natural manner by the given (horizontal) maps because of the diagram's commutativity. The exactness of the two induced sequences follows in a straightforward way from the exactness of the rows of the original diagram. The important statement of the lemma is that a ''connecting homomorphism'' ''d'' exists which completes the exact sequence.
In the case of abelian groups or
modules over some
ring, the map ''d'' can be constructed as follows:
Pick an element ''x'' in ker ''c'' and view it as an element of ''C''; since ''g'' is
surjective
In mathematics, a surjective function (also known as surjection, or onto function) is a function that every element can be mapped from element so that . In other words, every element of the function's codomain is the image of one element of ...
, there exists ''y'' in ''B'' with ''g''(''y'') = ''x''. Because of the commutativity of the diagram, we have ''g(''b''(''y'')) = ''c''(''g''(''y'')) = ''c''(''x'') = 0 (since ''x'' is in the kernel of ''c''), and therefore ''b''(''y'') is in the kernel of ''g' ''. Since the bottom row is exact, we find an element ''z'' in ''A' '' with ''f'' '(''z'') = ''b''(''y''). ''z'' is unique by injectivity of ''f'' '. We then define ''d''(''x'') = ''z'' + ''im''(''a''). Now one has to check that ''d'' is well-defined (i.e., ''d''(''x'') only depends on ''x'' and not on the choice of ''y''), that it is a homomorphism, and that the resulting long sequence is indeed exact. One may routinely verify the exactness by
diagram chasing (see the proof of Lemma 9.1 in ).
Once that is done, the theorem is proven for abelian groups or modules over a ring. For the general case, the argument may be rephrased in terms of properties of arrows and cancellation instead of elements. Alternatively, one may invoke
Mitchell's embedding theorem.
Naturality
In the applications, one often needs to show that long exact sequences are "natural" (in the sense of
natural transformation
In category theory, a branch of mathematics, a natural transformation provides a way of transforming one functor into another while respecting the internal structure (i.e., the composition of morphisms) of the categories involved. Hence, a na ...
s). This follows from the naturality of the sequence produced by the snake lemma.
If
:
is a commutative diagram with exact rows, then the snake lemma can be applied twice, to the "front" and to the "back", yielding two long exact sequences; these are related by a commutative diagram of the form
:
Example
Let
be field,
be a
-vector space.
is