Homology
Part IV · Cohomology
Chapter 4.5

The Cup Product

Cohomology is a ring

about 50 min Builds on 4.4 de Rham Cohomology

What is a little surprising is that contravariance leads to extra structure in cohomology.

— Allen Hatcher, Algebraic Topology (2002)

Here are two shapes. The first is the surface of a doughnut, the torus. The second is a balloon with two key rings hanging from the knot: a sphere with two circles attached at a single point. Feed both into every homology and cohomology machine this book has built so far and the answers come out identical — one piece, two independent loops, one enclosed void. Their homology groups agree, their cohomology groups agree, even their Euler characteristics agree. And yet nobody would mistake one for the other.

This chapter is about the extra structure that tells them apart. The idea is disarmingly simple. Chains are places and cochains are measurements. You cannot multiply two places — but you can multiply two measurements.

Same numbers, different shapes

Let us meet the two shapes properly. The torus is the surface of a doughnut; in §2.2 Gluing Spaces Together we built it from a square by gluing opposite sides. The second shape is written and read “S-one wedge S-one wedge S-two”. It is a : take a sphere and two circles pick one point on each, and glue those three points together into a single point. Nothing else is glued.

Same groups Drag to rotate · switch to “Multiply”
Figure 4.5.1 The torus and the wedge Counting holes gives the same answer for both: one loop of each colour, one enclosed void. Switch to the product view: on the torus the two fences cross, so on the wedge they sit on different circles and never meet, so

Now compute. Both shapes are connected, so The torus has two independent loops — around the hole and around the tube — and the wedge has two as well, one in each circle. So for both. The torus encloses a void, and so does the sphere inside the wedge: for both (§3.3 Homology Groups did the torus; the wedge is the same computation done one piece at a time). None of these groups has torsion, so the Universal Coefficient Theorem of §4.2 Cohomology Groups says that cohomology is the same as homology here:

Even the Euler characteristic, agrees.

Are the two shapes secretly the same? Not as rubber sheets: the wedge has a special point, the knot of the balloon, and removing it breaks the wedge into three pieces, while removing any single point from the torus leaves it in one piece. But that argument only shows that the shapes are not homeomorphic. The question that homology is built to answer is the coarser one from §2.3 Homotopy: could the two shapes be , the way a solid ball is homotopy equivalent to a point? Every homotopy invariant we have computed says “maybe”.

Places cannot be multiplied; measurements can

Recall the slogan of §4.1 Cochains: Measuring Shapes: a is a place — a path, a region, a weighted list of simplices — and a is a measurement — a rule assigning a number to each simplex, which you then add up over a chain. The pairing read “phi paired with c”, is the result of measuring with integrating over

Measurements have a talent that places lack: two of them can be multiplied. If is the temperature at each point of a room and is the humidity, then is a new measurement, defined by The trick that makes this work is that both and can be evaluated at the same point

Try the same with places and it falls apart. What would “this edge times that triangle” be? The honest answer is a pair — an edge and a triangle — which is a place in the product space not in To come back to we would need a map a way of combining two points into one, and a general space has no such map. Measurements go the other way: they pull back along maps (that is contravariance, from §4.2 Cohomology Groups), and every space has the diagonal map which is exactly “evaluate both at the same point”. This is the surprise in the epigraph: cohomology runs backwards, and because it runs backwards it can multiply.

There is one more feature to notice before we start. Measurements come in degrees: a 0-cochain measures points, a 1-cochain measures edges, a 2-cochain measures triangles. When we multiply, the degrees add, just as multiplying a length by a length gives an area. A product of a -measurement and a -measurement will be a -measurement.

The smooth version: wedging closed forms

Start where the picture is clearest. In §4.3 Differential Forms we met the : a -form and an -form combine into a -form It is bilinear, associative, and anticommutes in the graded sense:

so in particular

We also met the and the rule that tells how to act on a product — the Leibniz rule, the grown-up version of the product rule from calculus:

The sign is the price of moving a symbol of degree one, past the one-forms that make up

Now recall from §4.4 de Rham Cohomology that a form is if and if for some and that de Rham cohomology is closed forms modulo exact ones. The Leibniz rule gives us two facts at once.

  1. Closed times closed is closed. If and both terms on the right vanish, so
  2. Exact times closed is exact. If then So is the derivative of something: it is exact. The same works on the other side.

Together they say that multiplying cohomology classes makes sense: If you replace by another representative of the same class, the product changes by which is exact — so the class of the product does not change. This is the pattern we will copy in the combinatorial world: a product rule for the derivative is exactly what lets products descend to cohomology.

Forms have two limitations. They need a smooth manifold to live on — our balloon with key rings is not one, because of its special point — and they only ever produce real numbers, so they are blind to integer and mod-2 phenomena. We want a product that works for any triangulated space and any coefficients. That is the cup product.

Front face times back face

How should two 1-cochains and combine into a number on a triangle? Take the wedge product as a guide: on a little rectangle multiplies the width, measured along one side, by the height, measured along an adjacent side. On a triangle there is a natural pair of adjacent sides once we know which vertex comes first. Walk from to and measure with then walk on from to and measure with multiply.

The ordering of the vertices matters, so we use the book’s convention: in a simplicial complex the vertices carry integer labels and every simplex is written in increasing order; in a each simplex comes with its own order, indicated by arrows on its edges (an edge points from the earlier vertex to the later one). Play with the triangle below.

Front face × back face Use − and + to change the values · swap the order
front faceback facelong edge — never consulted
frontbacklong
2 1 3
−1 3 2

Change the long-edge values, or ψ on the front edge: the product does not move. Only the left factor on the front edge and the right factor on the back edge matter.

both add up to 0 around the triangle

Figure 4.5.2 The product reads the left factor on the front face and the right factor on the back face and multiplies. Change the values on the long edge, or on the front edge: nothing happens. Swap the order and the answer usually changes — the cup product is not commutative on the nose.

The same recipe works in every degree. A -cochain eats a -simplex and a -cochain eats a -simplex; a -simplex has a front -face and a back -face which share exactly one vertex, the vertex

Three small cases show that nothing strange is going on.

  • Degrees 0 and 0. A 0-cochain is a function on vertices, and the cup product of two functions is their ordinary pointwise product. The temperature-times-humidity product of the previous section is a special case.
  • Degrees 0 and 1. multiply the measurement on each edge by the value of at its starting point. Likewise uses the end point.
  • The constant function Taking everywhere gives The constant function is a unit: multiplying by it does nothing.

Cocycles times cocycles

We want to multiply cohomology classes, not just cochains. Remember that a class is represented by a (a cochain with and that two cocycles represent the same class when they differ by a So we need the same two facts that made the wedge product work: cocycle times cocycle should be a cocycle, and changing a factor by a coboundary should change the product by a coboundary. Both follow from one formula — the combinatorial twin of the Leibniz rule.

Before the general argument, let us check the first interesting case by hand, so that nothing is hidden. Take Then both sides are 3-cochains, so we evaluate them on a tetrahedron To keep the formulas short, write for and for

The general proof is the same bookkeeping on a -simplex. The left side is a sum over the faces of obtained by deleting one vertex. Deleting a vertex from the front part gives the terms of deleting a vertex from the back part gives the terms of each shifted in sign by because it sits places further along. The two sums share one extra pair of terms — deleting the very last front vertex, or the very first back vertex — and that pair cancels, just as did above. Hatcher writes this out in full (Hatcher 2002, Lemma 3.6).

A new kind of algebra: rings

We now have, on the cohomology of any space, an addition (from the group structure) and a multiplication (the cup product). Algebraists have a name for a number system of that kind. It is the one piece of algebra this chapter needs that the earlier chapters did not, so here it is, just in time.

You have used rings all your life: the integers the clock numbers (where you can multiply as well as add), the real numbers, polynomials real-valued functions on a set (multiplied pointwise). Square matrices form a ring that is not commutative. The cohomology ring is slightly special because its elements come with degrees.

Three facts make this ring a genuine invariant of the space, not of the triangulation we happened to draw. We state them without proof; they are proved using singular cohomology (Hatcher 2002, §3.2).

The ring of the torus, by hand

Time to compute. We use the torus from §3.3 Homology Groups: a square cut into cells, each cell cut by its diagonal into two triangles, with opposite sides of the square glued. To order the vertices of every triangle we use arrows, as in a Δ-complex: every edge points right, up or up-and-right. Then every triangle is one of two kinds:

  • a lower triangle , whose arrows run right and then up: front face horizontal, back face vertical;
  • an upper triangle , whose arrows run up and then right: front face vertical, back face horizontal.

(With integer labels in increasing order this tidy arrangement is impossible — going once around the torus you would have to come back to a smaller label — which is why we allow ourselves the Δ-complex ordering. The cohomology ring comes out the same either way, as the theorem above promises.)

Two fences

Next we need two cocycles representing a basis of They are easiest to describe by a picture that goes back to Hatcher’s introduction to cohomology (Hatcher 2002, pp. 186–189). Draw a curve on the surface that crosses edges transversally — a , as in §4.2 Cohomology Groups — and give it a direction in which crossing it counts The cochain of the fence assigns to each edge the number of times the edge crosses the fence, counted with sign. A fence that closes up is always a cocycle: whenever the fence enters a triangle it must leave it again, so going once around the boundary of the triangle you cross it as often in one direction as in the other, and the signed count is zero.

  • is a vertical fence, counting whenever you cross it from left to right. It is on the horizontal and diagonal edges of one column, and elsewhere.
  • is a horizontal fence, counting whenever you cross it upwards. It is on the vertical and diagonal edges of one row, and elsewhere.

Check the cocycle condition on one lower triangle of s column: Every other triangle works the same way. Measured on the two basic loops of the torus — the loop running once around horizontally and the loop running once around vertically — they give

because crosses the vertical fence once and the horizontal fence never, and vice versa. By the Universal Coefficient Theorem, is the group of homomorphisms and are the classes “dual” to the basis of so they form a basis of

The four products

Now apply the recipe. On a lower triangle the front face is horizontal and the back face is vertical, so

which is exactly when the horizontal edge lies in s column and the vertical edge lies in s row — that is, for the single lower triangle in the cell where the two fences cross — and for all the others. On an upper triangle the front face is vertical, and vanishes on vertical edges, so always. The whole 2-cochain is concentrated on one triangle: the product lives where the fences cross.

The torus, triangle by triangle Choose a product · drag the fences · tap a triangle
v₀v₁v₂
000000001000000000
selected triangle
the whole torus

Gold edges cross α (value 1), teal edges cross β (value 1). Every lower triangle L runs right then up; every upper triangle U runs up then right. Drag a fence to another column or row, or tap any triangle.

Figure 4.5.3 The number in each triangle is the value of the chosen product there: left factor on the front face times right factor on the back face. For only the lower triangle of the crossing cell lights up; for it is the upper one; the squares vanish everywhere. Moving a fence moves the lit triangle, but the total over the torus never changes.

To turn this 2-cochain into an element of add it up over the whole surface, with every triangle oriented the same way (counterclockwise). That total is unchanged by adding a coboundary — since the closed surface has no boundary — and it identifies with With our arrows the lower triangles run counterclockwise and the upper ones clockwise, so the oriented sum of all triangles — the fundamental class, which §4.6 Poincaré Duality studies in its own right — is Let denote the generator of with Then

Running the same recipe for the other three products (the figure does it for you):

  • is only on the upper triangle of the crossing cell, where the front face is vertical ( and the back face horizontal ( Upper triangles count with a minus sign, so
  • needs on both the front and the back face of some triangle. But front and back always point in different directions — one horizontal, one vertical — and vanishes on vertical edges. So already as a cochain. The same goes for

The same computation on a round torus

Here is the same story on a round, glassy torus. The gold band is the fence running around the tube; the teal band is running around the hole. The little chevrons on each band point in the direction in which crossing it counts Where the bands cross, a rose patch glows: that is the support of

Bands on a torus Drag a band to slide it · drag elsewhere to rotate · play the bend
Signed crossings
Front face × back face on a 12 × 12 triangulation
α straight α bent
Figure 4.5.4 Two fences on a torus and their crossings. The first readout counts crossings with signs; the second computes the cup product honestly, by front face × back face on a triangulation built from the bands. Drag the bands anywhere and the answer stays Play the bend: becomes an S that crosses three times, the signs read and the total is still For a pushed-off copy never meets the square is zero.

Order matters — but only up to sign

On the torus, swapping the factors changed the sign: For forms we knew in advance that this had to happen, because and anticommute. In general, moving a -form past a -form means sliding each of its factors past each of the factors  — that is swaps of neighbours, each one a factor

Counting the swaps Pick degrees · step through the swaps
degree p of α 2
degree q of β 3
+
start: α ∧ β
6 swaps of neighbouring 1-forms, each one a factor −1
Figure 4.5.5 Moving (teal, degree past (gold, degree one neighbouring swap at a time. Each swap of two 1-forms flips the sign; there are of them, so

The cup product obeys the same law — not on cochains, but on cohomology classes.

Two consequences get boxes of their own, because the rest of the chapter turns on them.

Let us double-check the corollary on the torus with a general class. Every element of is for integers Expanding with distributivity,

Every degree-1 class on the torus squares to zero, as promised.

Same groups, different rings

Back to the puzzle from the start of the chapter. Switch Figure 4.5.1 to the product view and look at the wedge Its two degree-1 classes and can be represented by “gates”: is on a single edge of the first circle and elsewhere, the same on the second circle. (A gate is a fence on a 1-dimensional piece: a single point you either pass or not.) Every triangle of the wedge lies in the sphere, and on the sphere’s edges both cochains are zero. So every product of degree-1 classes vanishes on every triangle:

Same groups, different multiplication: that is the whole point of the chapter, and you can test it on more spaces. In the explorer below, every entry of every table is computed by the front-face/back-face recipe on a triangulation of the pictured polygon, from the fences drawn on it; choose an entry to see the fences involved and where they cross.

Multiplication tables Pick a space · tap an entry of the table
+
coefficients ; generates
1 crossing (signed sum 1)

The two fences cross once, so generates swapping the order flips the sign; each fence can be slid off itself, so the squares vanish.

Figure 4.5.6 Products of degree-1 classes for six spaces. Over entries are multiples of the generator of with signs; over they are or A diagonal entry is a square, shown with the fence and a pushed-off copy of it.

The genus-two surface (two handles) has four degree-1 classes, and its table consists of two copies of the torus table, one per handle: fences on different handles never meet. The same is true for with copies. So, exactly as for the torus, and a wedge of circles and one sphere have the same groups, namely but different rings, and they are not homotopy equivalent.

Products of spaces: a glimpse of Künneth

The torus is a product, and its ring is built from the rings of the two circles. If are the two projections, then for classes on and on the cross product is a class on the product. The circle has with basis and the four cross products are precisely on the torus.

In words: the classes of are all possible products of a class from with a class from with degrees adding. The -dimensional torus therefore has the exterior algebra on generators as its ring, and for the Betti numbers are The precise statement, and what changes with coefficients, is in §5.2 Homological Algebra.

When a square survives

Now for the surprise promised by the warning. Let us work with coefficients (also written where signs disappear and

The projective plane

The real is a square whose opposite sides are glued with a twist each way: the point on the bottom is glued to on the top, and on the left to on the right. In §4.2 Cohomology Groups we found for Call the nonzero degree-1 class What is

Use the smallest model, Hatcher’s: cut the square along the diagonal from to into two triangles. The corners become two vertices — made of and and made of and  — and there are three edges: (the bottom, glued to the top), (the left side, glued to the right) and (the diagonal). The two triangles, with their vertices in order, are

The front face of is the bottom edge and its back face the diagonal the front face of is the right edge and its back face is again

Mod 2, a 1-cochain is a cocycle when its values on the three edges of each triangle add to both triangles have edges so the condition is The cochain with satisfies it, and it is not a coboundary (the only nonzero coboundary is of the function that is at which is on and and on So Now multiply:

Mod 2 every triangle counts with coefficient in the fundamental class so The square of is the nonzero class in (Try the other representative, on and you get again, as you must.)

The fence picture explains why. A fence for is a “line”: a curve running from a point of the boundary straight across to the opposite, glued point. To compute we need a second copy of the fence pushed slightly off the first — and any two such lines cross exactly once, because their four end points on the boundary interleave. In projective geometry this is the classical rule that any two lines in the projective plane meet in exactly one point. Choose in the explorer above to see it.

Since is two-dimensional there is no so and the ring is the classes are and the square of the degree-1 class is the degree-2 class.

The Klein bottle versus the torus

The is the square glued straight top-to-bottom and with a flip left-to-right. This is the square of §2.2 Gluing Spaces Together turned a quarter turn, as in Hatcher’s book, so the twisted edge is now called in §3.4 Computing Homology and §4.2 Cohomology Groups it was Its mod-2 cohomology groups are  — exactly the same as the torus mod 2. Take to be a vertical fence (crossing the edge and a fence that crosses the twisted edge Over the cup products, written as a table, are

(Mod 2, so the tables are symmetric.) On the torus every square vanishes; on the Klein bottle The figure shows why: the fence runs through the twisted gluing, and when you try to slide a copy of it off itself, the copy comes back upside down on the other side and has to cross the original.

Pushing a fence off itself Choose the fence · drag the dashed copy
0 crossings → β² = 0
1 crossing → β² = 1
Figure 4.5.7 On the torus, every fence can be slid off itself, so every square is zero. On the Klein bottle the fence passes through the flip: wherever the copy leaves on the right, it re-enters on the left at the mirrored height (the small circles), and it must cross once. The tables underneath are the full mod-2 cup products, computed by front face × back face.

Here is a way to see that the difference is real, not an artefact of the chosen basis. Mod 2, (since and so the rule “square a degree-1 class” is additive. On the torus it sends every class to On the Klein bottle it sends and to the generator. No change of basis can turn one table into the other, so and are told apart even by cohomology, where their groups agree.

Projective spaces of every dimension

The projective plane is the first of a family. The real projective space is the set of lines through the origin in and the complex projective space is the set of complex lines through the origin in  — a space of real dimension Their cohomology rings are as simple as rings can be, and we state them without proof (Hatcher proves them in three different ways (Hatcher 2002, Theorem 3.19)):

Here is the degree of In both cases every power is nonzero, and the top power generates the top cohomology. The geometric reason is the one we saw in is the class of a “hyperplane”, a copy of or sitting inside, and corresponds to the intersection of hyperplanes in general position, which is a projective subspace of codimension Intersecting of them leaves a single point.

This settles the second pair of look-alikes mentioned at the start. Both and have cohomology in degrees and nothing else. In the square of the degree-2 generator is the degree-4 generator; in the degree-2 class lives on the where there is no room for a degree-4 class, so its square is Different rings — so and are not homotopy equivalent, even though neither has any loops at all. The ring of also has striking applications; one of them is a short proof of the Borsuk–Ulam theorem (every continuous map sends some pair of opposite points to the same place), which Hatcher sets as an exercise (Hatcher 2002, §3.2, Exercise 3).

What a cup product counts

Look back over the examples. On the torus, was supported exactly where the two fences crossed, and the signed number of crossings was the answer — even when we bent so that it crossed three times. On the wedge, the fences never met and the product was zero. On and the Klein bottle, the squares were nonzero precisely when a fence could not be pushed off itself. These are all instances of a single principle.

Michael Hutchings, in his notes on the subject, states the general version as “cup product is Poincaré dual to intersection of submanifolds”, and adds: “This is arguably the most important thing to know about cup product.” (Hutchings 2011) In an -dimensional manifold, a class of degree can often be drawn as an -dimensional “wall” (a fence is the case and to multiply two classes you intersect their walls. On the three-dimensional torus, for instance, each degree-1 class is a wall a whole 2-torus. Two such walls meet in a circle, and the circle pierces the third wall in a single point — which is why generates Daniel Tubbenhauer, in his video on the cohomology ring, packs this into a slogan: codimension meets codimension in codimension The slogan needs the walls to cross cleanly, the way two lines cross in an “×”. Two curves that merely touch, tangent to each other, give no honest count until one of them is nudged, which is why the key idea above asks for fences “in general position”. Making all this precise — saying exactly which wall belongs to which class — is the subject of the next chapter, §4.6 Poincaré Duality.

A word on the signs, since we have been careful to get them right. Our fence for runs upwards and counts crossings from left to right; the fence for runs leftwards and counts crossings upwards. With the counterclockwise orientation of the torus, every crossing of the two fences in the figures counts when the second fence passes from the right of the first to its left. If you change any one of these conventions, some signs flip — which is why books disagree about signs, and why every serious calculation states its conventions first.

Exercises

Summary

Further reading

  • Algebraic Topology, §3.2 “Cup Product” — Allen Hatcher (2002) free
    The standard reference: the simplicial and singular cup product, the Leibniz formula, graded commutativity, the rings of surfaces, ℝPⁿ and ℂPⁿ, and the Künneth formula. Graduate level, but Examples 3.7–3.9 are very readable after this chapter.
  • Cup product and intersections — Michael Hutchings (2011) free
    A short handout explaining why the cup product is “intersection of Poincaré duals”, with the torus and ℂPⁿ worked out. The best next step after the last section of this chapter.
  • Slides for a short video in his “What is…?” series on YouTube (index at dtubbenhauer.com/youtube.html): two loops on a torus meeting in a point, codimensions adding, and why crossings must be transverse. A quick visual recap of the last section of this chapter.
  • Differential Forms in Algebraic Topology — Raoul Bott and Loring Tu (Springer GTM 82, 1982)
    Builds the whole subject from wedge products of forms, exactly the smooth picture of our second section. The Künneth formula and the cohomology of projective spaces appear early. Graduate level.
  • The Essence of de Rham Cohomology — Alice Petrov (2024) free
    A student-level exposition of de Rham cohomology that includes the Künneth formula and Poincaré duality — a gentle bridge between this chapter and the next.
  • History of Homological Algebra — Charles Weibel free
    Where the history box of this chapter comes from: Alexander and Kolmogorov in Moscow in 1935, and Whitney naming “cup” and “cap”.

References

  1. Allen Hatcher (2002). Algebraic Topology. Cambridge University Press. free online
  2. John J. O’Connor and Edmund F. Robertson (2005). Hassler Whitney. MacTutor History of Mathematics Archive, University of St Andrews. free online
  3. Darya E. Apushkinskaya, Alexander I. Nazarov and Galina I. Sinkevich (2019). In search of shadows: the First Topological Conference, Moscow 1935. The Mathematical Intelligencer 41, 37–42. free online
  4. Charles A. Weibel (1999). History of homological algebra. in I. M. James (ed.), History of Topology, Elsevier, 797–836.
  5. Hassler Whitney (1938). On products in a complex. Annals of Mathematics 39(2), 397–432. doi
  6. Michael Hutchings (2011). Cup product and intersections. lecture notes, Math 215B, University of California, Berkeley. free online
  7. William S. Massey (1998). Higher order linking numbers. Journal of Knot Theory and Its Ramifications 7 (1998), 393–414; first published in the proceedings of a 1968 conference on algebraic topology. doi