Simplicial Complexes
The combinatorial scaffolding that turns point clouds into topology
Overview & Motivation
Take 200 points sampled from a ring (an annulus) and 200 points sampled from a Gaussian blob. Match their means and variances exactly. Now try to tell them apart: a -test sees nothing, PCA sees nothing, and the covariance matrices are indistinguishable. Yet the ring has a hole through its center and the blob doesn’t — and that topological difference can be the signal that matters, whether you’re classifying dynamical regimes, detecting sensor network anomalies, or finding structure in high-dimensional embeddings.
The problem is that point clouds are discrete — they don’t have “holes” in any obvious sense. To detect shape, we need to build a continuous structure on top of the raw data. That structure is a simplicial complex: a systematic way of connecting nearby points with edges, triangles, and their higher-dimensional analogues to create a combinatorial scaffolding that does have well-defined topology.
Once you have a simplicial complex, the full machinery of algebraic topology becomes available — you can count connected components (), detect loops (), find enclosed voids (), and quantify how these features persist across scales. If you’ve used ripser, gudhi, or scikit-tda, you’ve been building simplicial complexes without thinking about it. This topic makes the implicit explicit.
Formal Framework
The Building Blocks: Simplices
Definition 1.
A -simplex is the convex hull of affinely independent points in :
The number is the dimension of the simplex. The points are its vertices.
In concrete terms:
- A 0-simplex is a point
- A 1-simplex is an edge (line segment between two points)
- A 2-simplex is a filled triangle
- A 3-simplex is a filled tetrahedron
- A -simplex for follows the same pattern — it’s the “solid” version of the shape, not just the boundary
Definition 2.
A face of a simplex is any simplex formed by a non-empty subset of its vertices. If is a face of , we write .
A proper face satisfies (i.e., ).
Example 1.
The triangle has seven faces:
- Three 0-faces (vertices): , ,
- Three 1-faces (edges): , ,
- One 2-face (itself):
In general, a -simplex has faces of dimension , for a total of faces.
From Simplices to Complexes
Definition 3.
A simplicial complex is a finite collection of simplices satisfying two properties:
- Face closure: If and , then .
- Intersection property: If , then is either empty or a face of both and .
The first condition says “if you include a triangle, you must include all its edges and vertices.” The second says “two simplices can only intersect along a shared face — no partial overlaps.” Together, these ensure the complex is combinatorially well-behaved.
Definition 4.
The dimension of a simplicial complex is the maximum dimension of any simplex in :
Remark.
In practice, TDA pipelines rarely compute simplices beyond dimension 2 or 3. Computing the full Vietoris-Rips complex is combinatorially explosive — for points, the number of potential -simplices is . Algorithms like Ripser (Bauer, 2021) use clever algebraic shortcuts to compute persistent homology without ever explicitly constructing high-dimensional simplices.
Abstract vs. Geometric
Definition 5.
An abstract simplicial complex on a vertex set is a collection of finite subsets of such that if and , then .
The distinction matters: a geometric simplicial complex lives in with coordinates and convex hulls. An abstract simplicial complex is purely combinatorial — it’s a list of which vertex subsets are “connected.” For TDA, we work with abstract complexes (defined by distance thresholds) and use geometric realizations only for visualization.
The Vietoris-Rips Construction
This is the construction that matters for data analysis. Given a point cloud and a scale parameter, it builds a simplicial complex by connecting points that are “close enough.”
Definition 6.
Let be a finite metric space and . The Vietoris-Rips complex is the abstract simplicial complex whose simplices are:
Equivalently, a subset of points forms a -simplex if and only if every pair of points in is within distance .
Remark.
Čech vs. Vietoris-Rips. The pairwise condition in Definition 6 is what makes VR complexes computationally tractable — you only need the distance matrix. The theoretically “correct” construction is the Čech complex , where a subset forms a simplex if and only if the -balls centered at its points have a common intersection:
The Čech complex satisfies the Nerve Theorem: its geometric realization is homotopy equivalent to the union of balls , which means it captures the “true” topology of the thickened point cloud. The VR complex doesn’t have this guarantee — it can introduce spurious high-dimensional simplices. However, the two complexes bracket each other:
In practice, this means VR and Čech give the same persistent homology up to a constant factor in the scale parameter, and for and in typical datasets they agree exactly. Since the Čech complex requires computing higher-order ball intersections (expensive in high dimensions) while VR needs only pairwise distances, every major TDA library — ripser, gudhi, dionysus — defaults to Vietoris-Rips.
Example 2.
Consider five points in : three forming an equilateral triangle with side length 1.0, and two more at distance 0.6 from each other but far from the triangle.
- At : Only vertices (5 isolated points). No edges.
- At : The distant pair connects (one edge). The triangle vertices are still isolated.
- At : The triangle’s edges appear (three edges forming a cycle). The pair is connected.
- At : The triangle fills in (one 2-simplex). All pairwise distances in the triangle are , so the face closure condition is satisfied automatically.
This progression — vertices → edges → triangles appearing at increasing scales — is the filtration that persistent homology tracks.
Visual Intuition
The visualization below shows a Vietoris-Rips complex built from points sampled near a circle. Drag the slider to watch the complex form:
- At small : only isolated vertices — the complex captures no structure
- At moderate : edges connect nearby points, and you can see the circular arrangement emerge
- At large : triangles fill in, eventually collapsing the loop into a solid disk
What to notice: There’s a “sweet spot” for where the edges form a cycle around the circle but the interior hasn’t filled in yet. At that scale, the complex has a one-dimensional hole — this is the feature that persistent homology will detect. Finding that sweet spot automatically, across all possible scales simultaneously, is exactly what persistent homology does.
Working Code
Building the Vietoris-Rips complex from scratch in Python:
import numpy as np
from itertools import combinations
from scipy.spatial.distance import pdist, squareform
def vr_complex(points, epsilon):
"""Build Vietoris-Rips complex at scale epsilon.
Parameters
----------
points : ndarray of shape (n, d)
Point cloud in R^d.
epsilon : float
Scale parameter. Points within this distance are connected.
Returns
-------
vertices : list of int
edges : list of (int, int)
triangles : list of (int, int, int)
"""
dist_matrix = squareform(pdist(points))
n = len(points)
vertices = list(range(n))
edges = [(i, j) for i, j in combinations(range(n), 2)
if dist_matrix[i, j] <= epsilon]
triangles = [(i, j, k) for i, j, k in combinations(range(n), 3)
if all(dist_matrix[a, b] <= epsilon
for a, b in combinations([i, j, k], 2))]
return vertices, edges, triangles
# Example: 12 points on a circle
theta = np.linspace(0, 2 * np.pi, 12, endpoint=False)
points = np.column_stack([np.cos(theta), np.sin(theta)])
for eps in [0.3, 0.8, 1.2, 1.8]:
v, e, t = vr_complex(points, eps)
print(f"ε={eps:.1f}: {len(v)} vertices, {len(e)} edges, {len(t)} triangles")
ε=0.3: 12 vertices, 0 edges, 0 triangles
ε=0.8: 12 vertices, 12 edges, 0 triangles
ε=1.2: 12 vertices, 24 edges, 12 triangles
ε=1.8: 12 vertices, 42 edges, 64 triangles
At , we get exactly 12 edges forming a cycle — the complex “sees” the circle. By , the complex is nearly complete (66 possible edges, 220 possible triangles) and the topological signal is lost in combinatorial noise. This is why we need persistent homology: it tracks which features are real (they persist across a range of scales) and which are artifacts.
For real-world analysis, use ripser instead of this brute-force construction:
from ripser import ripser
# ripser builds the VR filtration and computes persistence in one step
result = ripser(points, maxdim=1)
print(result['dgms'][0][:5]) # H₀ intervals (connected components)
print(result['dgms'][1][:5]) # H₁ intervals (loops)
Connections & Applications
Simplicial complexes are the combinatorial substrate for nearly everything in topological data analysis:
- Persistent homology tracks how the topology of changes as increases — see Persistent Homology
- Mapper (Singh, Mémoli, Carlsson 2007) builds simplicial complexes via a different construction — nerve of a cover — but the underlying idea is the same: connect data points that are “close” in some sense
- Witness complexes offer a sparser alternative to VR when the point cloud is large: landmark points define the complex, and data points “witness” simplices
- In graph neural networks, the message-passing framework can be generalized from graphs (1-complexes) to simplicial complexes, passing messages along triangles and higher simplices — this is the domain of simplicial neural networks
Connections
- is prerequisite for persistent-homology
- builds on concepts from metric-spaces
References & Further Reading
- book Computational Topology: An Introduction — Herbert Edelsbrunner & John Harer (2010) Chapters 1-3 cover simplicial complexes in full detail
- paper Topology and Data — Gunnar Carlsson (2009) The foundational survey that motivated TDA as a field
- book Elementary Applied Topology — Robert Ghrist (2014) Chapters 1-2 offer an unusually visual approach
- paper Ripser: Efficient Computation of Vietoris-Rips Persistence Barcodes — Ulrich Bauer (2021) State-of-the-art algorithm for VR persistence