Homology
Part 0 · Prelude
Chapter 0.1

The Shape of a Question

Holes, invariants, and the journey ahead

about 35 min

… geometry is the art of reasoning well from badly drawn figures; however, these figures, if they are not to deceive us, must satisfy certain conditions; the proportions may be grossly altered, but the relative positions of the different parts must not be upset.

— Henri Poincaré, Analysis Situs (1895), trans. John Stillwell

Take a lump of clay and roll it into a ball. Squash it, stretch it, twist it into a lumpy potato. Its shape has changed completely, and yet in another sense nothing has happened: it is still one lump, and you still cannot see through it. Now push your thumb right through the middle and make a ring. That feels like a different kind of change. No amount of squashing will close the hole again, unless you glue the clay back together. This book is about that difference, and about the century of ideas it took to say precisely what it is.

The branch of mathematics that studies such differences is called topology: it keeps track of whatever survives stretching, bending and squeezing, and forgets everything else. Inside topology runs a machine called homology, which turns the slippery idea of a “hole” into numbers you can calculate. Beside it runs its mirror image, cohomology, which detects something subtler: information that makes perfect sense in every small region and still cannot be fitted together into one consistent whole.

This first chapter is a tour, and nothing in it has to be fully understood yet; every idea returns later, slowly, with all the background it needs. On the way you will meet a drinking straw that starts arguments, a count of corners that Euler noticed in 1750, a staircase that climbs for ever without getting anywhere, and a theorem which promises that however you stir a cup of coffee, some point of it ends exactly where it began.

A doughnut and a coffee cup

There is an old joke that a topologist is someone who cannot tell a coffee cup from a doughnut. Like many jokes, it is secretly a definition.

Imagine both objects are made of an infinitely soft, infinitely stretchable clay. Start with the doughnut. Push a dent into one side of it and deepen the dent into a bowl; the rest of the ring thins into a handle. With some patience you arrive at a coffee cup — and at no moment did you cut the clay or glue two separate parts of it together. Every point of the doughnut ended up at a point of the cup, nearby points stayed nearby, and the whole process could be run backwards.

A topologist calls two shapes the same when one can be deformed into the other in this way. The precise word is , and it will be defined carefully in §2.1 Spaces and Continuity. For now, the rule of the game is:

Under these rules, a ball and a cube are the same (round off the corners), a sphere and the surface of a potato are the same, and a doughnut and a coffee cup are the same. But a ball and a doughnut are not the same: to get from one to the other you would have to punch a hole through the ball, and punching is a kind of tearing. (In one way the rules are more generous than clay: a loop of string tied in a knot counts as the same shape as a plain ring, because topology cares about a shape itself and not about how it sits in the room. §2.1 Spaces and Continuity explains.)

At least, that is what our intuition says. But intuition is not proof. How could you ever be sure that no clever sequence of stretches, however complicated, turns a ball into a doughnut? You cannot try them all — there are infinitely many. This is the central difficulty of topology, and it is where our story really begins.

Stretch, don’t tear Press and hold a shape to pull it · drag around it to turn the view
Press and hold on a shape to pull it out
Figure 0.1.1 A sphere and a torus being kneaded like clay. Their geometry — lengths, angles, curvature — changes completely. But the sphere never acquires a tunnel, and the torus never loses its one. Features like these, which no allowed deformation can change, are what topology studies.

What survives stretching

The way out of the difficulty is a strategy that runs through all of mathematics. Instead of trying every deformation, find some property of a shape that no deformation can change, and that you can actually compute. Such a property is called a . If two shapes give different values of an invariant, they cannot be the same — whatever stretching you try.

A simple example: the number of pieces. Two separate blobs can never be stretched into one, because joining them would take gluing; one blob can never be stretched into two, because separating them would take tearing. So “number of pieces” is an invariant. It already tells the letter i (two pieces: the dot and the stroke) from the letter l (one piece).

A subtler example: the number of holes. The letter O has one hole, B has two, C has none. Since no stretching creates or destroys a hole, these letters really are topologically different. This sounds obvious until you try to say precisely what a hole is.

The trouble is that a hole is not a thing. It is a place where something is missing, and it is surprisingly hard to point at an absence. Worse, holes come in different dimensions. A circle has a hole you can loop a string around. A hollow ball has no such hole — every loop drawn on its surface can be slid off and shrunk away — but it does enclose a hollow cavity, a different kind of hole. And the skin of a doughnut (think of an inflatable swimming ring rather than a cake) has two independent loop-holes and a cavity.

Homology is the theory that sorts all of this out. It produces, for every shape and every dimension a count of the essentially different -dimensional holes. These counts are called the of the shape, after the Italian mathematician Enrico Betti, and written (pronounced “b-zero, b-one, b-two”):

  • counts the pieces (it is useful to think of separate pieces as “0-dimensional holes”: gaps between parts);
  • counts the independent loops that go around tunnels — loops that cannot be shrunk away;
  • counts the enclosed hollow cavities;
  • and so on, in higher dimensions that we cannot picture but can compute.
A first gallery of holes Drag to turn the shapes · choose which holes to light up
The circle has one loop that encloses nothing; the torus has two independent ones — around the hole and around the tube.
Figure 0.1.2 The Betti numbers of four basic shapes. The torus has one loop around the central hole and one around the tube, and neither can be shrunk or turned into the other. Making “independent” and “essentially different” precise is the business of Part III.

Euler’s clue

The first hint that something like homology exists came from an innocent-looking observation about solids with flat faces — polyhedra. Take any such solid: a cube, a pyramid, a football sewn from pentagons and hexagons. Count its corners (mathematicians say vertices), its edges, and its faces. Call these and For a cube, and Now compute

Try it for the other solids in the figure below. A tetrahedron (triangular pyramid): An icosahedron, with its twenty triangles: And one that is not in the figure, a football, with 60 corners, 90 seams and 32 panels: Every time, the answer is 2. This is Euler’s polyhedron formula (Euler 1758), and it holds for every polyhedron that is, topologically, a ball — however many faces it has, however irregular they are.

Counting corners, edges and faces Choose a solid · drag to rotate
cube
Figure 0.1.3 For every solid shaped like a ball, The picture frame has a tunnel through it, and the count drops to The number cannot see lengths or angles, but it can see tunnels.

Why should such a crude count be so stable? Try to break it. Suppose you add a new edge across one of the faces, splitting it in two. You have added one edge and one face, so changes by Suppose you add a new vertex in the middle of an edge, splitting it in two: one more vertex and one more edge, change Refining the picture never changes the answer. So is not really a property of the particular way the solid was cut into faces at all. It is a property of the shape underneath. It is a topological invariant — today called the and written the Greek letter chi.

And then comes the surprise in the last example: the picture frame, a polyhedron with a tunnel through it, gives The formula “fails” — or rather, it succeeds spectacularly, because it has detected the tunnel. Every additional tunnel lowers the count by 2.

Check it on the cube’s surface: piece, loop-holes, cavity, and For the picture frame, whose surface is a torus: That Euler’s crude count equals this alternating sum of Betti numbers is a genuine theorem, and you will prove it in §3.3 Homology Groups. It is our first clue that the holes of a shape can be counted by finite, mechanical calculations.

Loops that cannot shrink

How do we detect a loop-hole precisely? Here is a physical test. Wrap a rubber band around a shape, keeping it on the surface, and let it contract. On a sphere, every rubber band can slide over the surface and shrink to a point. It never gets caught on anything. On a torus, some bands also shrink to a point; but a band that goes around the tube, or around the central hole, gets stuck. It can slide along the surface, but it can never become smaller than the hole it surrounds.

Rubber bands Play or scrub to pull the bands tight · drag to rotate
loose pulled tight
Figure 0.1.4 On the sphere, the band shrinks to a point, sweeping across the shaded cap — the region it bounds. On the torus, a small band also shrinks, but the band around the tube is stuck: there is no piece of the torus that it bounds.

Look at the shaded region on the sphere. The band is the edge — mathematicians say the boundary — of a piece of the surface, the cap, and as it shrinks it sweeps across that cap. On the sphere, bounding and shrinking go together. The stuck band on the torus bounds no piece of the torus at all. Cut along it with scissors and the torus does not fall apart into an inside and an outside; it opens into a single tube. Of the two ideas, shrinking and bounding, it is bounding that becomes our precise definition of a hole:

Bounding is the test we will use, but as it stands it is not yet mathematics: nobody can try every piece of surface that a loop might be the edge of. The great insight of homology is to replace searching with bookkeeping. We cut the shape into simple pieces — triangles, say — and record loops and surfaces as lists of pieces. Then the question “is this loop a boundary?” becomes a question about solving equations, which a computer (or a patient human) can always answer.

From counting to algebra

For thirty years after Poincaré, topologists treated Betti numbers as plain numbers, read off from large tables that record which pieces of a shape touch which. Then, in 1925, Emmy Noether, one of the great algebraists of the century, made an observation in her Göttingen lectures and in a report fourteen lines long. The loops and surfaces being counted are not a loose heap: they form groups. You can add two loops (travel one, then the other) and subtract them (travel one backwards), and the Betti numbers had been measuring these groups all along. It sounds like a change of vocabulary. But the young Heinz Hopf, visiting Göttingen that year, saw how much it bought, and the idea spread fast (Weibel 1999): once holes form groups, the whole of algebra can be brought to bear on shape.

The final form of the idea fits in one line. It is the destination of Part III of this book, and you are not expected to understand it yet — only to recognise it when it comes back:

Read aloud: “the -th homology of is the kernel of modulo the image of Here is what each piece means.

The destination, decoded Hover or tap each piece of the formula
the n-dimensional holes of the shape X

A list of all the essentially different n-dimensional holes of X, packaged so that holes can be added and compared. For n = 1 these are the loops that go around tunnels; for n = 2, the hollow cavities.

explained fully in §3.3 Homology Groups
Figure 0.1.5 Homology in one line: take all the cycles, and treat the ones that are boundaries as zero. What is left are the holes. Every symbol here will be built from scratch: kernels and images in §1.3 Groups, quotients (“modulo”) in §1.2 Equivalence and Quotients and §1.4 Abelian Groups and Formal Sums, the boundary operator in §3.2 Chains and the Boundary Operator.

Measuring instead of counting

Homology counts holes by collecting loops and surfaces inside a shape. Cohomology looks at the same shape from the opposite direction. Instead of collecting pieces, it writes a measurement on each one: the climb along each trail of a hiking map, the voltage across each wire of a circuit, the exchange rate between two currencies, the ratio of depths where two parts of a drawing meet. Then it asks whether the measurements hang together.

Take the hiking map. Suppose someone hands you the altitude change along every trail segment, and nothing else. Can you recover an altitude for every crossing, consistent with all those changes? Locally, the answer is always yes: near any one crossing, call its altitude zero and add up the changes as you walk outwards. Globally, the answer can be no.

An impossible staircase Walk around the loop · then make the staircase possible
+1+1+1+1+1+1+1+1+1+1+1+1startstart heightstartheight0height gainedheightgained
Each step on its own makes perfect sense… sum around the loop:
Figure 0.1.6 Every step says “up by one”, and each step on its own is perfectly reasonable. But after twelve steps up you are back at the start. No assignment of heights to the landings can agree with every step, because the steps add up to 12 around the loop, not 0. Make the staircase possible and the sum around the loop becomes 0 — then heights exist.

This is the logic of the that the geneticist Lionel Penrose and his son Roger, then a young mathematician, published in 1958 (Penrose & Penrose 1958), and that M. C. Escher made famous two years later in his lithograph Ascending and Descending, where monks climb for ever around a square stairway. Every small part of the picture is a perfectly good staircase. The impossibility lives only in the whole loop. It is, quite literally, a nonzero cohomology class, and in 1992 Roger Penrose wrote a paper analysing impossible figures in exactly these terms (Penrose 1992).

It turns out that cohomology carries more structure than homology. Measurements can be multiplied, and this product — the cup product of §4.5 The Cup Product — can tell apart shapes that homology alone cannot. And when the shape is smooth, cohomology turns into calculus: the theory of differential forms, where the fundamental theorem of calculus, Green’s theorem and Stokes’ theorem all become a single statement about boundaries. That story is Part IV.

Why it matters

Counting holes may sound like a parlour game. It became one of the most useful ideas of twentieth-century mathematics, and in the twenty-first it has found a second career in science and engineering.

Figure 0.1.7 A few of the places where homology and cohomology do real work. Each is discussed in the chapter shown.

Here is a taste of the very first great application, which you will prove yourself in §3.5 Maps, Invariance, and First Triumphs. Stir a cup of coffee and let it settle. However you stirred — as long as the coffee did not slosh out of the cup or splash apart — at least one point of the coffee is exactly where it started. This is , proved in full generality by the Dutch mathematician L. E. J. Brouwer in 1911 (Brouwer 1911). For a flat disk of coffee, its proof is a two-line argument about holes: if no point stayed put, you could use the stirring to push the whole disk onto its rim without tearing, and that would destroy the rim’s hole — which homology says is impossible.

The same theorem and its relatives guarantee that equilibria exist in economics and in games: John Nash’s proof that every finite game has an equilibrium is an application of it (Nash 1951). Persistent homology (§3.8 Persistent Homology) finds circles, voids and tunnels hidden in clouds of data points, from the shapes of proteins to the firing of neurons (Xia & Wei 2014; Giusti et al. 2015). Homology detects gaps in the coverage of a network of sensors using only which sensors can hear each other (de Silva & Ghrist 2007). Cohomology explains why the Hall conductance of certain thin materials comes in perfectly whole-number steps (Thouless et al. 1982), part of the work on topological phases of matter recognised by the 2016 Nobel Prize in Physics (Nobel Prize 2016). And the cohomology of the space of all positions of a robot arm sets a lower limit on how many separate rules a program that plans its motions must switch between (Farber 2003).

How to read this book

This book assumes no mathematics beyond arithmetic and a willingness to think carefully. Everything else is built along the way:

  • Prelude. This chapter, and §0.2 How to Read Mathematics, a gentle guide to mathematical notation and logic. If symbols like or are unfamiliar, read it next.
  • Part I, Foundations. Sets and functions, equivalence and quotients, groups, abelian groups and linear algebra — exactly the algebra that homology needs, and no more.
  • Part II, Shapes. Topological spaces, gluing, homotopy, manifolds, simplicial complexes and the Euler characteristic.
  • Part III, Homology. Cycles and boundaries, chains, homology groups, computation, invariance, exact sequences, knots and links, and persistence.
  • Part IV, Cohomology. Cochains, cohomology groups, differential forms, de Rham cohomology, cup products, Poincaré duality, sheaves and characteristic classes.
  • Part V, The Bigger Picture. Categories and functors, homological algebra, and where the road leads next.

The chapters are meant to be read in order, but the map of the journey shows which chapters each one depends on, if you prefer to jump ahead. A few conventions will help:

  • Figures are meant to be touched. Most of them respond to dragging and tapping, and some play like short films; the small hint above each figure says how. On a phone, tap “Tap to rotate” before dragging a 3D figure, so that the page can still scroll.
  • Dotted underlines are glossary terms. Hover over (or tap) a word like to see its definition without losing your place. The full glossary and a notation guide are always one click away in the top bar.
  • Names and years in brackets are references, like (Euler 1758): a book or paper where you can check a fact or read a story in full. Hover over (or tap) one for the details. Each chapter ends with its list of references and a short guide to further reading.
  • Boxes have meanings. Gold boxes are definitions, violet boxes are theorems, teal boxes give intuition, and amber boxes warn you where an intuition can mislead. Exercises have hints and full solutions, hidden until you ask for them.
  • Colours have meanings too, in every picture and many formulas:
The colours of this book
  • Gold cycles — the loops and surfaces we are measuring; the main highlight
  • Teal boundaries and exact things — “this one bounds”
  • Violet chains and general elements — whatever you have selected
  • Rose holes, obstructions and non-trivial classes
  • Blue neutral structure and examples
  • Green exercises, and anything consistent or solved
Figure 0.1.8 The same colour always plays the same role, from the first chapter to the last.

Finally, a word of encouragement. Mathematics is read slowly, with a pencil, by people who stop to try examples and who are not ashamed to read a paragraph three times. If something does not make sense, play with the figure, try the exercise, look the word up, and come back. Everything in this book was confusing to someone once — including to the people who discovered it.

Exercises

Summary

Further reading

  • Topology 101: The Hole Truth — David S. Richeson, Quanta Magazine (2021) free
    The straw debate, Riemann’s idea of counting holes by cutting, and how homology settles the argument. A ten-minute read for anyone.
  • What is…homology intuitively? — Daniel Tubbenhauer (VisualMath, YouTube) free
    A short video lecture in which he annotates his slides live: the swimming ring and the doughnut, the necklaces and plugs, and the shrinking definition of a hole quoted in this chapter. The slides are free at dtubbenhauer.com.
  • What is algebraic topology? — Aleph 0 (YouTube) free
    Fifteen hand-drawn minutes covering the whole idea of Part III: cut a shape into cells, compute the circle and the torus by hand, then ask whether the answer depends on the cutting.
  • A popular history of V − E + F, from Descartes’s waterlogged notebook to Poincaré and beyond. The best book-length companion to this chapter; no background needed.
  • A wonderfully visual book on surfaces and three-dimensional spaces, written for readers with no background. The link goes to his free Torus Games, where you can play noughts and crosses, chess and pool on a torus.
  • Elementary Applied Topology — Robert Ghrist (2014) free
    Homology and cohomology at work in data analysis, sensor networks, robot motion and more, told with a light touch and dense pictures; free PDF chapters for personal use. For browsing now and reading properly after Part III.
  • Algebraic Topology, Chapter 0 — Allen Hatcher free
    The first chapter of the standard graduate textbook, free online. For later, when you want to see the destination in full.

References

  1. David S. Richeson (2021). Topology 101: The Hole Truth. Quanta Magazine, 26 January 2021. free online
  2. Daniel Tubbenhauer (2021). What is…homology intuitively?. VisualMath, YouTube (slides at dtubbenhauer.com). free online
  3. Leonhard Euler (1758). Elementa doctrinae solidorum. Novi Commentarii academiae scientiarum Petropolitanae 4, 109–140 (Euler Archive E230). free online
  4. Leonhard Euler (1741). Solutio problematis ad geometriam situs pertinentis. Commentarii academiae scientiarum Petropolitanae 8, 128–140 (Euler Archive E53). free online
  5. P. J. Federico (1982). Descartes on Polyhedra: A Study of the De Solidorum Elementis. Springer, Sources in the History of Mathematics and Physical Sciences 4. doi
  6. Simon Lhuilier (1813). Mémoire sur la polyèdrométrie ; contenant une démonstration directe du théorème d’Euler sur les polyèdres, et un examen des diverses exceptions auxquelles ce théorème est assujetti. Annales de mathématiques pures et appliquées 3 (1812–1813), 169–189. free online
  7. Henri Poincaré (1895). Analysis situs. Journal de l’École Polytechnique, 2e série, cahier 1; English translation by John Stillwell in Papers on Topology (AMS, 2010). doi
  8. Eric W. Weisstein (2026). Hole. MathWorld — A Wolfram Resource (accessed October 2026). free online
  9. Charles A. Weibel (1999). History of homological algebra. in I. M. James (ed.), History of Topology, Elsevier, 797–836.
  10. Lionel S. Penrose and Roger Penrose (1958). Impossible objects: a special type of visual illusion. British Journal of Psychology 49(1), 31–33. doi
  11. Roger Penrose (1992). On the cohomology of impossible figures. Leonardo 25(3/4), 245–247. doi
  12. L. E. J. Brouwer (1911). Über Abbildung von Mannigfaltigkeiten. Mathematische Annalen 71, 97–115. doi
  13. John Nash (1951). Non-cooperative games. Annals of Mathematics 54(2), 286–295. doi
  14. Kelin Xia and Guo-Wei Wei (2014). Persistent homology analysis of protein structure, flexibility, and folding. International Journal for Numerical Methods in Biomedical Engineering 30(8), 814–844. doi
  15. Chad Giusti, Eva Pastalkova, Carina Curto and Vladimir Itskov (2015). Clique topology reveals intrinsic geometric structure in neural correlations. Proceedings of the National Academy of Sciences 112(44), 13455–13460. free online
  16. Vin de Silva and Robert Ghrist (2007). Coverage in sensor networks via persistent homology. Algebraic & Geometric Topology 7, 339–358. free online
  17. David J. Thouless, Mahito Kohmoto, M. Peter Nightingale and Marcel den Nijs (1982). Quantized Hall conductance in a two-dimensional periodic potential. Physical Review Letters 49, 405–408. doi
  18. The Royal Swedish Academy of Sciences (2016). The Nobel Prize in Physics 2016. NobelPrize.org. free online
  19. Michael Farber (2003). Topological complexity of motion planning. Discrete & Computational Geometry 29, 211–221. free online