COMPUTATIONAL TOPOLOGY FOR DATA ANALYSIS

Computational Topology

A visual & equation guide connecting geometry, complexes, persistent homology, and topological Laplacians.

Begin with the foundations
01

Topology to homology

Understand boundaries, kernels, images, homology, and Betti numbers geometrically and algebraically.

02

Complexes and persistence

Build simplicial or cubical models and follow their features through a filtration.

03

Zigzag persistence

Allow both insertion and deletion in a non-monotone sequence of spaces.

04

Laplacian families

Derive graph, Hodge, sheaf, connection, and persistent Laplacians.

1.1 SPACES, MAPS, INVARIANTS

Topology records continuity, not precise measurement

A topology τ on a set X is a collection of subsets called open sets. It contains ∅ and X, is closed under arbitrary unions, and is closed under finite intersections. These rules specify which points count as locally near one another without requiring coordinates, lengths, or angles.

f:X→Y is continuous ⇔ f−1(U) is open in X for every open U⊆Y

The inverse image condition says that an open region in the output cannot be produced by tearing the input into a discontinuous selection. A homeomorphism is a continuous bijection with a continuous inverse; it declares two spaces topologically identical. A homotopy is weaker: it continuously deforms one map into another.

HOMEOMORPHICX ≅ YSame space up to bending and stretching.
HOMOTOPY EQUIVALENTX ≃ YEach space can continuously collapse to the other.
SAME HOMOLOGYHk(X) ≅ Hk(Y)Their k-dimensional holes agree.
SAME BETTI NUMBERSβk(X)=βk(Y)The reverse implications generally fail.

Example. A solid coffee mug and a solid torus are homeomorphic in the idealised model: each has one tunnel. A circle and an annulus are not homeomorphic (their local dimensions differ) but the annulus deformation retracts onto the circle, so they have the same homotopy type and homology.

1.2 WHAT THE BOUNDARY OPERATOR ACTUALLY DOES

Boundary means “take the oriented codimension-one faces”

A k-chain is a formal linear combination of oriented k-simplices. For example, 2t₀−t₁ is a 2-chain made from two oriented triangles. The boundary operator ∂k:Ck→Ck−1 lowers dimension by one: it replaces every k-simplex by the signed sum of its (k−1)-dimensional faces, then extends linearly to every chain.

∂k[v₀,…,vk] = Σki=0(−1)i[v₀,…,v̂i,…,vk]
Why the signs?

Adjacent faces inherit opposite orientations, so internal faces cancel when simplices are added. This guarantees ∂k−1∂k=0: once a boundary has been taken, its own boundary is empty.

1.3 KERNEL, IMAGE, CYCLE, BOUNDARY

Kernel asks what disappears; image asks what can be produced

LINEAR ALGEBRA

Kernel of T

ker T = {x | T(x)=0}

The kernel contains every input that the map sends to zero. For ∂1, an edge chain lies in the kernel exactly when all endpoint contributions cancel. It is therefore a closed loop or a sum of loops.

LINEAR ALGEBRA

Image of T

im T = {T(x) | x in the domain}

The image contains every output that the map can actually produce. For ∂2, it consists of edge cycles that occur as perimeters of filled 2-chains.

TOPOLOGY

Cycles and boundaries

Zk=ker ∂k,   Bk=im ∂k+1

Cycles have no boundary. Boundaries are cycles produced by a higher-dimensional filling. Because ∂²=0, every boundary is automatically a cycle: Bk⊆Zk.

…→C₂∂₂→C₁∂₁→C₀∂₀→0
CLOSED k-CHAINSZk = ker ∂k

Nothing remains after taking their boundary.

FILLABLE k-CYCLESBk = im ∂k+1

They are perimeters of higher-dimensional chains.

CYCLES MODULO FILLINGSHk = Zk/Bk

Two cycles represent the same class if their difference is a boundary.

What does the quotient mean? Homology deliberately treats a fillable loop as zero. It also identifies two loops if they differ only by the boundary of a strip between them. What survives is not one particular drawing of a loop, but its equivalence class under continuous deformation through the complex.

β₀Connected componentsIndependent pieces of the space.
β₁Independent tunnelsClosed 1-cycles not filled by 2-chains.
β₂Enclosed voidsClosed 2-cycles not filled by 3-chains.
χEuler characteristicΣ(−1)ᵏfₖ = Σ(−1)ᵏβₖ.

1.4 COMPLETE MATRIX EXAMPLE

The same edge cycle can be a hole or a boundary

Orient e₀₁=[v₀,v₁], e₁₂=[v₁,v₂], e₀₂=[v₀,v₂], and e₂₃=[v₂,v₃]. Each column of B₁ records the signed endpoints of one edge. If t₀₁₂ exists, the column B₂ records its oriented perimeter e₀₁+e₁₂−e₀₂.

RUNNING COMPLEX Kv₀v₁v₂v₃e₀₁e₁₂e₀₂e₂₃
Orange arrows orient c=e₀₁+e₁₂−e₀₂.c is not a boundary: [c]≠0 in H₁
B₁ : C₁ → C₀
e₀₁e₁₂e₀₂e₂₃
v₀-10-10
v₁1-100
v₂011-1
v₃0001
There is no 2-simplex columnim B₂ = {0}
rank B₁=3dim ker B₁=4−3=1rank B₂=0β₁=dim ker B₁−rank B₂=1

Direct check: B₁B₂=0. Euler check: χ=4−4=0=β₀−β₁.

2.1 SIMPLICES AND CLOSURE UNDER FACES

A simplicial complex is a consistent collection of building blocks

A k-simplex is determined by k+1 affinely independent vertices. An abstract simplicial complex K is a family of nonempty finite vertex sets with one essential rule:

σ∈K and ∅≠τ⊆σ ⇒ τ∈K

If a triangle belongs to K, all three edges and all three vertices must also belong to K. Geometrically, two simplices may intersect only in a common face. These requirements prevent missing edges and invalid overlaps, so the collection glues into a well-defined topological space |K|.

0-SIMPLEXvertex{v₀}
1-SIMPLEXedge{v₀,v₁}
2-SIMPLEXtriangle{v₀,v₁,v₂}
3-SIMPLEXtetrahedron{v₀,v₁,v₂,v₃}
Important distinction.

The boundary of a 2-simplex is three 1-simplices; the 2-simplex itself is the filled triangle. Drawing only its three edges gives a 1-dimensional cycle, not a 2-simplex.

2.2 FOUR WAYS TO BUILD A COMPLEX FROM DATA

The data type determines the right combinatorial scaffold

Point clouds do not arrive with edges or faces. A construction rule decides which samples should be connected at a scale. Images already have square pixels, so a cubical model is often more natural than triangulation.

VIETORIS-RIPS

Pairwise proximity

σ∈VRr(P) ⇔ d(p,q)≤2r for every p,q∈σ

Build a threshold graph, then fill every clique. Fast to define, but high-dimensional cliques can make it large.

ČECH

Common intersections

σ∈Cr(P) ⇔ ⋂p∈σB(p,r)≠∅

The complex is the nerve of metric balls. Under the usual good-cover conditions, it has the homotopy type of their union.

ALPHA / DELAUNAY

Empty circumspheres

σ∈Del(P) ⇔ an empty ball has vertices σ on its boundary

The alpha complex Aα(P) keeps Delaunay simplices with a suitable empty circumball of radius at most α. It is usually much sparser than Rips.

CUBICAL

Pixels and voxels

Q = I₁×···×Id, with each Ij a point or interval

Squares and cubes are native cells, so images and volumes need no triangulation. A gray-value threshold gives a natural cubical filtration.

ConstructionBest matched toMembership testMain trade-off
Čechmetric point cloudscommon intersection of ballsfaithful union-of-balls topology; intersections are costly
Vietoris-Ripsdistance matricesall pairwise distances passeasy clique construction; can grow combinatorially
Alpha / Delaunaylow-dimensional Euclidean pointsempty circumball plus scale boundsparse and geometric; expensive in high ambient dimension
Cubicalimages, voxels, gridsthresholded square or cube cellspreserves native grid; not designed for arbitrary point clouds

2.3 FILTRATION AND PERSISTENT HOMOLOGY

Persistent homology follows the same feature through a growing family of spaces

A filtration is a nested sequence K₀⊆K₁⊆⋯⊆Kₙ. The containment is essential: once a simplex appears, it remains, and every face must appear no later than its cofaces. An inclusion Ki↪Kj maps cycles in the smaller complex to cycles in the larger one and therefore induces a linear map on homology.

Hki,j = im(Hk(Ki) → Hk(Kj))
Why take an image?

Hk(Ki) contains features present at time i. Only classes whose mapped representative remains nonzero at time j land in the image. Thus Hki,j is precisely the vector space of k-dimensional features born by i and still alive at j. Its dimension βki,j is the persistent Betti number.

BIRTH

A new independent class appears

An edge can join the endpoints of a path and create a 1-cycle; algebraically, dim ker ∂₁ increases without a matching increase in im ∂₂.

DEATH

The class becomes zero later

A 2-simplex can fill that cycle; its perimeter enters im ∂₂, so the previous class is quotiented out.

PERSISTENCE

Lifetime = death − birth

Long intervals are stable across many scales. Short intervals may reflect fine structure or noise; persistence alone does not decide which.

K3 Add edge e₀₂v₀v₁v₂
CURRENT HOMOLOGYβ₀ = 1, β₁ = 1

The closing edge creates a 1-dimensional cycle.

H₀
[0,∞)
H₀
[0,1)
H₀
[0,2)
H₁
[3,4)

2.4 COMPUTING PERSISTENCE

Column reduction pairs creators with destroyers

Order all simplices by filtration time, with every face before its coface, and assemble the boundary matrix D. Over 𝔽₂, orientation signs disappear because −1=+1. Reduce columns left to right until no two nonzero columns have the same lowest nonzero row.

Filtered boundary matrix D over 𝔽₂
v₀v₁v₂e₀₁e₁₂e₀₂t₀₁₂
v₀0001010
v₁0001100
v₂0000110
e₀₁0000001
e₁₂0000001
e₀₂0000001
t₀₁₂0000000
REDUCE(D)R ← D for j = 1,…,n: while ∃ℓ<j with low(Rℓ)=low(Rj): Rj ← Rj + Rℓ (mod 2)

If reduced column Rj is nonzero, (low(Rj),j) pairs a birth simplex with the simplex that kills its class. A zero column creates a class that may be paired later.

v₁ ↔ e₀₁: one H₀ class diesv₂ ↔ e₁₂: another H₀ class diese₀₂ ↔ t₀₁₂: H₁ interval [3,4)v₀ remains unpaired: H₀ interval [0,∞)

3.1 INSERTION AND DELETION

A backward inclusion represents deletion in forward time

X₀↪X₁↩X₂↪···↩Xₙ

The arrow always points from a smaller space into a larger one. Therefore X₁←X₂ means X₂⊆X₁: as the index advances from 1 to 2, simplices were deleted. Applying Hk gives vector spaces linked by maps in the same arrow directions. This is a representation of an An-type quiver.

Hk(X₀) ↔ Hk(X₁) ↔·· ↔ Hk(Xₙ)
Why can it still produce a barcode?

Every finite-dimensional zigzag module over a field decomposes into interval modules. For an interval [b,d], I[b,d]i=𝕜 when b≤i≤d and 0 otherwise; every map inside the interval is the identity. The barcode lists exactly these indecomposable summands.

3.2 COMPLETE H₀ EXAMPLE

Add an edge, then delete it

K₀abβ₀=2

two isolated components

→insert eab
K₁abβ₀=1

the edge merges them

←delete eab
K₂abβ₀=2

two components again

𝕜²[1 1] →𝕜← [1 1]𝕜²

Each map sends both component generators to the single connected-component generator in K₁, hence the row matrix [1 1]. Choose one generator on each side that maps to the middle class; together they form I[0,2]. The remaining kernel generator on each endpoint produces I[0,0] and I[2,2].

INTERVAL DECOMPOSITIONI[0,2] ⊕ I[0,0] ⊕ I[2,2]

One component class spans all three indices. Each disconnected endpoint contributes one additional single-index class.

[0,2][0,0][2,2]0        1        2
Sliding windows

New samples enter while old samples leave.

Dynamic networks

Edges and vertices can fail, recover, or change membership.

Level-set zigzags

Adjacent level and interlevel sets encode both merges and splits.

4.1 COMBINATORIAL HODGE LAPLACIAN

The Laplacian measures two ways a k-chain can fail to be harmonic

Lk = BkTBk + Bk+1Bk+1T = Lkdown + Lkup

Here, Bk is the k-th boundary matrix representing the boundary operator ∂k: Ck → Ck−1 (mapping oriented k-simplices to their boundary (k−1)-faces), and Bk+1 is the boundary matrix from (k+1)-simplices to k-simplices. Their transposes BT act as coboundary (adjoint) operators.

For a k-chain x, the quadratic energy has a direct meaning:

xTLkx = ‖Bkx‖² + ‖Bk+1Tx‖²

The first term detects a nonzero boundary: flow is not closed at shared (k−1)-faces. The second detects interaction with (k+1)-cofaces: the chain has a component that can be explained by higher-dimensional fillings. A zero-energy chain is both closed and orthogonal to all boundaries; it is the unique harmonic representative of a homology class.

BkTBk

Lower adjacency: k-simplices meet along a (k−1)-face.

Bk+1Bk+1T

Upper adjacency: k-simplices bound the same (k+1)-simplex.

DISCRETE HODGE THEOREMker Lk ≅ Hk(K)

The multiplicity of eigenvalue zero is βk.

L₁=B₁ᵀB₁
e₀₁e₁₂e₀₂e₂₃
e₀₁2-110
e₁₂-121-1
e₀₂112-1
e₂₃0-1-12
1-LAPLACIAN SPECTRUM
λ00
λ11
λ23
λ34

One zero mode means β₁=1. Its eigenvector is the circulation around the unfilled triangle.

Ck = im BkT ⊕ ker Lk ⊕ im Bk+1

4.2 SHEAF AND CONNECTION LAPLACIANS

Sheaves compare vector-valued data only after transporting it to a common space

A cellular sheaf F assigns a vector space F(v) to every vertex, a vector space F(e) to every edge, and a linear restriction map Fv⊲e:F(v)→F(e) for every incident vertex-edge pair. The direct sum of vertex stalks is C⁰(G;F). For an oriented edge e:u→v, the coboundary measures disagreement after both endpoint values are mapped into the same edge stalk:

(δx)e = Fv⊲exv − Fu⊲exu,    LF=δTδ
WORKED ONE-EDGE CONNECTION SHEAFe : u → vF(u)=ℝ²F(v)=ℝ²xᵤR₉₀xᵥ

Set Fu⊲e=I and Fv⊲e=R₉₀. Then δ=[−I R₉₀]. The two endpoint vectors agree globally only when xu=R₉₀xv.

δ = [−I R₉₀]
u₁u₂v₁v₂
-100-1
0-110
Lᶠ = δᵀδ
1001
01-10
0-110
1001
ENERGYxTLFx = ‖R₉₀xv−xu‖²

Zero energy means perfect agreement after transport.

CONNECTION LAPLACIANFv⊲e∈O(d)

Orthogonal restrictions rotate or reflect vectors without changing their lengths; the Laplacian is an nd×nd block matrix.

4.3 PERSISTENT LAPLACIAN — FULL WORKED EXAMPLE

Build a Laplacian whose kernel is exactly the homology that survives from X to Y

Let X be the unfilled triangular cycle with a tail, and let Y=X∪{t₀₁₂} add the triangular face. We compute the degree-one persistent Laplacian for the pair X⊆Y.

EARLY COMPLEX X
H₁(X)=span([c])

c=e₀₁+e₁₂−e₀₂ is closed and not yet fillable.

LATER COMPLEX Y
H₁(Y)=0

The new face satisfies ∂₂t₀₁₂=c, so [c] maps to zero.

PERSISTENT GROUPH₁X,Y=im(H₁(X)→H₁(Y))=0

No one-dimensional class survives across the pair.

Step 1 — restrict the later chains.

C₂X,Y={d∈C₂(Y) | ∂₂Yd∈C₁(X)}. Here the only 2-chain is t₀₁₂ and its boundary lies entirely in X, so C₂X,Y=span(t₀₁₂) and ∂₂X,Y is represented by B₂=[1,1,−1,0]T.

Δ₁X,Y = (B₁X)TB₁X + B₂X,Y(B₂X,Y)T
down term (B₁ˣ)ᵀB₁ˣ
2-110
-121-1
112-1
0-1-12
+
upper persistent term B₂ˣʸ(B₂ˣʸ)ᵀ
11-10
11-10
-1-110
0000
=
Δ₁ˣʸ
3000
030-1
003-1
0-1-12
Step 2 — read the result.

The spectrum is {1,3,3,4}. There are no zero eigenvalues, hence dim ker Δ₁X,Y=0=β₁X,Y, exactly matching the persistent-homology calculation. In contrast, Δ₁X,X=B₁TB₁ has spectrum {0,1,3,4}; its zero mode is the loop before it is filled.

Persistent Hodge theorem. ker ΔqX,Y≅HqX,Y. The zero-eigenvalue multiplicity recovers the persistent Betti number, while changes in the positive eigenvalues describe geometry that a barcode does not contain.

OperatorActs onWhat its kernel recordsWhat the positive spectrum adds
Graph L₀vertex signalsconnected components H₀connectivity and spectral gap
Hodge Lkk-simplex signalsHk(K)lower and upper adjacency geometry
Sheaf LFstalk-valued signalsconsistent global sectionsrestriction-aware disagreement energy
Persistent ΔqX,Yq-chains across X⊆YHqX,Yspectral change across scales