Skip to content

Topology: Shape Without Measurement

Forget lengths, angles and distances. Keep only what survives stretching and bending without tearing. What is left is a handful of surprisingly powerful ideas, and a coffee cup that is secretly a doughnut.

14 min readReadInteractive

Look at the London Underground map. It is wrong about almost everything: distances, angles, even which station is north of which. Yet you can plan a journey with it perfectly, because the map keeps the one thing that matters for the journey: which stations connect to which. A map that gets the geometry wrong and the connections right is a topological map, and the reason it works is the reason this whole field exists.

Topology asks what a shape is when you refuse to measure it. Imagine every object is made of perfectly stretchy rubber, and you may pull, squash and twist but never tear or glue. A sphere and a cube are the same. A coffee mug and a doughnut are the same, because you can squash the mug's body down into the doughnut's ring and the handle becomes the hole. A sphere and a doughnut are different, and no amount of stretching will change that. The graduate's trained question about any shape is: how many holes, of what kind, and can I prove it?

This piece takes six ideas: counting with Euler, open sets, compactness, winding numbers, one-sided surfaces, and a modern use that finds holes in data. Each has a proof sketch and something to play with.

The course in one box
Who takes it
Mathematics majors, usually in year 3, and physicists headed for field theory or condensed matter. MIT's 18.901 Introduction to Topology (taught by James Munkres, whose textbook is the standard one) covers point-set topology and the fundamental group. Many programmes teach point-set topology first and algebraic topology in a second course.
What it is for
Defining continuity, closeness and shape without any ruler, then telling shapes apart by invariants such as holes.
Comes after
Real Analysis (34/72), whose open sets, limits and compactness it generalises.
Leads to
Nothing in this series requires it, but it underlies Differential Geometry (34/77), the geometry general relativity is written in, and it helps in Complex Analysis (34/74) and Quantum Mechanics (34/83).
What this piece gives you
You will not be able to compute a fundamental group of a general space. You will see why a doughnut is not a sphere, what an open set is, why compactness matters, and how to count holes in data. Easier first read: Topology: The Shape of Space (12/10). This one goes further with proofs and computed counts.

A mug is a doughnut: counting holes with Euler

To tell shapes apart you need something that does not change when you stretch. Such a quantity is an invariant. The first one anyone found is a counting trick. Cover a surface with a net of corners (vertices V), edges (E) and faces (F), then compute V − E + F. For every solid built from flat faces without holes, this is 2.

V − E + F = 2for any net drawn on a sphere; for a surface with g holes it is 2 − 2g

A cube: 8 − 12 + 6 = 2. A tetrahedron: 4 − 6 + 4 = 2. An icosahedron: 12 − 30 + 20 = 2. Now cover a doughnut with a grid of squares, say 3 by 4: 12 vertices, 24 edges, 12 faces, and 12 − 24 + 12 = 0. Every grid on a torus gives 0, whatever its size. The number is a property of the surface, not of the net.

Proof sketch · why a sphere always gives 2

Draw the net on a sphere. Pick a set of edges that connects all V vertices without making a loop: a spanning tree, which always has exactly V − 1 edges. Now draw a second net on the faces: put a dot in each face and connect two dots whenever their faces share an edge that is not in the tree. These dual edges form a connected tree with F dots, because the first tree has no loop and so cannot cut the sphere into pieces; it has F − 1 edges. Every edge of the original net is used exactly once, in one tree or the other: E = (V − 1) + (F − 1). The real trick is splitting the edges between a tree and its dual. Rearrange: V − E + F = 2. On a torus a tree-and-dual-tree split leaves two extra edges that go around the two ways of the hole, which is where the 0 comes from.

Interactive · Count V − E + F
Doughnut grid: squares around
Doughnut grid: squares through the hole
Surface with g holes

The solids are the five Platonic solids. The doughnut grid is an m × n net of squares on a torus: m·n vertices, 2·m·n edges, m·n faces. The last line uses the formula 2 − 2g.

Change the grid and the answer stays 0. Move the hole slider: one hole gives 0, two holes give −2, three give −4. A surface whose Euler number differs from another's cannot be stretched into it, so a sphere (2) is never a doughnut (0), and a doughnut is never a two-holed pretzel (−2). A mug has one hole, so it matches the doughnut.

Open sets: closeness without distance

In real analysis, "close" means "within a small distance". Topology throws the ruler away and keeps only a list of which regions count as open. A set is open if every point in it has some breathing room: you can move a little in any direction and stay inside. On the number line, (0, 1) is open and [0, 1] is not, because standing at 1 you cannot step right without leaving.

Any collection of subsets can be a topology if it passes three tests: the empty set and the whole space are in it, any union of open sets is open, and the intersection of any two (hence any finite number) of open sets is open. That is the entire definition. Everything else follows: a function is continuous when the set of inputs landing in any open set is itself open. No distances appear.

Proof sketch · why intersections are only finite

On the line, the open intervals (−1/n, 1/n) for n = 1, 2, 3, … are each open, but all of them at once intersect in just {0}: a single point, which is not open. The real trick is that an infinite intersection can squeeze open sets down to nothing with room to spare, so the axiom allows only finitely many. Unions have no such problem: a union only adds room.

The payoff is flexibility. A set of three points {1, 2, 3} has 8 possible subsets. Choose which of them to call open and see if the choice is a legitimate topology.

Interactive · Is this a topology on {1, 2, 3}?

Tap a subset to toggle it. The page tests the three rules over all pairs and reports the first failure. "Separated" counts pairs of points that have disjoint open neighbourhoods; it tells you how fine the topology is.

With every subset open ("discrete"), all three pairs of points are separated: each point sits in its own tiny island. With only {} and the whole set open ("trivial"), no pair is separated and no function that picks one point out is continuous. The "two singletons" preset fails: {1} and {2} are open but their union {1, 2} is missing. The nested chain is legitimate, but separates nothing: you can tell 1 from 2 only from one side.

Compactness: when infinity can be tamed by finitely many pieces

A cover of a set is a family of open sets whose union contains it. A set is compact when every cover has a finite subfamily that still covers it. In practice, in familiar spaces, compact means closed and bounded: [0, 1] is compact, (0, 1) and the whole line are not. This sounds like paperwork. It is the property that makes theorems true.

The example that makes it concrete is (0, 1). Use the open sets Uk = (1/(k + 2), 1) for k = 0, 1, 2, …: that is (1/2, 1), then (1/3, 1), then (1/4, 1). Together they cover all of (0, 1), since any point is above some 1/(k + 2). But take any finite handful and the largest set in it still leaves an uncovered strip down by 0. No finite subfamily covers. Now add the endpoint, forming the closed interval [0, 1]: the point 0 needs a set around it, say V = (−w, w). Then V together with a single Uk covers everything once 1/(k + 2) < w. Two sets suffice.

Proof sketch · why compactness gives a maximum

A continuous function on [0, 1] attains its largest value. Suppose it did not. For each x, the sets where f < f(x) + 1 cover [0, 1]. Take a finite subcover: finitely many bounds, so f is bounded, and the least upper bound M is never reached. Then 1/(M − f) is continuous, hence bounded, which is absurd since f gets arbitrarily close to M. The real trick is that "finite" lets you take a maximum over the pieces. On (0, 1) the function 1/x has no maximum, precisely because (0, 1) is not compact.

Interactive · Cover it with finitely many
Use sets U₀ … UN−1 on (0, 1)
Closed interval: width w of the set around 0

Top bar: the open interval (0, 1) with N of the sets. The orange strip is what is still uncovered, always between 0 and 1/(N + 1). Bottom bar: [0, 1] with V = (−w, w) plus one Uk. Slide w down to see the one Uk needed grow.

With N = 5 sets, the union is (1/6, 1) = (0.167, 1) and the strip (0, 0.167] is left. With 200 sets the strip is (0, 0.0050] and still not empty; it never will be. In the closed case with w = 0.05, you need 1/(k + 2) < 0.05, so k + 2 > 20, so k = 19: just two sets, V and U19, cover [0, 1].

Loops that cannot shrink: the winding number

Open sets tell you about closeness. To see holes, topologists use loops. Take a loop in the plane with one point removed. A loop that does not go round the missing point can be shrunk to nothing. A loop that goes once round it cannot: the missing point is in the way. Count how many times a loop circles the point, signed by direction, and you have the winding number.

Proof sketch · why you cannot shrink a loop around a hole

As you walk the loop, track the angle from the missing point to you; the winding number is the total angle gained divided by 2π. Deform the loop a little, and the total angle changes a little. But the winding number is always a whole number, and a whole number that changes only a little cannot change at all. The real trick is that an integer-valued quantity is rigid. It can jump only if the loop passes through the point, which is forbidden. So a loop with winding number 1 can never shrink to a point (winding number 0).

That one fact proves Brouwer's fixed-point theorem in the plane: any continuous map of a disc to itself fixes some point. If it did not, you could build a continuous map pushing the whole disc onto its edge circle, leaving the edge fixed. That would shrink a winding-number-1 loop, on the edge, across the disc to a point, which is impossible.

Interactive · Count the turns
Point, x
Point, y

The winding number is computed by summing the small signed angle changes seen from the point as you walk 2,000 steps around the curve, then dividing by 2π. If the point is within 0.03 of the curve, the number is not defined and the page says so.

Circle once with the point at the centre: winding number 1. Slide the point outside the circle and it drops to 0. For the loop with an inner loop, the points in the small inner loop get 2, the points between get 1, outside gets 0. For the figure eight, one lobe gives +1 and the other −1: you walk one lobe clockwise and the other anticlockwise. The same number is Cauchy's integral from 74 in disguise: (1/2πi) ∮ dz/(z − p) counts exactly this.

One-sided surfaces and the classification of surfaces

Take a strip of paper, give one end a half-twist (flip it over), and tape the ends together. The result, a Möbius strip, has one side and one edge: an ant can walk along it and return upside down having never crossed an edge. The discoverers, August Möbius and Johann Listing, found it independently in 1858. A surface like this is non-orientable: you cannot consistently say which way is "up" across it.

Every closed surface (no edge, finite) is built from the same few parts: a sphere with g handles added (g = 0 is the sphere, g = 1 the doughnut), or a sphere with some Möbius-style cross-caps added. That is the classification of closed surfaces: Euler number and orientability tell you which one you have. It is one of the few places in topology where the full answer is known and fits on a page.

Proof sketch · counting laps to decide one side or two

Imagine the strip with t half-twists. Walk along the edge once around. If t is even you come back to the same edge, and the strip has two edges and two sides. If t is odd you come back on the other edge, so you must go around twice to close up: one edge, one side. The real trick is that a half-twist swaps the two sides, and only the parity of the number of swaps matters.

Interactive · Twist, glue, cut down the middle
Half-twists t

The strip is drawn unrolled, as seen from above, with its ends to be glued. Blue: front side showing. Orange: back showing. The counts come from simulating laps: a lap swaps the edges when t is odd.

For t = 1 the readout says one edge, one side, and one piece after cutting along the middle. That piece is not a thinner Möbius strip. It is one band, twice as long, with two full twists. For t = 2 (a full twist, which is the same as no twist for sidedness) the cut gives two separate bands, linked once through each other. That a cut can turn one object into one longer one, or into two linked ones, depending on a parity, is a good taste of why topology is surprising.

Three dimensions have a famous version of the classification. Henri Poincaré asked (in 1904, the date usually given) whether a closed 3-dimensional space with no holes (every loop shrinkable) must be the 3-sphere. The Poincaré conjecture was proved by Grigori Perelman in preprints posted in 2002 and 2003, building on Richard Hamilton's Ricci flow. The Clay Mathematics Institute named it one of seven Millennium Problems in 2000, and it remains the only one solved. Perelman declined both the Fields Medal (2006) and the million-dollar prize (2010).

Seeing holes in data

Modern applications ask a topologist's question of a cloud of dots: is it a ring? Two rings? A blob? Real data is noisy, so counting holes in the dots is not enough. The method of persistent homology grows a ball of radius ε around every point and joins any pair of points whose balls touch (two points within distance ε). Triples that are all joined get filled in. As ε grows, components merge and holes appear and fill. A true feature survives across a wide range of ε; noise appears and vanishes in a flash.

The counts are the Betti numbers: β₀ is the number of connected pieces, β₁ the number of independent loops (holes). The page computes them exactly, from the matrices of the joined-up shape, with arithmetic mod 2.

Interactive · Hunt for the hole
Join points closer than ε

Illustrative data: points on circles with small deterministic jitter, or scattered in a disc. Edges join points closer than ε; every triangle whose three sides are present counts as filled. β₁ = (edges − rank of the edge-vertex map) − rank of the triangle-edge map, found by exact elimination over mod-2 arithmetic.

For the ring of 16 points, the neighbouring points are 0.39 apart. As ε crosses about 0.42 everything connects (β₀ drops to 1) and one hole (β₁ = 1) appears. It stays until ε reaches about 1.82, when triangles fill the middle. That long life is the signal: this cloud is a ring. For the random blob the holes that pop up near ε = 0.70 and 0.84 last only about 0.1 each: noise.

What a graduate just sees

  • Shape is what survives stretching without tearing; distances and angles are not part of it.
  • A mug is a doughnut because both have one hole; a sphere has none, so it is a different thing.
  • Counting trick: V − E + F is 2 on a sphere and 2 − 2g on a surface with g holes, however you draw the net.
  • "Open" is the primitive idea; continuity, limits and closeness are all built from it.
  • Compact means any infinite cover can be cut down to a finite one, which is why maxima exist.
  • A whole number that cannot change continuously is a rigid invariant: winding numbers prove loops cannot shrink.
  • A twist can turn two sides into one; orientability is a yes-or-no question about a space.
  • In data, real holes are long-lived and noise is short-lived.

Where it shows up next

  • Differential Geometry (34/77): add smooth structure to topological spaces to get manifolds, the stage on which general relativity is played; the Euler number reappears as total curvature.
  • Complex Analysis (34/74): the winding number is the count inside Cauchy's integral, and the residue theorem is topology in disguise.
  • Quantum Mechanics (34/83) and Condensed Matter Physics (34/87): topological phases of matter are classified by integer invariants that cannot change without a transition.
  • Real Analysis (34/72): compactness is the idea behind the extreme value theorem and the Heine–Borel theorem.
  • In the world: network maps (the Underground map), robot motion planning around obstacles, DNA knotting, and topological data analysis of shapes in biology.

If you want to go deeper

  • 📘 Textbook. James Munkres, Topology (Pearson, 2nd edition, 2000). The standard point-set text, with a second half on the fundamental group.
  • 📘 Textbook. Allen Hatcher, Algebraic Topology (Cambridge University Press, 2002). Freely available from the author's Cornell website; the usual next step.
  • 📘 Gentler. Michael Henle, A Combinatorial Introduction to Topology (Dover reprint). Surfaces and knots with no point-set machinery.
  • 🌐 Free course. MIT OpenCourseWare 18.901 Introduction to Topology (Fall 2004, James Munkres).
The takeaway

Topology throws the ruler away and keeps only closeness, then finds integers that cannot change under stretching: Euler numbers, winding numbers, counts of holes. Those integers are rigid, which is what lets them prove that two shapes differ, that a loop cannot shrink, and that a ring in noisy data is real.

Try this: this week, look at a subway or train map and a real street map of the same city side by side. List what the schematic one throws away and what it keeps. Then count the holes in a pair of scissors, a pretzel and a teapot.

Sources & Further Reading

Sources. The topology axioms, compactness, winding numbers, Brouwer's theorem, classification of surfaces and persistent homology are standard (Munkres; Hatcher). Möbius and Listing found the strip in 1858 (standard history; see MacTutor). Poincaré conjecture: posed 1904, Perelman's preprints 2002 and 2003; Clay Millennium Problems named 2000; Fields Medal 2006 and the prize in 2010 both declined (Clay Mathematics Institute). Course contents: MIT OCW 18.901 page (Munkres, Fall 2004). Every number an interactive shows was computed in node: Euler numbers of the solids; torus grids always give 0; the cover of (0, 1) leaves (0, 1/(N + 1)]; w = 0.05 needs U₁₉; winding numbers by summed angle; ring of 16 points has 0.39 spacing, β₁ = 1 for ε from 0.42 to 1.82; blob holes at ε ≈ 0.70 and 0.84.