Small Group Tutorials

Here to help students catch up, keep up, and move ahead. Book a consultation here.

Homology and Cohomology | Chains, Cycles, Boundaries and Topological Invariants

Homology turns holes into algebra by asking which cycles fail to be boundaries.

The fundamental group records loops and how they compose. Homology takes a different route. It builds formal sums of vertices, edges, triangles and higher-dimensional pieces, applies a boundary operator, and studies the gap between things whose boundary is zero and things that are themselves boundaries. That gap is the homology group.

Cohomology reverses the direction of the algebra. Instead of chaining geometric pieces together, it studies algebraic functions on chains. The resulting groups contain much of the same additive information as homology, but they also support products and interact naturally with differential forms, bundles, characteristic classes and geometry.

This guide serves R22.06 · Homology and cohomology in the BTT Mathematics Atlas. It follows Fundamental Groups and Covering Spaces and the earlier topology sequence. The aim is to make the algebraic machinery concrete enough to compute small examples while keeping the general structure visible.

Return route: BTT Mathematics Hub.

The simple answer

A chain complex is a sequence of abelian groups and homomorphisms

⋯ → C₂ → C₁ → C₀ → 0

with boundary maps ∂ₙ:Cₙ→Cₙ₋₁ satisfying ∂ₙ₋₁∘∂ₙ=0. The equation ∂²=0 says every boundary has no boundary.

The n-cycles are Zₙ=ker∂ₙ. The n-boundaries are Bₙ=im∂ₙ₊₁. Because ∂²=0, every boundary is a cycle, so Bₙ⊆Zₙ. The nth homology group is

Hₙ=Zₙ/Bₙ.

Homology therefore measures cycles modulo those cycles that are already filled in by higher-dimensional chains.

1. Why formal sums appear

Suppose a triangle has oriented edges e₁,e₂,e₃. The geometric boundary of the triangle is not one edge; it is an oriented combination of all three. Algebra needs a way to add and subtract geometric pieces. That is why chains are formal linear combinations.

With integer coefficients, a 1-chain may look like

c=3e₁−2e₂+e₅.

The coefficients record multiplicity and orientation. The chain is not merely a set of edges; it is an algebraic combination of oriented edges.

2. Simplices and simplicial complexes

A 0-simplex is a vertex. A 1-simplex is an edge. A 2-simplex is a filled triangle. A 3-simplex is a tetrahedron. Higher-dimensional simplices continue the pattern.

A simplicial complex is built by gluing simplices along faces in a compatible way. A triangulated circle can be made from vertices and edges; a triangulated disc adds triangles filling the interior; a triangulated surface uses many triangles whose edges are identified appropriately.

Simplicial homology converts this combinatorial description into chain groups Cₙ generated by the oriented n-simplices.

3. The boundary formula

For an oriented n-simplex [v₀,…,vₙ], the simplicial boundary is

∂[v₀,…,vₙ]=Σi=0n(−1)i[v₀,…,v̂ᵢ,…,vₙ],

where v̂ᵢ means the ith vertex is omitted.

For an oriented edge [v₀,v₁],

∂[v₀,v₁]=[v₁]−[v₀].

For an oriented triangle [v₀,v₁,v₂],

∂[v₀,v₁,v₂]=[v₁,v₂]−[v₀,v₂]+[v₀,v₁].

The alternating signs make shared faces cancel correctly when simplices are assembled.

4. Why ∂²=0

Take a triangle. Its boundary is a signed sum of three edges. Apply ∂ again. Every vertex appears twice with opposite signs, so the result is zero.

This cancellation generalises. Every codimension-two face of an n-simplex appears twice in ∂², once from deleting vertex i then j and once in the opposite order, with opposite signs. Therefore ∂ₙ₋₁∂ₙ=0.

The equation is the algebraic form of the geometric principle “the boundary of a boundary is empty”. It is the structural reason homology can be defined.

5. Cycles and boundaries

A chain c is a cycle when ∂c=0. For a 1-chain, this means all endpoint contributions cancel. A closed polygonal loop is a cycle.

A chain c is a boundary when c=∂d for some higher-dimensional chain d. The boundary of a filled triangle is therefore a 1-boundary.

Every boundary is a cycle because ∂²=0. But a cycle need not be a boundary. The difference is topological information.

Worked example 1: circle versus disc

Triangulate a circle as a polygon. The sum of its oriented edges is a 1-cycle. There is no 2-chain inside the circle whose boundary is that loop, because the circle has no filled 2-dimensional interior in the space. So the cycle represents a nonzero class in H₁(S¹).

Now fill the circle with triangles to make a disc. The same boundary loop becomes the boundary of the sum of the interior triangles. It is now zero in homology. Filling the hole kills the H₁ class.

6. The zeroth homology group

H₀ records path components. If X has k path components and is sufficiently represented by a simplicial complex, then

H₀(X;Z)≅Zk.

For a path-connected space, H₀≅Z. The generator represents the fact that all vertices become homologous through edge boundaries.

Worked example 2: two disconnected circles

If X=S¹ ⊔ S¹ has two components, then H₀(X)≅Z². Each component contributes one independent generator.

This is already useful: homology detects disconnectedness without having to inspect every possible separation.

7. Homology of the circle

For S¹ with integer coefficients,

  • H₀(S¹)≅Z;
  • H₁(S¹)≅Z;
  • Hₙ(S¹)=0 for n≥2.

The H₁ generator represents one oriented trip around the circle. Traversing twice gives twice the generator; reversing orientation gives its negative.

This resembles π₁(S¹)=Z, but homology and the fundamental group are different constructions. In general H₁ is the abelianisation of π₁ for path-connected spaces: H₁(X;Z)≅π₁(X)ab. Noncommutative loop information is discarded.

8. Homology of contractible spaces

A contractible space has the homology of a point:

  • H₀≅Z if nonempty and path connected;
  • Hₙ=0 for n>0.

Thus intervals, discs, convex subsets of Euclidean space and Rⁿ have no positive-dimensional homology.

Homotopy-equivalent spaces have isomorphic homology groups. This makes deformation retraction just as useful for homology as for π₁.

9. Homology of spheres

For the n-sphere Sⁿ,

  • H₀(Sⁿ)≅Z;
  • Hₙ(Sⁿ)≅Z;
  • Hₖ(Sⁿ)=0 for 0<k<n.

The top-dimensional Z records the oriented fundamental class of the sphere. A circle has a 1-dimensional class; a 2-sphere has a 2-dimensional class even though π₁(S²)=0.

This is why homology detects holes that the fundamental group cannot. The 2-sphere is simply connected but not contractible because H₂(S²)≅Z while a point has H₂=0.

10. Homology of the torus

For the torus T²,

  • H₀(T²)≅Z;
  • H₁(T²)≅Z²;
  • H₂(T²)≅Z;
  • Hₙ(T²)=0 for n≥3.

The two H₁ generators correspond to the two independent circle directions. The H₂ generator is the oriented surface class of the whole torus.

Compare this with the sphere: both are compact connected orientable surfaces and both have H₂≅Z, but H₁ distinguishes them. S² has H₁=0 while T² has H₁≅Z².

11. Betti numbers

When homology with a field or the free part of integer homology is used, the rank of Hₙ is called the nth Betti number bₙ.

  • b₀ counts connected components.
  • b₁ counts independent one-dimensional cycles at the level of abelian homology.
  • b₂ counts independent two-dimensional void-type classes in appropriate settings.

For T², the Betti numbers are b₀=1, b₁=2, b₂=1. For S² they are 1,0,1.

12. Torsion

Integer homology can contain finite cyclic pieces as well as free Z summands. These finite pieces are torsion.

For example, the real projective plane RP² has

  • H₀(RP²;Z)≅Z;
  • H₁(RP²;Z)≅Z/2Z;
  • H₂(RP²;Z)=0.

The Z/2Z component records a loop class that becomes trivial after being doubled in homology. Torsion carries information that Betti numbers alone cannot see.

13. Euler characteristic

For a finite simplicial complex, the Euler characteristic can be computed combinatorially as

χ=V−E+F−⋯,

the alternating sum of the numbers of simplices in each dimension.

It can also be computed from homology as the alternating sum of Betti numbers when appropriate:

χ=Σ(−1)ⁿbₙ.

For S², χ=1−0+1=2. For T², χ=1−2+1=0.

This equality is powerful because it shows the same invariant emerging from two descriptions: a cell count and an algebraic homology calculation.

14. Boundary matrices and computation

Once bases of simplices are chosen, the boundary maps become integer matrices. Computing homology becomes linear algebra over Z or a chosen field.

Over a field, ranks and nullities give Betti numbers directly:

bₙ=dim ker∂ₙ−dim im∂ₙ₊₁.

Over Z, Smith normal form reveals both free rank and torsion coefficients. This connects topology with exact integer linear algebra.

Worked example 3: a triangle boundary

Take three vertices v₀,v₁,v₂ and three oriented edges e₀=[v₁,v₂], e₁=[v₀,v₂], e₂=[v₀,v₁]. Without a filled face, the edge combination e₀−e₁+e₂ is a 1-cycle not generated by any 2-boundary, so H₁≅Z.

Add the filled 2-simplex σ=[v₀,v₁,v₂]. Then ∂σ=e₀−e₁+e₂. The former cycle is now a boundary and H₁ becomes zero. One new 2-simplex has killed one 1-dimensional homology class.

15. Reduced homology

Reduced homology, written H̃ₙ, modifies H₀ so that a nonempty connected space has H̃₀=0 rather than Z. For n>0, reduced and ordinary homology agree.

This convention makes many formulas cleaner, especially those involving wedges, suspensions and spheres. For example, a sphere Sⁿ has reduced homology Z only in degree n and zero elsewhere.

16. Continuous maps induce homology maps

A continuous map f:X→Y induces homomorphisms

f*:Hₙ(X)→Hₙ(Y)

in every degree. Identity maps induce identities and compositions satisfy (g∘f)*=g*∘f*.

Homotopic maps induce the same maps on homology. Therefore homotopy-equivalent spaces have isomorphic homology groups.

This functoriality turns homology into a tool for proving nonexistence. If a proposed map would force an impossible homomorphism between homology groups, the map cannot have the claimed topological properties.

17. Exact sequences

A sequence of group homomorphisms

⋯→A→B→C→⋯

is exact when the image of each map equals the kernel of the next. Exactness means that everything killed by the next map is explained by what came before.

Homology naturally appears in long exact sequences associated with pairs, subspaces and decompositions. Two central examples are the long exact sequence of a pair and the Mayer–Vietoris sequence.

These sequences are computational bridges: if most groups in the sequence are known, exactness constrains the unknown ones.

18. Mayer–Vietoris idea

If X=A∪B with a suitable open or excisive decomposition, the Mayer–Vietoris sequence relates the homology of A, B, A∩B and X.

Conceptually, it is a homological gluing theorem. A chain in X can be split across the two pieces, and the overlap records how those pieces fail to be independent.

This plays a role analogous to van Kampen for fundamental groups, but the output is abelian homology rather than a possibly nonabelian group presentation.

19. Cochains

Fix an abelian coefficient group G. An n-cochain is a homomorphism from the chain group Cₙ to G. Symbolically,

Cⁿ=Hom(Cₙ,G).

The boundary map ∂ on chains induces a coboundary map δ in the opposite direction:

δ:Cⁿ→Cⁿ⁺¹, (δφ)(c)=φ(∂c).

Because ∂²=0, we get δ²=0. Therefore we can define cocycles Zⁿ=kerδ, coboundaries Bⁿ=imδ, and cohomology

Hⁿ=Zⁿ/Bⁿ.

20. Why cohomology is not just homology written backwards

Cohomology groups often contain additive information closely related to homology, but cohomology has an additional structure: the cup product.

Given classes α∈Hᵖ(X;R) and β∈Hᑫ(X;R), their cup product lies in Hᵖ⁺ᑫ(X;R). This makes the direct sum H*(X;R) into a graded ring.

Two spaces can have isomorphic homology groups yet different cohomology ring structures. The multiplication can therefore distinguish spaces that additive invariants alone fail to separate.

21. Cohomology of the circle and torus

For S¹ with integer coefficients, H⁰≅Z, H¹≅Z and higher cohomology vanishes.

For T², H⁰≅Z, H¹≅Z² and H²≅Z. If a and b are degree-one generators, then the degree-two class can be represented by a cup product a∪b up to orientation convention. The product records how the two independent one-dimensional directions combine to produce the surface class.

This multiplication is invisible if one looks only at the ranks 1,2,1.

22. De Rham cohomology as a bridge to analysis and geometry

On smooth manifolds, differential forms provide another cohomology theory. A smooth k-form ω is closed when dω=0 and exact when ω=dη. Because d²=0, exact forms are closed, and the quotient of closed forms by exact forms is de Rham cohomology HdRk.

De Rham’s theorem identifies de Rham cohomology over R with singular cohomology with real coefficients. This is a profound bridge: global topological information can be extracted from differential forms and integration.

On S¹, the 1-form dθ is locally an exact derivative but globally represents the nontrivial first cohomology class. Integrating around the circle detects winding.

23. Orientation and top homology

For a connected closed orientable n-manifold M, the top homology group Hₙ(M;Z) is isomorphic to Z. A choice of generator is a fundamental class and corresponds to choosing an orientation.

For many closed nonorientable manifolds, the top integer homology vanishes. The real projective plane has H₂(RP²;Z)=0, reflecting its failure to carry a global integer orientation.

With Z/2Z coefficients, orientation signs disappear, and closed manifolds recover a top-dimensional mod-2 fundamental class. Coefficients change what the invariant can see.

24. Coefficient choices matter

Homology may be computed with coefficients in Z, Q, R, Z/pZ or other abelian groups. Different choices can simplify calculations or reveal different features.

  • Field coefficients turn chain groups into vector spaces and make rank calculations straightforward.
  • Integer coefficients preserve torsion information.
  • Mod-2 coefficients remove orientation signs and are useful for nonorientable spaces.

A result should always state its coefficient group. Writing only Hₙ(X) may hide an assumption.

25. Persistent homology: a modern application

In topological data analysis, a point cloud is converted into a family of simplicial complexes depending on a scale parameter. Homology is computed across scales. A feature that appears briefly may be noise; a class that persists across a substantial interval may represent a robust geometric feature of the data.

The output is commonly summarised by barcodes or persistence diagrams. Persistent homology does not magically reveal the “true shape” of arbitrary data; it depends on the filtration, metric, sampling and noise model. But it shows how classical homology becomes computational machinery for data.

26. Common misconceptions

  • “Homology literally counts holes.” Useful intuition, but the precise object is cycles modulo boundaries.
  • “Every cycle is a boundary.” Only in spaces with trivial corresponding homology.
  • “H₁ is always the same as π₁.” No. H₁ is the abelianisation of π₁ for path-connected spaces.
  • “Trivial H₁ means simply connected.” False. A space can have perfect nontrivial fundamental group and H₁=0.
  • “Betti numbers contain all homology information.” They miss torsion.
  • “Cohomology is merely a duplicate of homology.” The cup product gives extra ring structure.
  • “Coefficients do not matter.” They can change torsion visibility and orientation behaviour.
  • “Euler characteristic uniquely determines topology.” Many nonhomeomorphic spaces share the same χ.
  • “A triangulation is the topology.” It is a combinatorial model used to compute invariants of the underlying space.

27. A calculation workflow

  1. Choose a useful cell, simplicial or singular model.
  2. State the coefficient group.
  3. Write the chain groups Cₙ.
  4. Construct the boundary maps with consistent orientations.
  5. Check ∂²=0.
  6. Compute kernels and images.
  7. Form Hₙ=ker∂ₙ/im∂ₙ₊₁.
  8. Use deformation retraction, exact sequences or known models before expanding huge matrices.
  9. Interpret free rank, torsion and top-dimensional classes.
  10. For cohomology, add the multiplicative structure when it matters.

28. Practice set

  1. Compute the boundary of [v₀,v₁].
  2. Compute the boundary of [v₀,v₁,v₂].
  3. Verify ∂²=0 on a triangle.
  4. Explain the difference between a cycle and a boundary.
  5. Give the homology groups of a point.
  6. Give the homology groups of S¹.
  7. Give the homology groups of S².
  8. Give the integer homology groups of T².
  9. Compute the Betti numbers of T².
  10. Compute χ(T²) from Betti numbers.
  11. Compute χ(S²).
  12. Explain why S² is not contractible even though π₁(S²)=0.
  13. What does H₀ record?
  14. What additional information can integer homology carry beyond Betti numbers?
  15. State H₁(X;Z) in relation to π₁(X) for path-connected X.
  16. Explain what a cochain is.
  17. Why does δ²=0?
  18. What extra structure does the cup product give?
  19. Why should a coefficient group always be stated?
  20. Describe in one sentence what persistent homology tracks.

29. Answers and checks

  1. [v₁]−[v₀].
  2. [v₁,v₂]−[v₀,v₂]+[v₀,v₁].
  3. Apply ∂ to the three edge terms; each vertex occurs twice with opposite signs.
  4. A cycle has zero boundary; a boundary is itself the boundary of a higher-dimensional chain. Every boundary is a cycle.
  5. H₀≅Z and Hₙ=0 for n>0.
  6. H₀≅Z, H₁≅Z, higher groups zero.
  7. H₀≅Z, H₂≅Z, all other positive-degree groups zero.
  8. H₀≅Z, H₁≅Z², H₂≅Z, higher groups zero.
  9. 1,2,1 in degrees 0,1,2.
  10. 1−2+1=0.
  11. 1−0+1=2.
  12. H₂(S²)≅Z, while a contractible space has zero positive-dimensional homology.
  13. Path components.
  14. Torsion such as Z/nZ summands.
  15. H₁(X;Z)≅π₁(X)ab.
  16. A homomorphism from an n-chain group to the coefficient group.
  17. Because δ is induced by ∂ and ∂²=0.
  18. A graded ring structure on cohomology.
  19. Different coefficients can change torsion and orientation information.
  20. It tracks when homology classes appear and disappear as a scale parameter changes.

30. What to carry forward

Homology measures cycles that are not boundaries. Cohomology turns those invariants into a dual algebra with multiplication. Together they can distinguish spaces, detect orientation, compute Euler characteristic, support exact-sequence arguments and connect topology to geometry, differential forms and data analysis.

The next Atlas cell moves from invariants back to spaces themselves: manifolds, knots and geometric topology. There the local Euclidean structure of manifolds meets global topology, embeddings and the study of knots and surfaces.

Return to the BTT Mathematics Hub.