MathLabs

Topology

Homology and cohomology

Algebraic invariants Hn(X)H_n(X) built from a chain complex ⋯→Cn+1→∂n+1Cn→∂nCn−1→⋯\cdots \to C_{n+1} \xrightarrow{\partial_{n+1}} C_n \xrightarrow{\partial_n} C_{n-1} \to \cdots that count holes of every dimension, unifying Euler's formula with the Euler–Poincaré theorem χ(X)=∑n≥0(−1)nrank⁡Cn=∑n≥0(−1)nβn(X)\chi(X) = \sum_{n\ge 0} (-1)^n \operatorname{rank} C_n = \sum_{n\ge 0} (-1)^n \beta_n(X).

IntuitionCounting holes with algebra

A circle has one 11-dimensional hole, a sphere has one 22-dimensional hole (a hollow inside) but no 11-dimensional hole, and a torus has two independent 11-dimensional loops plus one 22-dimensional cavity. Homology turns this vague counting into a precise algebraic invariant: for each dimension nn, a group Hn(X)H_n(X) whose rank βn\beta_n (the Betti number) is exactly the number of independent nn-dimensional holes. The rotating polyhedron below lets you see vertices (00-cells), edges (11-cells), and faces (22-cells) — the raw building blocks that homology will organize into chain groups.

Rotating exploded octahedron showing vertices, edges, faces.
An octahedron: V=6V=6 vertices, E=12E=12 edges, F=8F=8 faces build the 00-, 11-, 22-chain groups.

SchoolEuler's formula as a shadow of homology

Definition: Simplicial chain complex

Given a triangulated space (or polyhedron) XX, let CnC_n be the free abelian group generated by its oriented nn-dimensional cells (vertices for n=0n=0, edges for n=1n=1, triangular faces for n=2n=2, …). The boundary map ∂n:Cn→Cn−1\partial_n : C_n \to C_{n-1} sends an nn-cell to the signed sum of its (n−1)(n-1)-dimensional faces, e.g. an edge [v0,v1][v_0,v_1] maps to v1−v0v_1 - v_0.

⋯→Cn+1→∂n+1Cn→∂nCn−1→⋯\cdots \to C_{n+1} \xrightarrow{\partial_{n+1}} C_n \xrightarrow{\partial_n} C_{n-1} \to \cdots

This sequence of groups linked by boundary maps is the chain complex. Its defining property is ∂n∘∂n+1=0\partial_n \circ \partial_{n+1} = 0: applying the boundary twice always gives 00. The homology group in dimension nn measures the gap between cycles (things with no boundary) and boundaries (things that are themselves a boundary):

Hn(X)=ker⁡∂n/im⁡∂n+1H_n(X) = \ker \partial_n / \operatorname{im} \partial_{n+1}
Betti numbers of familiar spaces
Spaceβ0,β1,β2\beta_0, \beta_1, \beta_2χ(X)\chi(X)
Sphere S2S^21,0,11,0,122
Torus T2T^21,2,11,2,100
Circle S1S^11,1,01,1,000
Real projective plane RP2\mathbb{RP}^21,0,01,0,0 (over Q\mathbb{Q})11

UndergraduateTwo founding theorems

For the simplicial boundary map, ∂n∘∂n+1=0\partial_n \circ \partial_{n+1} = 0 for every nn.

Why is it true?

This single identity is what makes homology well-defined: it guarantees im⁡∂n+1⊆ker⁡∂n\operatorname{im} \partial_{n+1} \subseteq \ker \partial_n, so the quotient in the definition of Hn(X)H_n(X) actually makes sense as a group.

Proof

It suffices to check the claim on a single nn-simplex σ=[v0,…,vn]\sigma = [v_0, \dots, v_n] and extend by linearity. By definition, ∂nσ=∑i=0n(−1)i[v0,…,vi^,…,vn]\partial_n \sigma = \sum_{i=0}^n (-1)^i [v_0, \dots, \hat{v_i}, \dots, v_n], where vi^\hat{v_i} means viv_i is deleted.

Applying ∂n−1\partial_{n-1} to each term and deleting a second vertex vjv_j (with j≠ij \ne i) from [v0,…,vi^,…,vn][v_0, \dots, \hat{v_i}, \dots, v_n] produces the face [v0,…,vj^,…,vi^,…,vn][v_0, \dots, \hat{v_j}, \dots, \hat{v_i}, \dots, v_n] that is missing exactly the two vertices vi,vjv_i, v_j. Carefully tracking the sign: when j<ij < i the face is deleted at position jj first (sign (−1)j(-1)^j) inside a term already carrying sign (−1)i(-1)^i, giving total sign (−1)i+j(-1)^{i+j}; when j>ij > i, deleting vjv_j from the (n−1)(n-1)-simplex [v0,…,vi^,…,vn][v_0,\dots,\hat{v_i},\dots,v_n] removes the vertex now sitting at position j−1j-1 (because viv_i was already removed), giving sign (−1)i(−1)j−1=−(−1)i+j(-1)^i (-1)^{j-1} = -(-1)^{i+j}.

So ∂n−1∂nσ=∑j<i(−1)i+j[…,vj^,…,vi^,… ]+∑j>i(−(−1)i+j)[…,vi^,…,vj^,… ]\partial_{n-1}\partial_n \sigma = \sum_{j<i} (-1)^{i+j} [\dots,\hat{v_j},\dots,\hat{v_i},\dots] + \sum_{j>i} \left(-(-1)^{i+j}\right) [\dots,\hat{v_i},\dots,\hat{v_j},\dots]. Every face missing exactly two vertices {vi,vj}\{v_i, v_j\} with i<ji < j appears exactly twice in this double sum: once from deleting viv_i then vjv_j (contributing −(−1)i+j-(-1)^{i+j}) and once from deleting vjv_j then viv_i (contributing +(−1)i+j+(-1)^{i+j}), and these two contributions are exact opposites.

Every term cancels in pairs, so ∂n−1∂nσ=0\partial_{n-1}\partial_n \sigma = 0 for every simplex σ\sigma, hence ∂n∘∂n+1=0\partial_n \circ \partial_{n+1} = 0 on all of CnC_n by linearity.

For a finite chain complex, χ(X)=∑n≥0(−1)nrank⁡Cn=∑n≥0(−1)nβn(X)\chi(X) = \sum_{n\ge 0} (-1)^n \operatorname{rank} C_n = \sum_{n\ge 0} (-1)^n \beta_n(X).

Why is it true?

This says the alternating sum of the number of cells (a combinatorial count, easy to compute by hand) equals the alternating sum of Betti numbers (a topological invariant that only depends on the shape, not the triangulation). It generalizes V−E+F=2V - E + F = 2 to every dimension.

Proof

Fix nn and consider the boundary map ∂n:Cn→Cn−1\partial_n : C_n \to C_{n-1} as a linear map of finite-dimensional vector spaces (working over Q\mathbb{Q} for simplicity). By the rank-nullity theorem, rank⁡Cn=dim⁡ker⁡∂n+rank⁡∂n\operatorname{rank} C_n = \dim \ker \partial_n + \operatorname{rank} \partial_n, where rank⁡∂n:=dim⁡im⁡∂n\operatorname{rank}\partial_n := \dim \operatorname{im} \partial_n.

Also, dim⁡Hn(X)=dim⁡ker⁡∂n−dim⁡im⁡∂n+1\dim H_n(X) = \dim \ker \partial_n - \dim \operatorname{im} \partial_{n+1} directly from the quotient definition Hn=ker⁡∂n/im⁡∂n+1H_n = \ker \partial_n / \operatorname{im}\partial_{n+1}, so dim⁡ker⁡∂n=βn+rank⁡∂n+1\dim \ker \partial_n = \beta_n + \operatorname{rank}\partial_{n+1}.

Substituting, rank⁡Cn=βn+rank⁡∂n+1+rank⁡∂n\operatorname{rank} C_n = \beta_n + \operatorname{rank}\partial_{n+1} + \operatorname{rank}\partial_n. Now form the alternating sum over all nn from 00 to the top dimension NN: ∑n(−1)nrank⁡Cn=∑n(−1)nβn+∑n(−1)nrank⁡∂n+1+∑n(−1)nrank⁡∂n\sum_n (-1)^n \operatorname{rank} C_n = \sum_n (-1)^n \beta_n + \sum_n (-1)^n \operatorname{rank}\partial_{n+1} + \sum_n (-1)^n \operatorname{rank}\partial_n.

In the last two sums, the term rank⁡∂k\operatorname{rank}\partial_k appears once from the rank⁡∂n\operatorname{rank}\partial_n sum (at n=kn=k, with sign (−1)k(-1)^k) and once from the rank⁡∂n+1\operatorname{rank}\partial_{n+1} sum (at n=k−1n=k-1, with sign (−1)k−1(-1)^{k-1}); these two signs are opposite, so every rank⁡∂k\operatorname{rank}\partial_k cancels exactly (telescoping), except the boundary terms ∂0=0\partial_0 = 0 and ∂N+1=0\partial_{N+1}=0 which contribute nothing anyway.

What remains is ∑n(−1)nrank⁡Cn=∑n(−1)nβn\sum_n (-1)^n \operatorname{rank} C_n = \sum_n (-1)^n \beta_n, and since the left side is χ(X)\chi(X) by definition, this is exactly χ(X)=∑n≥0(−1)nrank⁡Cn=∑n≥0(−1)nβn(X)\chi(X) = \sum_{n\ge 0} (-1)^n \operatorname{rank} C_n = \sum_{n\ge 0} (-1)^n \beta_n(X).

AdvancedMayer–Vietoris and de Rham cohomology

Computing Hn(X)H_n(X) directly from a triangulation is tedious; the Mayer–Vietoris sequence lets us split X=A∪BX = A \cup B into simpler overlapping pieces and glue their homologies together via a long exact sequence ⋯→Hn(A∩B)→Hn(A)⊕Hn(B)→Hn(X)→Hn−1(A∩B)→⋯\cdots \to H_n(A\cap B) \to H_n(A)\oplus H_n(B) \to H_n(X) \to H_{n-1}(A\cap B) \to \cdots. Cohomology dualizes the picture: cochains Cn=Hom⁡(Cn,R)C^n = \operatorname{Hom}(C_n, \mathbb{R}) with a coboundary d=∂∗d = \partial^* satisfying d2=0d^2=0. For a smooth manifold, de Rham cohomology takes CnC^n to be differential nn-forms and dd the exterior derivative; de Rham's theorem says this analytic construction computes exactly the same groups HdRn(X)≅Hn(X;R)H^n_{dR}(X) \cong H^n(X;\mathbb{R}) as the combinatorial version, a striking bridge between analysis and combinatorics.

UndergraduateReal-World Applications and Worked Examples

Topological data analysis (TDA) applies homology to noisy point-cloud data: build a nested family of simplicial complexes (a filtration) by connecting nearby points at growing scale ϵ\epsilon, and track which homology classes are born and die as ϵ\epsilon grows — this persistent homology distinguishes real structure (loops, voids that survive a wide range of ϵ\epsilon) from noise (features that vanish almost immediately). In sensor network coverage, if a set of wireless sensors with communication radius rr forms a simplicial complex (a simplex for every clique of mutually-connected sensors), a nonzero H1H_1 class in a specific relative-homology sense certifies a genuine coverage hole even when no single sensor can detect it — a purely combinatorial, coordinate-free proof of a geometric fact.

Example: Homology of the torus

A torus T2T^2 is triangulated with a CW structure of 11 vertex, 22 edges a,ba,b (the two generating loops), and 11 face glued via aba−1b−1aba^{-1}b^{-1}. Compute H0,H1,H2H_0, H_1, H_2.

Solution

The chain groups are C0=ZC_0 = \mathbb{Z} (one vertex), C1=Z2C_1 = \mathbb{Z}^2 (edges a,ba,b), C2=ZC_2 = \mathbb{Z} (one face). Since there is only one vertex, ∂1=0\partial_1 = 0 (every edge starts and ends at the same vertex, so its boundary is v−v=0v-v=0).

The boundary of the face reads off the gluing word aba−1b−1aba^{-1}b^{-1}: in homology (abelianized), ∂2(face)=a+b−a−b=0\partial_2(\text{face}) = a+b-a-b = 0. So ∂2=0\partial_2 = 0 as well.

With both boundary maps zero, H0=C0/im⁡∂1=ZH_0 = C_0/\operatorname{im}\partial_1 = \mathbb{Z}, H1=ker⁡∂1/im⁡∂2=Z2/0=Z2H_1 = \ker\partial_1 / \operatorname{im}\partial_2 = \mathbb{Z}^2/0 = \mathbb{Z}^2, H2=ker⁡∂2=ZH_2 = \ker\partial_2 = \mathbb{Z}. So β0=1,β1=2,β2=1\beta_0=1,\beta_1=2,\beta_2=1, matching χ(T2)=1−2+1=0\chi(T^2) = 1-2+1=0.

Example: Betti numbers from Euler characteristic of an icosahedron

A regular icosahedron has V=12,E=30,F=20V=12, E=30, F=20. Given that it is homeomorphic to S2S^2 (so β0=1\beta_0=1 and, being simply connected, β1=0\beta_1=0), use the Euler–Poincaré theorem to find β2\beta_2.

Solution

First compute the topological Euler characteristic from the cell counts: χ=V−E+F=12−30+20=2\chi = V - E + F = 12 - 30 + 20 = 2.

By the Euler–Poincaré theorem, χ=β0−β1+β2\chi = \beta_0 - \beta_1 + \beta_2. Substituting the known values β0=1,β1=0\beta_0=1, \beta_1=0 gives 2=1−0+β22 = 1 - 0 + \beta_2.

Solving, β2=1\beta_2 = 1, matching the fact that S2S^2 has exactly one 22-dimensional cavity — consistent with the sphere row of the table above.

What is the defining identity of a chain complex's boundary maps?

For the icosahedron (V=12,E=30,F=20V=12,E=30,F=20, homeomorphic to S2S^2), what is β2\beta_2?

In topological data analysis, what does "persistent homology" track?

Which pair (H0,H1,H2)(H_0,H_1,H_2) correctly describes the torus T2T^2?

References

  1. Allen Hatcher (2002). Algebraic Topology
  2. James R. Munkres (1984). Elements of Algebraic Topology
  3. Gunnar Carlsson (2009). Topology and data