The number that survives any deformation
A coffee cup and a donut are the standard joke of topology because, to a topologist, they are the same object — one can be continuously deformed into the other without cutting or gluing, since both have exactly one hole. What makes two shapes 'the same' in this sense is homeomorphism: a continuous, invertible deformation between them. Stretching, bending, and squashing are all allowed; cutting a new hole or sealing an existing one is not. The number of holes that survives every such deformation is called the genus, and it is the single most important invariant for classifying orientable closed surfaces.
Euler characteristic ties genus to a countable formula
Genus can be computed from any polygonal mesh drawn on the surface — vertices, edges and faces — via the Euler characteristic: χ = V − E + F. For any closed, orientable surface, χ and genus are locked together by a simple relation:
χ = 2 − 2g g = 0 (sphere) → χ = 2 g = 1 (torus / donut) → χ = 0 g = 2 (double torus) → χ = −2 g = 3 (triple torus) → χ = −4
This means you never actually need to count holes by eye — mesh the surface any way you like, coarse or fine, convex or twisted, and V − E + F comes out the same every time. That invariance under re-meshing is exactly why χ is useful: it is a property of the surface itself, not of any particular way you happened to draw it.
Building each surface from a fundamental polygon
Every closed orientable surface can also be built by taking a single polygon and gluing its edges together in pairs according to a specific pattern, called its fundamental polygon. A square with edges glued as aba⁻¹b⁻¹ (opposite edges identified with a flip) produces a torus; the genus-2 double torus comes from an octagon glued as a₁b₁a₁⁻¹b₁⁻¹a₂b₂a₂⁻¹b₂⁻¹ — each additional handle adds another matched pair of edge-letters to the word. This is more than a curiosity: it is literally how a torus is constructed from a flat sheet of paper (roll it into a cylinder, then bend the cylinder around and glue its two circular ends together), and it generalises cleanly to any genus by chaining more handles.
Why genus, not just 'number of holes', is the right invariant
Talking informally about 'the number of holes' works fine for simple cases but breaks down for complicated or self-intersecting shapes, which is why topologists prefer the precise, computable Euler characteristic. It is also what lets the classification of surfaces be a completely closed, finished theorem: every closed, connected, orientable surface is homeomorphic to exactly one sphere-with-g-handles for some genus g ≥ 0 — full stop, no exceptions. (Non-orientable surfaces like the Klein bottle need a separate, parallel classification by non-orientable genus, since a single genus number isn't enough to distinguish an orientable surface from a non-orientable one with the same χ.)
Where genus shows up beyond pure geometry
Genus isn't just a shape-sorting exercise — it appears throughout mathematics and physics wherever a system's topology, rather than its exact geometry, controls the answer. In complex analysis, the genus of a Riemann surface controls how many independent holomorphic differentials it admits. In string theory, summing over surfaces of every genus (the string 'worldsheet' at each order of interaction) is how perturbative scattering amplitudes are organised. And in everyday computational geometry, genus-checking is a standard sanity test for 3D-printable or watertight meshes — an unexpected change in genus after a mesh-repair operation usually means a hole was accidentally sealed or a handle accidentally introduced.
Frequently asked questions
What exactly does 'genus' measure?
The number of independent handles or holes a closed, orientable surface has — 0 for a sphere, 1 for an ordinary torus (donut), 2 for a double torus (figure-eight-shaped donut), and so on. It is a topological invariant, meaning it doesn't change under any continuous stretching or bending, only under cutting or gluing.
Why are a coffee cup and a donut considered 'the same' shape in topology?
Because both have exactly one hole (genus 1) and one can be continuously deformed into the other — the cup's handle becomes the donut's hole, and the cup's body can be squashed and reshaped into the donut's ring — without ever cutting the surface or gluing new points together. They are homeomorphic.
How is Euler characteristic related to genus?
By the formula χ = 2 − 2g for closed orientable surfaces. You compute χ from any polygonal mesh drawn on the surface as V − E + F (vertices minus edges plus faces), and the result is always the same regardless of how you mesh it — which is exactly what makes it a reliable way to read off the genus.
Try it live
Everything above runs in your browser — open Torus & Surface Genus and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Torus & Surface Genus simulation