Learning #28 – Topology & Manifolds: Homotopy, Knot Theory, Homology and TDA

Topology is the branch of mathematics that studies properties invariant under continuous deformation — "rubber-sheet geometry." From the classification of compact surfaces to the Jones polynomial for knots, and from simplicial homology to persistent barcodes applied to genomics data, this post traces the entire field from first definitions to modern applications.

Two shapes are topologically equivalent (homeomorphic) if one can be continuously deformed into the other without tearing or gluing. A coffee mug is homeomorphic to a donut (both have genus 1), but neither is homeomorphic to a sphere (genus 0). Beyond this pop-science starting point lies a rich hierarchy of invariants — fundamental groups, homology groups, knot polynomials, and persistent diagrams — that have found unexpected applications in neuroscience, robotics, condensed matter physics, and machine learning.

1. Topological Spaces and Continuity

The fundamental object of topology is a set X together with a collection τ of subsets (called open sets) satisfying three axioms: ∅ and X are open, arbitrary unions of open sets are open, and finite intersections of open sets are open. The pair (X, τ) is a topological space.

Topological Spaces & Key Properties

Topological space (X, τ): τ = collection of open sets on X
  Axioms: ∅, X ∈ τ;  unions of τ-sets ∈ τ;  finite intersections ∈ τ

Metric topology: open ball B(x, r) = {y : d(x,y) < r} generates τ
  Every metric space is also a topological space

Continuous map f: X → Y (topological definition):
  f is continuous iff preimage of every open set in Y is open in X

Homeomorphism: bijective continuous map with continuous inverse
  Homeomorphic spaces are topologically identical

T2 / Hausdorff condition:
  For all x ≠ y, there exist disjoint open sets U∋x, V∋y
  Ensures limits are unique; all metric spaces satisfy this

Compactness (generalised closed + bounded):
  X is compact iff every open cover has a finite subcover
  [0,1] is compact; (0,1) is not

Connectedness:
  X is connected iff it cannot be written as disjoint union of two non-empty open sets
  Path-connected: any two points joined by a continuous path
          

2. Homotopy and the Fundamental Group

Homotopy asks: when are two continuous maps “essentially the same”? This leads to the fundamental group π1(X, x0) — the group of loops based at x0 up to homotopy equivalence — which captures the one-dimensional “holes” in a space.

Homotopy, π&sub1; and van Kampen's Theorem

Homotopy: continuous deformation H: X × [0,1] → Y with
  H(x,0) = f(x),  H(x,1) = g(x)   (f and g are homotopic: f ∼ g)

Loop: path γ with γ(0) = γ(1) = x_0 (basepoint)
Fundamental group π_1(X, x_0):
  Elements = homotopy classes of loops at x_0
  Group operation = loop concatenation

Examples:
  π_1(S¹) = ℤ   (number of times a loop winds around the circle)
  π_1(S²) = {e}   (all loops on sphere are contractible)
  π_1(T²) = ℤ × ℤ   (torus: two independent winding numbers)
  π_1(ℝP²) = ℤ/2   (projective plane; non-orientable)

Van Kampen's theorem:
  If X = A ∪ B with A, B, A∩B path-connected open sets and x_0 ∈ A∩B:
  π_1(X) = π_1(A) *_(π_1(A∩B)) π_1(B)   (amalgamated free product)

Covering spaces:
  p: &Xtilde; → X is a covering map if every x has a neighbourhood evenly covered
  Universal cover &Xtilde; is simply connected; π_1(X) acts on it by deck transformations
  π_1(S¹) = ℤ via covering ℝ → S¹, t ↦ e^(2πit)
          

3. Surfaces and Their Classification

The classification theorem for compact surfaces is one of the gems of nineteenth-century mathematics: every compact surface without boundary is homeomorphic to a sphere, a connected sum of tori, or a connected sum of projective planes. The Euler characteristic and orientability together determine the class.

Euler Characteristic & Surface Classification

Triangulation: decompose surface into vertices V, edges E, faces F
Euler characteristic: χ = V − E + F   (triangulation-independent)

Orientable surfaces (genus g):
  χ = 2 − 2g
  g=0: S² (sphere),  g=1: T² (torus),  g=2: double torus, ...

Non-orientable surfaces:
  ℝP² (projective plane): χ = 1,  no boundary embedding in ℝ³
  Klein bottle: χ = 0,  connected sum of two ℝP²
  ℝP² # ℝP² # ... (k times): χ = 2 − k

Classification theorem:
  Every compact connected surface is homeomorphic to exactly one of:
  S²  |  T²#T²#…#T² (g connected tori)  |  ℝP²#ℝP²#… (k projective planes)

Connected sum # M#N:
  Remove a disk from each, glue boundary circles together
  χ(M#N) = χ(M) + χ(N) − 2
          

4. Knot Theory

A knot is a closed loop embedded in ℝ3 (or S3). Two knots are equivalent if one can be continuously deformed into the other without passing through itself. Determining knot equivalence algorithmically is a solved but computationally expensive problem; polynomial invariants provide fast partial tests that have also found applications in DNA biology and quantum field theory.

Knot Diagrams, Reidemeister Moves & Polynomials

Knot diagram: planar projection with crossing information (over/under)

Three Reidemeister moves (generate all isotopies):
  RI:   twist ↔ untwist a strand
  RII:  slide one strand over another at 2-crossing site
  RIII: slide strand through 3-crossing site (triangle move)
  Any knot invariant must be invariant under all three moves

Alexander polynomial Δ_K(t)  (1928):
  Trefoil: Δ(t) = 1 − t + t²
  Figure-eight: Δ(t) = −t + 3 − t−¹
  Computed from Seifert matrix of the knot

Jones polynomial V_K(t)  (Jones 1984, Fields Medal 1990):
  More powerful than Alexander; distinguishes chirality
  Trefoil and its mirror have different V_K(t)
  Satisfies skein relation:
  t−¹V_L+ − tV_L- = (t^(1/2) − t−^(1/2)) V_L0

HOMFLY-PT polynomial: generalises both Alexander and Jones
  P_K(v, z) with two variables

Applications to DNA topology:
  DNA replication leaves strands catenated; type II topoisomerase
  introduces transient double-strand cuts to unlink them
  Action = crossing change = Reidemeister II move
  Topoisomerase inhibitors (e.g. etoposide) trap cut complexes → anticancer drugs
          

5. Homology Groups

While the fundamental group captures one-dimensional loops, homology generalises this to detect holes of all dimensions. A k-dimensional hole corresponds to a non-trivial element of the k-th homology group Hk. The rank of Hk is the k-th Betti number βk.

Simplicial Homology & Betti Numbers

Simplicial complex K: vertices, edges, triangles, tetrahedra, ...
  k-simplex: convex hull of (k+1) affinely independent points

Chain group C_k(K): free abelian group on k-simplices
  Elements: formal sums ∑ a_i σ_i  with a_i ∈ ℤ

Boundary operator ∂_k: C_k → C_{k-1}
  ∂([v_0,...,v_k]) = ∑_i (−1)^i [v_0,...,v^_i,...,v_k]
  Fundamental property: ∂_k ∘ ∂_{k+1} = 0  (boundary of boundary = 0)

Homology groups:
  Z_k = ker ∂_k   (cycles: chains with no boundary)
  B_k = im ∂_{k+1} (boundaries: chains that are boundaries)
  H_k = Z_k / B_k

Betti numbers β_k = rank H_k:
  β_0 = number of connected components
  β_1 = number of independent 1-cycles (loops)
  β_2 = number of enclosed 2-cavities (voids)

Euler formula revisited:
  χ = V − E + F = β_0 − β_1 + β_2   (Euler-Poincaré formula)

Examples:
  Sphere S²: β_0=1, β_1=0, β_2=1  → χ=2 ✓
  Torus T²: β_0=1, β_1=2, β_2=1  → χ=0 ✓
  Klein bottle: β_0=1, β_1=1, β_2=0  (ℤ/2 torsion in H_1)
          

Cohomology and Poincaré duality: Every homology theory has a dual cohomology theory Hk. For a closed orientable n-manifold, Hk ≅ Hn−k (Poincaré duality). Cohomology carries extra ring structure under cup product, which encodes global geometric data invisible to homology alone. De Rham cohomology identifies HkdR with closed differential k-forms modulo exact ones, connecting topology to calculus.

6. Topological Data Analysis

Topological Data Analysis (TDA) applies homological machinery to finite point-cloud data. The key idea: build a filtered simplicial complex that grows as a scale parameter ε increases, then track which topological features (connected components, loops, voids) are “born” and “die” as ε changes. The resulting persistence diagram is a robust data descriptor.

Persistent Homology & Vietoris-Rips Complex

Vietoris-Rips complex VR(X, ε):
  Vertex set = data points X
  Include k-simplex [x_0,...,x_k] iff d(x_i, x_j) ≤ ε for all i,j
  Filtration: VR(X,ε_1) ⊂ VR(X,ε_2) for ε_1 ≤ ε_2

Persistent homology:
  Track birth and death of each H_k generator as ε grows:
    born at ε_b when feature first appears
    dies at ε_d when feature merges/fills

Persistence diagram PD_k:
  Set of points (ε_b, ε_d) in the plane
  Points far from diagonal (long-lived features) = signal
  Points near diagonal = noise

Bottleneck distance d_b(PD, PD'):
  max_{point p in PD} min_{point q in PD' ∪ diagonal} |p − q|_∞
  Stability theorem: d_b(PD(f), PD(g)) ≤ ||f − g||_∞

Persistence barcodes:
  Horizontal bars [ε_b, ε_d) for each generator
  H_0 bars: component merges  |  H_1 bars: loop fills  |  H_2 bars: cavity fills

Mapper algorithm (Singh-Mémoli-Carlsson 2007):
  1. Cover function f: X → ℝ with overlapping bins
  2. Cluster each preimage bin
  3. Connect clusters from adjacent bins sharing points
  Output: 1-complex (graph) summarising high-dimensional shape

Applications:
  Cancer genomics (Nicolau 2011): Mapper found genomically distinct breast cancer subgroup
  Materials science: persistent H_1 loops characterise ring statistics in silicate glasses
  Neuroscience: H_2 voids detected in neural firing patterns above chance baseline
          

Try These Simulations