Building Spaces

Simplicial complexes, CW complexes, and the Euler characteristic

From Points to Spaces

Build a surface from pieces you can count: points, edges, triangles, and glued-on disks. However you cut it up, one number built from those counts never changes.

Simplicial Complex Builder

Click to place vertices, join them with edges, and fill in triangles, or load a preset. Watch the counts V, E, F and the Euler characteristic χ = V − E + F update as you build.

f-vector
(0, 0, 0)
Euler characteristic
0 − 0 + 0 = 0
Go deeper:Simplicial Complex Builder

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.

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

Pick a surface and step through its cells: one vertex, then loops, then a disk glued along a boundary word. Compare the words: aba⁻¹b⁻¹ makes a torus, and aa makes the projective plane RP².

Step 1 of 4
Place a single 0-cell (vertex)
Cell count
0 · 0 · 0
χ = 0 − 0 + 0 = 0
Go deeper: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².

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

Pick a surface and drag the refinement slider: V, E, and F all change, but χ stays put. Then try the connect sum and check that χ(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

Go deeper: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.

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 build spaces from vertices, edges, and triangles.
  • CW complexes glue cells along boundary words and need far fewer pieces.
  • χ = V − E + F is the same for every triangulation of a surface.
  • For orientable surfaces, χ = 2 − 2g, where g counts the handles.

Spot a mistake or have an idea?

Search