We have also isolated the algebra from the topology to show that a large part of cohomology and Hodge theory is nothing more than the linear algebra of matrices satisfying AB = 0.
In the last chapter, measurements arrived as answers to puzzles: heights on a trail map, climbs on its trails, a staircase that could not exist. Now we build the machine. It will look almost exactly like homology — groups of cochains, a coboundary map, cocycles and coboundaries, and their quotient — and for good reason: it is homology run through a mirror.
If the reflection were perfect, there would be little reason to build it. It is not, and the flaws are the reward. Maps between spaces will act on cohomology backwards. The twisted, finite part of homology — the torsion that made the projective plane strange in Part III — will reappear one floor higher than you would expect. And measurements, unlike places, can be multiplied, which later in this part lets cohomology tell apart spaces whose homology is identical.
Cochain groups: measurements as homomorphisms
A cochain is still what it was in the last chapter: a number on every simplex. This section only dresses that idea in the formal clothes the rest of Part IV expects, starting from the chains of §3.2 Chains and the Boundary Operator. For a simplicial complex the group consists of formal sums of oriented -simplices with integer coefficients — inventories of places, with multiplicities. Its elements add coefficient by coefficient, and the -simplices themselves form a basis: is a free abelian group, with one copy of for each -simplex.
A measurement assigns a value to each -simplex. The values can live in any abelian group — the real numbers the integers or the two-element group of the gear ring — and the choice is called the coefficients. Once we know the value of a measurement on every simplex, there is only one sensible way to measure a chain: add up, with the multiplicities,
(Here means added to itself times, or subtracted if is negative; that makes sense in any abelian group.) This rule respects addition, and a function between groups that respects addition is a homomorphism. Conversely, because the simplices form a basis, a homomorphism out of can take any values on the simplices, and those values determine it. So “a value on every -simplex” and “a homomorphism are two descriptions of the same thing.
Concretely, a -cochain is a list of values in one for each of the simplices of dimension so The hollow triangle has three integers, one per edge. The simplest cochains are the indicator cochains: for a -simplex the cochain is on and on every other -simplex. Every cochain is a combination of them,
With real coefficients this is a familiar construction: is the dual space of the vector space from §1.5 Linear Algebra, its elements are the linear functionals on chains, and the indicator cochains form the dual basis. Cochains are to chains what row vectors are to column vectors.
The value of a cochain on a chain gets its own notation, the pairing of §4.1 Cochains: Measuring Shapes:
Think of it as integrating the measurement over the place Try it.
The coboundary map is a transpose
In §4.1 Cochains: Measuring Shapes we met the coboundary as the discrete gradient and the discrete curl, and noticed that both are “evaluate on the boundary”. Here is the definition in every degree and for every coefficient group.
The matrix of
Choose the simplices as bases: -simplices for and their indicator cochains for Then is a matrix with a row for each -simplex and a column for each -simplex; column lists the faces of with their signs. What is the matrix of Its column for is and its entry in row is
Rows and columns have swapped places:
Read the formula both ways. A column of answers “what are the faces of this simplex?”. The same numbers, read as a row of answer “which values does on this simplex look at?”. And a column of — the coboundary of an indicator — answers “which simplices have as a face?”: is on the simplices one dimension up that contain its cofaces. The boundary looks down to faces; the coboundary looks up to cofaces.
Daniel Tubbenhauer, in his video What is…cohomology? Or: Reversing arrows, watches this happen on the solid tetrahedron with vertices working mod 2 so that every sign disappears. Going down, the tetrahedron has four triangles as its boundary, a triangle has three edges and an edge has two ends. Going up, a vertex reaches the three edges that leave it, an edge the two triangles that contain it, and a triangle the one solid it bounds:
His slogan fits on one line: “Homology goes down, cohomology goes up.”
Tap a vertex to put a 1 on it: its coboundary is ±1 on the edges it is a face of.
| −1 | −1 | 0 | 0 | 0 | |
| 1 | 0 | −1 | −1 | 0 | |
| 0 | 1 | 1 | 0 | −1 | |
| 0 | 0 | 0 | 1 | 1 |
| −1 | 1 | 0 | 0 | |
| −1 | 0 | 1 | 0 | |
| 0 | −1 | 1 | 0 | |
| 0 | −1 | 0 | 1 | |
| 0 | 0 | −1 | 1 |
The coboundary of a coboundary
For every cochain and every simplex
so as a direct consequence of In matrices it is one line of §1.5 Linear Algebra: because the transpose of a product is the product of the transposes in the opposite order.
The tetrahedron shows the same thing without matrices. Climb twice from the vertex first to its three edges, then from each edge to its two triangles. Every triangle at contains exactly two edges at so it is reached twice — by way of and by way of — and mod 2 the two arrivals cancel. (With integers they arrive with opposite signs.) A coface of a coface is always reached along two routes, which is read upside down.
The cochain groups and coboundary maps form a sequence in which each map raises the degree:
Such a sequence is a cochain complex. Compare the chain complex of Part III, whose maps lower the degree: same groups, arrows reversed. Why did homology point its arrows downwards in the first place? “For no good reason,” says Tubbenhauer: as a bare sequence of groups and maps, a cochain complex is a chain complex numbered the other way. The surprises of this chapter come from somewhere else, from the fact that its groups measure chains.
Cocycles, coboundaries and cohomology
Everything is now in place to copy the definition of homology from §3.3 Homology Groups, with every arrow reversed.
Every word has a picture from the last chapter. A 1-cocycle is an edge labelling that passes every local test (zero curl on every filled triangle). A 1-coboundary is a gradient. Two 1-cocycles are cohomologous when one turns into the other by adding bumps at vertices, so a class in is a global obstruction with all the irrelevant detail forgotten. In degree 0 there are no coboundaries, so is the group of locally constant functions. In degree 2 the question is “is this measurement on triangles the curl of something?”, and collects the answers “no”.
Counting dimensions over a field
When the coefficients form a field — the real numbers, the rationals, or — every group above is a vector space and we can count dimensions with rank–nullity from §1.5 Linear Algebra. Writing for the number of -simplices, and so
because a matrix and its transpose have the same rank. Over a field, cohomology and homology have the same dimensions: the Betti numbers count both. (In fact is the dual vector space of as we will see.) In particular the Euler characteristic can be read off either: The integers will be more interesting.
First computations: graph, circle, sphere, torus
Graphs
A graph has no triangles, so and every 1-cochain is a cocycle. The last chapter did the rest: one value per connected piece, and one free value per edge outside a spanning tree — the loop sums of the fundamental loops. With and
Read the graph case as a verdict on one map. The cochain complex is so measures how far is from being one-to-one (the “ different heights with the same climbs), and measures how far it is from being onto (the climbs that no heights produce: the obstructions). Every cohomology group asks the same question of the on either side of it: what is left over that the maps fail to account for? The YouTube channel K-Theory, in What, and why, is coHomology, works through such tiny complexes (one term, two terms, a short exact sequence) and turns to spaces only at the end.
The circle and the torus, step by step
The next figure computes the cohomology of the circle (as a hollow triangle) and of the torus. For the torus we use Hatcher’s small model: a square whose opposite sides are glued, cut along a diagonal into two triangles. All four corners become a single vertex, so this is not a simplicial complex but a Δ-complex (§2.5 Simplicial Complexes); chains, cochains and (co)boundary matrices work exactly the same way, and the answers agree with those of genuine triangulations.
The hollow triangle has three vertices, three edges and no triangles. A 0-cochain is three numbers a 1-cochain is three numbers and there are no 2-cochains:
For the circle, has rank 2, its kernel is the constants ( and since there are no triangles, The loop sum vanishes exactly on the image and takes every integer value, so it identifies A generator is the cochain that is on a single edge: a fence across the loop.
For the torus, the single vertex makes Both triangles have boundary so the cocycle condition is with two free choices; nothing is divided out, and with basis
In degree 2 the two triangles carry values and the coboundaries are exactly the pairs with and identifies The number is the value on the 2-cycle that represents the whole torus.
The sphere
Take the hollow tetrahedron, with four triangles, six edges and four vertices. It is connected, so Every 1-cocycle is a coboundary: a 1-cocycle passes every local test, and every loop on the sphere is the boundary of a union of triangles, so all its loop sums vanish and the gradient test of §4.1 Cochains: Measuring Shapes makes it a gradient. Hence In degree 2 every cochain is a cocycle (there are no 3-simplices). Let be the 2-cycle made of all four triangles with their signs. The map kills every coboundary, by Stokes: It takes the value on each triangle indicator, so it hits every integer. Its kernel is exactly the coboundaries, and you can see why by pushing weight around. Any two triangles of the tetrahedron share an edge, and adding a multiple of the coboundary of that edge’s indicator moves weight between those two triangles and touches no others (the exercise “Two triangles of the sphere” makes one such move). Three moves pile all of a cochain’s weight onto a single triangle without changing its value on If that value was nothing is left on the pile, so the cochain was a coboundary all along. So
and any single triangle indicator generates a measurement that puts all its weight on one tiny triangle is, up to coboundaries, the same as one spread evenly over the sphere — only the total matters.
Fences: what a 1-cocycle measures
Here is the most useful picture of a 1-cocycle on a surface. Hatcher describes it for coefficients if is a cocycle, then on each triangle it takes the value on an even number of edges, so we can draw short arcs inside each triangle joining the edges with value in pairs. The arcs link up into curves — in his words, “a collection of disjoint curves in crossing the 1-skeleton transversely, such that the number of intersections of with each edge is equal to the value of on that edge.” With integer coefficients the curves get a direction, and crossings count with signs.
Call such curves a fence. Then the value of the cocycle on a closed loop is the number of times the loop crosses the fence, counted with sign. And if Hatcher notes, the curves are “something like level curves for a function with jumps by one every time you step across the fence, so a fence coming from a function must separate the surface into regions at different heights.
The figure is the torus computation made visible. The cocycle is on the edges and and on as a fence, it is a circle running across the square in the direction, which the loop crosses once and the loop never crosses. So and likewise and The two classes are exactly the measurements “how many times around in direction and “how many times around in direction
Measuring classes with classes
The figure also shows that wiggling the fence does not change the count on a closed loop, and that moving the loop does not either. Both facts are Stokes’ formula from the last chapter.
This is often called the Kronecker pairing. So cohomology classes are measurements of homology classes: each gives a homomorphism For the torus, and are the “dual basis” to the loops and and every class in is determined by its two values and Whether a class is always determined by its values on cycles is the question the Universal Coefficient Theorem answers, at the end of this chapter: almost, but not quite.
Arrows reverse: pulling measurements back
In §3.5 Maps, Invariance, and First Triumphs a map of spaces pushed chains forward: a simplex of is sent to its image in giving a chain map and an induced map Places travel in the direction of the map.
Measurements travel the other way. Your drive to work is a map from the half-hour of the journey into the country; a weather map is a measurement on the country. The weather map gives you a temperature for every minute of the drive — read it off wherever you happen to be — but no record of the drive will ever produce a weather map. A map carries measurements on back to and not the other way. In symbols: if measures chains of we can measure a chain of by first pushing it into and then measuring there. That defines a cochain on
called the pullback of Note the direction: goes from to but goes from cochains on to cochains on You have seen this reversal twice before. The preimage of §1.1 Sets and Functions takes subsets of back to subsets of and the transpose of §1.5 Linear Algebra turns a matrix from to into one from to A pullback is both at once: is on the simplices that land on (the sign records whether the orientation is kept) and elsewhere, and the matrix of is the transpose of the matrix of
A rule that turns spaces into groups and maps into homomorphisms in the same direction, like is called covariant; one that reverses the direction, like is called contravariant. (The precise language of functors waits for §5.1 Categories and Functors.) Hatcher puts the whole distinction in one sentence: “The basic distinction between homology and cohomology is thus that cohomology groups are contravariant functors while homology groups are covariant.”
Torsion moves up: the projective plane and the Klein bottle
Now the promised surprise. In §3.4 Computing Homology you met the real projective plane a square whose opposite sides are glued with a twist, and found and there is a loop that is not a boundary while twice it is — torsion. What does cohomology make of it?
Glue opposite sides of a square with a twist: to and to with the arrows. The corners become two vertices and the edges are (from to and the diagonal (from to the faces are two triangles with
Here is the computation of the figure in words. The triangles have and A 1-cocycle must therefore satisfy and Adding the two equations gives With integer values that forces and then But those are exactly the coboundaries: has the value on both and (each runs from to and on (which runs from to So
No integer measurement can detect the twisted loop The reason is visible in the equation because is a boundary, any cocycle must give it the value and the only integer whose double is is In algebraic terms, there is no non-zero homomorphism from to
The torsion has not vanished, though. In degree 2 a cochain is a pair of values on and a coboundary always has an even total Every pair with an even total is a coboundary, and the parity of can never be changed, so
Homology had in degree 1; cohomology has it in degree 2. The torsion has moved up one degree. Notice that even though cohomology is not just homology with a superscript.
With coefficients
Rerun the computation with values in where Now holds for every so the cocycle — a fence crossing the twisted loop once — is allowed, and it is not a coboundary (those are and So and in fact every group of with coefficients is in homology and cohomology alike. Mod-2 measurements can see one-sidedness that integer measurements cannot.
The Klein bottle
The Klein bottle — a square with one pair of sides glued straight and the other with a flip — has (§3.4 Computing Homology). The same computation as for the torus, with the twisted boundary formulas and of that section, gives cocycles with and
Again the free part matches homology and the has climbed from degree 1 to degree 2. With coefficients the Klein bottle has groups — exactly the same as the torus. Cohomology groups alone cannot tell the two surfaces apart mod 2; the cup product will (§4.5 The Cup Product). In general, a closed connected surface has when it is orientable and when it is not.
The Universal Coefficient Theorem
The examples suggest a rule: integer cohomology in degree has the free part of together with the torsion of That rule is a theorem, and it says that homology determines cohomology completely.
Hatcher proves it as Theorem 3.2 (Hatcher 2002, §3.1). Let us read the two pieces, for finitely generated groups (the only kind our complexes produce).
- is the group of homomorphisms from to — the “measurements of homology classes” from the pairing. If with finite, a homomorphism to must kill (an element of finite order can only go to the only integer of finite order, and it can do anything on So the free part of .
- is a new construction, defined properly in §5.2 Homological Algebra. For finitely generated groups it can be computed with three rules: and of a direct sum is the direct sum. So the torsion of .
In short:
Check it on and On the Klein bottle: and The “one 2, two places” picture is the reason the formula is true; the proof makes that picture precise.
Other coefficients
The theorem holds for any coefficient group with in place of the second
With and and as we computed by hand. When the coefficients form a field there is also a version of the theorem that uses homology with coefficients in itself; over a field every vector space is free, the term disappears, and is the dual vector space of same dimension, as we found by counting ranks. (With integer homology the term does not vanish in general: for and it is the whole of
| k = 0 | k = 1 | k = 2 | |
|---|---|---|---|
Torsion: the in homology degree 1 reappears in integer cohomology degree 2; the free parts match degree by degree. Euler characteristic from the real dimensions: , the same as
Exercises
Summary
Further reading
- The standard graduate treatment: “The Idea of Cohomology” (pp. 186–189), then the Universal Coefficient Theorem with full proofs, Ext, and the examples of this chapter. Read the opening pages first; the rest assumes more algebra.
- Cohomology as “ker A / im B whenever AB = 0”, with real coefficients, harmonic representatives, and a dictionary of the jargon. The gentlest rigorous companion to this chapter.
- Discrete forms and the discrete exterior derivative on meshes: the same transposed boundary matrices, put to work in geometry processing.
- Just over half an hour, algebra first: the (co)homology of tiny complexes as the failure of maps to be one-to-one or onto, with topology only at the end. A good companion to the “verdict on one map” view of this chapter.
- Slides for a short video in his “What is…?” series on YouTube (index at dtubbenhauer.com/youtube.html): homology and cohomology as two ladders of arrows pointing opposite ways, and the solid tetrahedron worked mod 2 in both directions. The source of this chapter’s tetrahedron.
- How cohomology was discovered in 1935, who named the coboundary, and how the universal coefficient problem was solved. Readable history with exact references.
- Impossible figures on cylinders, Möbius bands, tori and Klein bottles: a playful place to see first cohomology with different coefficients at work.
- Impossible by Degrees: Cohomology & Bistable Visual Paradox — Lewis Ghrist & Robert Ghrist (2026) freeCohomology with ℤ/2 coefficients from H⁰ to H², through gears, Necker cubes and tilings, with animations.