Building Spaces

Simplicial complexes, CW complexes, and the Euler characteristic

From Points to Spaces

Algebraic topology begins by breaking spaces into combinatorial pieces we can count and compute with. A simplicial complex is built from vertices, edges, triangles, and their higher-dimensional analogues. A CW complex is assembled by gluing disks along their boundaries.

Both constructions turn continuous geometry into discrete, algebraic data — the first step toward detecting holes with linear algebra.

Simplicial Complex Builder

Build a simplicial complex by hand. Click to place vertices, connect edges, and fill in triangles. Watch the f-vector (V, E, F) and the Euler characteristic χ = V − E + F update live. Try loading a preset to explore classic triangulations.

f-vector
(0, 0, 0)
Euler characteristic
00 + 0 = 0

Key insight: The f-vector counts simplices of each dimension. While adding more triangles changes V, E, and F individually, the Euler characteristic χ = V − E + F depends only on the topology — it is the same for every triangulation of the same surface.

CW Complex Cell Attachment

Build a surface by attaching cells one at a time. Start with a single vertex, attach loops (1-cells), then glue on a disk (2-cell) along a boundary word. The boundary word encodes the topology: aba&supmin;¹b&supmin;¹ gives a torus, aa gives RP².

Step 1 of 4
Place a single 0-cell (vertex)
Cell count
0 · 0 · 0
χ = 00 + 0 = 0

Key insight: CW complexes encode surfaces with very few cells. A torus needs just one vertex, two edges, and one face — far fewer than any triangulation. The boundary word tells you exactly how the 2-cell's boundary wraps around the 1-skeleton.

The Euler Characteristic

The Euler characteristic χ = V − E + F is the simplest topological invariant. It does not change when you refine or coarsen a triangulation. Drag the refinement slider to subdivide — V, E, F all change, but χ stays the same. Try the connect sum to see the additive formula χ(A # B) = χ(A) + χ(B) − 2.

1
4
Vertices (V)
6
Edges (E)
4
Faces (F)
2
χ = V − E + F
Sphereorientable

The simplest closed surface — no holes, like a ball

χ = 2 − 2g = 2 − 0 = 2

Key insight: For orientable surfaces, χ = 2 − 2g where g is the genus (number of handles). The Euler characteristic is the gateway invariant — easy to compute, powerful enough to distinguish surfaces, and a preview of the richer invariants (homology groups) to come.

Key Takeaways

  • Simplicial complexes — built from vertices, edges, and triangles; the combinatorial foundation for computing topology
  • CW complexes — built by gluing cells along boundary words; more economical than triangulations
  • Euler characteristic — χ = V − E + F is a topological invariant; same for all triangulations of a surface
  • Next up — the boundary operator turns these combinatorial building blocks into chain complexes, the engine of homology