The Invariant

On topology and the properties that survive deformation

Topology asks one question: what properties survive when you stretch, bend, and twist—but never tear or glue?

A coffee cup is a donut. Not metaphorically. Topologically. You can continuously deform one into the other without cutting or pasting. They both have exactly one hole. A sphere, on the other hand, is not a donut. No amount of stretching will create a hole where there wasn't one. The question topology asks is: if shape doesn't matter—if distance, angle, and curvature are all negotiable—what does matter? What is left?

The answer turns out to be a number.

I. Euler's Formula

Take any convex polyhedron. Count its vertices, edges, and faces. Compute V − E + F. This is the Euler characteristic, and it is always 2. Always. No matter the shape.

V = 4   E = 6   F = 4    χ = V − E + F = 2

Euler discovered this in 1750. Every convex polyhedron gives χ = 2. It does not matter if you have 4 faces or 4,000. Stretch a tetrahedron until it looks like a cube—χ stays. Inflate it into something with a thousand tiny faces—χ stays. This number is topology's signature: it sees through shape to structure. It is the first topological invariant.

But why 2? And what happens when you poke a hole?

II. Genus and Holes

The Euler characteristic of a closed orientable surface depends on one thing: how many holes it has. The number of holes is called the genus, written g. The formula is:

χ = 2 − 2g

A sphere has genus 0: χ = 2. A torus (donut) has genus 1: χ = 0. A double torus has genus 2: χ = −2. Each hole reduces χ by exactly 2. Holes are topologically irreversible—you cannot smooth them away without tearing.

g = 0    χ = 2 − 2(0) = 2    sphere

The classification theorem for closed orientable surfaces says: every such surface is determined entirely by its genus. A sphere with g handles. That is it. All of two-dimensional topology collapses to a single integer. This is one of the most elegant results in mathematics—an infinite variety of shapes, classified completely by counting holes.

III. Graph Coloring on Surfaces

How many colors do you need to color a map so that no two adjacent regions share a color? On a plane (or sphere), the answer is four—the four-color theorem, conjectured in 1852 and proved in 1976 by computer-assisted exhaustion.

But on a torus, you may need up to seven colors. The Heawood conjecture, proved by Ringel and Youngs in 1968, gives the chromatic number for any surface of genus g ≥ 1. The maximum number of colors depends not on the geometry of your map but on the topology of the surface it lives on.

Click the canvas below to add regions. They are automatically colored with the minimum colors needed so that no two neighbors share a color.


Topology is the mathematics of identity under transformation. Strip away size, angle, curvature—what remains? The holes. The connectivity. The way a space wraps around itself.

Poincaré asked in 1904 whether a simply connected, closed 3-manifold must be a 3-sphere. It took 99 years and Grigori Perelman's proof in 2003—using Richard Hamilton's Ricci flow to deform manifolds toward their simplest form—to answer: yes. The deepest questions about shape turn out to be questions about what cannot be smoothed away.

The invariant is not the shape. The invariant is what survives all possible deformations of the shape. In topology, that is the genus. In mathematics, that is the Euler characteristic. In everything else—identity, memory, meaning—the question is the same: what remains when everything that can change has changed?