In mathematics, chain complex and cochain complex are constructs originally used in the field of algebraic topology. They are algebraic means of representing the relationships between the cycles and boundaries in various dimensions of a topological space. More generally, homological algebra includes the study of chain complexes in the abstract, without any reference to an underlying space. In this case, chain complexes are studied axiomatically as algebraic structures.
Applications of chain complexes usually define and apply their homology groups (cohomology groups for cochain complexes); in more abstract settings various equivalence relations are applied to complexes (for example starting with the chain homotopy idea). Chain complexes are easily defined in abelian categories, also.
A chain complex
(
A
∙
,
d
∙
)
is a sequence of abelian groups or modules ... A_{2}, A_{1}, A_{0}, A_{−1}, A_{−2}, ... connected by homomorphisms (called boundary operators or differentials) d_{n} : A_{n}→A_{n−1}, such that the composition of any two consecutive maps is the zero map: d_{n} ∘ d_{n+1} = 0 (i.e., (d_{n}∘d_{n+1})(a)=0_{n−1}—the identity in A_{n−1}—for all a in A_{n+1}) for all n. They are usually written out as:
A variant on the concept of chain complex is that of cochain complex. A cochain complex
(
A
∙
,
d
∙
)
is a sequence of abelian groups or modules ...,
A
−
2
,
A
−
1
,
A
0
,
A
1
,
A
2
, ... connected by homomorphisms
d
n
:
A
n
→
A
n
+
1
such that the composition of any two consecutive maps is the zero map:
d
n
+
1
∘
d
n
=
0
for all n:
The index
n
in either
A
n
or
A
n
is referred to as the degree (or dimension). The only difference in the definitions of chain and cochain complexes is that, in chain complexes, the boundary operators decrease dimension, whereas in cochain complexes they increase dimension.
A bounded chain complex is one in which almost all the A_{i} are 0; i.e., a finite complex extended to the left and right by 0's. An example is the complex defining the homology theory of a (finite) simplicial complex. A chain complex is bounded above if all modules above some fixed degree N are 0, and is bounded below if all modules below some fixed degree are 0. Clearly, a complex is bounded both above and below if and only if the complex is bounded.
Leaving out the indices, the basic relation on d can be thought of as
The elements of the individual groups of a chain complex are called chains (or cochains in the case of a cochain complex.) The image of d is the group of boundaries, or in a cochain complex, coboundaries. The kernel of d (i.e., the subgroup sent to 0 by d) is the group of cycles, or in the case of a cochain complex, cocycles. From the basic relation, the (co)boundaries lie inside the (co)cycles. This phenomenon is studied in a systematic way using (co)homology groups.
There is a natural notion of a morphism between chain complexes called a chain map. Given two complexes M
∗
and N
∗
, a chain map between the two is a series of homomorphisms from M_{i} to N_{i} such that the entire diagram involving the boundary maps of M and N commutes. Chain complexes with chain maps form a category.
If V = V
∗
and W = W
∗
are chain complexes, their tensor product
V
⊗
W
is a chain complex with degree i elements given by
(
V
⊗
W
)
i
=
⨁
{
j
,
k

j
+
k
=
i
}
V
j
⊗
W
k
and differential given by
∂
(
a
⊗
b
)
=
∂
a
⊗
b
+
(
−
1
)

a

a
⊗
∂
b
where a and b are any two homogeneous vectors in V and W respectively, and

a

denotes the degree of a.
This tensor product makes the category
Ch
K
(for any commutative ring K) of chain complexes of Kmodules into a symmetric monoidal category. The identity object with respect to this monoidal product is the base ring K viewed as a chain complex in degree 0. The braiding is given on simple tensors of homogeneous elements by
a
⊗
b
↦
(
−
1
)

a


b

b
⊗
a
.
The sign is necessary for the braiding to be a chain map. Moreover, the category of chain complexes of Kmodules also has internal Hom: given chain complexes V and W, the internal Hom of V and W, denoted hom(V,W), is the chain complex with degree n elements given by
Π
i
Hom
K
(
V
i
,
W
i
+
n
)
and differential given by
(
∂
f
)
(
v
)
=
∂
(
f
(
v
)
)
−
(
−
1
)

f

f
(
∂
(
v
)
)
.
We have a natural isomorphism
Hom
(
A
⊗
B
,
C
)
≅
Hom
(
A
,
Hom
(
B
,
C
)
)
.
Suppose we are given a topological space X.
Define C_{n}(X) for natural n to be the free abelian group formally generated by singular nsimplices in X, and define the boundary map
where the hat denotes the omission of a vertex. That is, the boundary of a singular simplex is the alternating sum of restrictions to its faces. It can be shown that ∂^{2} = 0, so
(
C
∙
,
∂
∙
)
is a chain complex; the singular homology
H
∙
(
X
)
is the homology of this complex, that is,
The differential kforms on any smooth manifold M form an abelian group (in fact an Rvector space) called Ω^{k}(M) under addition. The exterior derivative d_{k} maps Ω^{k}(M) to Ω^{k+1}(M), and d^{2} = 0 follows essentially from symmetry of second derivatives, so the vector spaces of kforms along with the exterior derivative are a cochain complex:
Ω
0
(
M
)
→
d
0
Ω
1
(
M
)
→
Ω
2
(
M
)
→
Ω
3
(
M
)
→
⋯
.
The cohomology of this complex is called the de Rham cohomology:
H
D
R
0
(
M
)
=
ker
d
0
=
{locally constant functions on
M with values in
R}
≅
R
^{#{connected pieces of M}}
H
D
R
k
(
M
)
=
ker
d
k
/
i
m
d
k
−
1
.
A chain map f between two chain complexes
(
A
∙
,
d
A
,
∙
)
and
(
B
∙
,
d
B
,
∙
)
is a sequence
f
∙
of module homomorphisms
f
n
:
A
n
→
B
n
for each n that commutes with the boundary operators on the two chain complexes:
d
B
,
n
∘
f
n
=
f
n
−
1
∘
d
A
,
n
. Such a map sends cycles to cycles and boundaries to boundaries, and thus descends to a map on homology:
(
f
∙
)
∗
:
H
∙
(
A
∙
,
d
A
,
∙
)
→
H
∙
(
B
∙
,
d
B
,
∙
)
.
A continuous map of topological spaces induces chain maps in both the singular and de Rham chain complexes described above (and in general for the chain complex defining any homology theory of topological spaces) and thus a continuous map induces a map on homology. Because the map induced on a composition of maps is the composition of the induced maps, these homology theories are functors from the category of topological spaces with continuous maps to the category of abelian groups with group homomorphisms.
It is worth noticing that the concept of chain map reduces to the one of boundary through the construction of the cone of a chain map.
Chain homotopies give an important equivalence relation between chain maps. Chain homotopic chain maps induce the same maps on homology groups. A particular case is that homotopic maps between two spaces X and Y induce the same maps from homology of X to homology of Y. Chain homotopies have a geometric interpretation; it is described, for example, in the book of Bott and Tu. See Homotopy category of chain complexes for further information.