I have just finished a Tricki article about how to recognise situations where homology and cohomology can help you. (It is aimed at people who might have seen the definitions but felt uncomfortable about how to apply them.) Ages ago, I sort of promised to write something on this topic on this blog, so I am posting the article. This will have the added, though no doubt painful, benefit that people who know far more about the topic will be able to point out mistakes, misleading statements, unnecessarily complicated ways of thinking about things, and so on. But the one thing I do like is the (admittedly old-fashioned) way of looking at homology and cohomology as “soap-bubble homotopy”. See below for an explanation.

**Quick description**

There are several examples of two-dimensional topological invariants that take integer values, and that do not appear to have numerical generalizations in higher dimensions. When this is the case, it may well be that the correct way of generalizing your invariant is to regard the integers as elements of a homology or cohomology group. Then you may well be able to generalize it to higher dimensions by looking at higher homology or cohomology groups.

**Introduction**

The main content of this article is an extended discussion of Brouwer’s fixed point theorem. This could be thought of as one long example with various sub-examples of increasing dimension. Throughout the discussion we shall argue somewhat informally, since the main aim is not to give a rigorous development of homology theory, but rather to help the reader (or rather the reader who needs help with this) to recognise the kinds of circumstances in which homology is likely to be a useful tool. To do this properly would take many more articles, since there are many kinds of homology in many different contexts. But it is at least a start.

**Example: How thinking about Brouwer’s fixed point theorem leads naturally to cohomology.**

*Part 1. The intermediate value theorem.*

Here is an informal argument for the intermediate value theorem. Let $f$ be a continuous function from to and suppose that . For every real number let be the set of such that . Although our official assumption is merely that is continuous, we shall pretend that a bit more is true and is a reasonably straightforward continuous function, so that for instance is always a finite set. (It is possible to deduce the general case from simplified cases when is well-behaved in this kind of way.)

Our strategy will be to understand well enough how the sets vary as varies to be able to prove that they are non-empty whenever lies between and . For convenience we shall assume that is the minimum value taken by . (This is not a huge assumption, since we can replace by the continuous function , and we can perturb that slightly so that no value is taken more than finitely many times.)

A first observation that is encouraging is that typically if you perturb by a very small amount, then also changes in a very small way: if it contains points then those points just move slightly. When , consists of the single point , so we might hope that there is no way of making disappear.

On the other hand, a slightly *dis*couraging observation is that it *is* possible for points to appear and disappear. To see this, one can think of as the set of x-coordinates of the points where the line intersects the graph of . If this line crosses over a local minimum of the graph, then a new point appears that splits immediately into two, and if it crosses a local maximum then two points come together and disappear.

But one then spots that these creations and annihilations of points always seem to create or annihilate *pairs* of points (except at the very moment of creation when you have a point of tangency). Since the number of points in is , and therefore odd, the number of points will always be odd (again, except when the line is tangent to the curve somewhere).

Another way of looking at this is to consider whether the graph of is crossing the line upwards or downwards. The points in the set will start with an up crossing, then alternate between down and up crossings, ending with an up. And although the number of crossings may change, the number of up crossings minus the number of down crossings will be constant. Since it starts as , it is always .

*Part 2. Brouwer’s fixed point theorem in two dimensions.*

Now let us give an informal proof of a statement that is easily seen to be equivalent to Brouwer’s fixed point theorem. The statement is that if is a continuous map from the square to itself, and if whenever is on the boundary of the square (which happens when either or is either or ), then there must exist such that .

There are many informal (but convincing) arguments for this. The one we choose here is not obviously the best, but it is good from the point of view of demonstrating how the notion of homology emerges naturally, and it is a natural generalization of the discussion of the intermediate value theorem above. What we shall do is look for each at the set of points such that for some . That is, we shall take the vertical line segment from to and look at its inverse image under .

To simplify matters, let us assume to begin with that is a reasonably smooth bijection. If is the inverse of , then is a path from to . Therefore, is a path from to , and is a continuous function from this path to that begins at and ends at . Hence, by the intermediate value theorem it must cross .

Of course, this is not much of an achievement: if is a bijection then of course there is a point that maps to . However, it does suggest a line of attack when is not a bijection: as we did when thinking about the intermediate value theorem, we just try to think what the sets could possibly look like and how they could vary as varies.

Here is an example that shows the kind of thing that can happen as goes from to . When , equals the line segment . Now imagine starting at and taking for a while, but then at a certain time , letting be the union of with one further point, which necessarily lies to the right of (since the sets are disjoint). As increases from this , let the point turn into a tiny circle that expands until at some moment it becomes tangent to . At this stage, all points inside the circle or to the left of have been used, but we can think of as a path that goes up from until it touches the circle, goes once anticlockwise round the circle, and continues up to . This path can be continuously deformed through the unused region until it reaches . For example, if is just a tiny bit larger than , then could start at , go up until it nearly hits the circle that touches , go round keeping close to that circle until it hits again, and continue on up to .

Here is another way of visualizing that example. Imagine the graph of the function that takes a point in to the x-coordinate of . Then is the set of points in this graph of height . If were the identity function, then would equal , and the graph would be a flat shape that sloped upwards at 45 degrees. If you intersected this graph with an ever-rising horizontal plane, you would see a unit line segment that moved steadily to the right, and the segment would be a contour line of the graph. The second example above was what you might get if you pushed part of the graph far enough downwards to make a local minimum. Now when the horizontal plane moved up, the intersections with the graph would start as before, but then the plane would touch the graph at the local minimum, adding a point to the intersection, and after that the point would expand into a circle, which would eventually touch the line (when the horizontal plane reached some kind of saddle point of the graph) and in general exhibit the kind of behaviour discussed in the last paragraph.

In any case, what we have just established is that the sets do not have to be paths, or even connected sets: they can for example be disjoint unions of paths with closed curves. However, all is far from lost. It seems that whatever the graph looks like, the only ways that the sets can change are as follows. You have a path that gradually moves to the right. Sometimes little closed curves can appear and grow. Sometimes these curves expand to the point where they touch each other. Immediately after they touch, the point where they touch pulls apart and the two curves have become one. And the reverse can happen: two parts of a curve can come round and meet each other, and a loop can break off, shrink, and disappear.

(If anyone was able to produce animations of these processes, it would be absolutely wonderful and would greatly enhance the article.)

But it seems as though whatever you do, will always contain a path from to . And since is a continuous function from to , if that is the case, then by the intermediate value theorem there must be a point on this path where takes the value . In particular, this is true when .

*Brouwer’s fixed point theorem in three dimensions.*

Let us not try to prove rigorously that contains a path from to . Instead, let us assume that the argument just given was basically OK and see whether we can develop it into an inductive proof of Brouwer’s fixed point theorem, which we might hope to be able to do, given that we used the one-dimensional version (the intermediate value theorem) to prove the two-dimensional version.

This time we shall take a continuous function that fixes the boundary, and attempt to persuade ourselves that there must be some such that . And to generalize the previous two arguments, for each we shall define to be the set of all such that the x-coordinate of is . We shall then think about how the sets can vary as goes from to , in the hope of being able to say enough about to establish that it must contain a point that maps to .

What do we know about the sets (again, assuming for convenience that is a reasonably nice and generic function, which it will always be after a suitable perturbation)? We know that if , then is the square , that in general contains the set , and that the sets are disjoint and vary continuously. We can think of them as “contour planes” of a continuous function defined on , though now the graph of the function, being a four-dimensional object, is difficult to visualize.

Given this set-up and what we want to prove, an obvious hypothesis suggests itself, which generalizes what appeared to be the case, even if we did not prove it, in two dimensions. Perhaps for every the set contains a set homeomorphic to a square, with boundary the set . If so, then we would have a continuous function from to the square , which we could convert, by suitable compositions, into a continuous function from the two-dimensional unit square to itself that fixed the boundary. Applying the two-dimensional result, we would then find a point that mapped to which we could then translate back to a point that mapped to .

This all feels very promising. Unfortunately, it doesn’t work, as the following example shows. Define to be the square . And now, as increases let begin by equalling . Then at a certain moment, allow a point to appear to the right of , which immediately becomes a small sphere. As continues to increase, let this sphere expand but at the same time elongate into a sausage shape, which bends round until the two ends meet. Just after they meet, let the meeting point disappear so that the sausage is now a torus. (All the while, forms another part of that has made no contact with the sausage/torus.) A bit later, as the torus expands and keeps moving towards it, the inevitable happens and they touch. Just after contact is made, the point of contact disappears, and now has become a surface whose boundary is the set . This surface is no longer homeomorphic to a square, but rather to a square with a handle. As continues to increase, this handle gets fatter and fatter (imagine a donut that you ice more and more until the hole disappears) until eventually it ceases to have a hole and is once more a surface homeomorphic to a square that moves continuously over to .

If that made any sense, it has shown that can have an interesting topology. And clearly we could have given many more handles if we had wanted to. So where does that leave our project of finding an inductive proof of Brouwer’s fixed point theorem?

Well, it shows that the two-dimensional statement does not directly imply the three-dimensional statement, because the two-dimensional statement is too weak (as it just concerns surfaces that are homeomorphic to a square). But this is not a reason to give up trying: it is just an invitation to strengthen our inductive hypothesis.

How might we do this? An obvious answer is to try to work out what surfaces can arise in the three-dimensional problem and to prove an appropriate two-dimensional statement for all such surfaces.

Let us assume what in fact turns out to be the case: that in the three-dimensional problem will always have the topology of a square with some handles. Then the appropriate two-dimensional statement is that if you have a surface with that topology bounded by a square, and if you map the surface continuously to the square in such a way that the boundary is fixed, then the image of your map must contain the centre of the square.

Since we don’t want to throw away our earlier ideas, let us see if we can use the methods we had before to argue that this must indeed be the case. For consistency, let the square be , so the surface is bounded by . And for each , let us now define to be the inverse image of the line segment . That is, is the set of all points in the surface that map to a point with -coordinate equal to .

We are in much the same situation as before, except that now our contour lines lie on a surface with handles instead of on a square. So how can they behave? Clearly little circles can form, expand, merge, pinch off and contract, just as before. But what about the handles? How do the curves (or collections of curves) get past handles?

To get a feel for this, imagine gradually lowering a torus into a basin of water and looking at the behaviour of the curve of points that are level with the surface of the water. Initially you will get a point, which will expand into a closed curve that will elongate. Then as the water starts to go over the whole of the bottom part of the torus, the elongated curve will pinch in the middle until it forms a figure of eight, which will then turn into two closed curves that will move away from each other. They will then come back and the whole process will be reversed.

The point to note here is that we are not observing any new phenomena: we still have little closed curves forming and merging with other curves, or being pinched off and disappearing. So it looks as though we have the ideas for a proof, even if we do not yet have the proof.

**General discussion.**

The point of this article is not to turn the above arguments into a rigorous proof, though that could undoubtedly be done. Rather, it is to draw attention to the kinds of thoughts that went into the arguments: thoughts about collections of curves with mergers and pinchings, about tidy arguments in low dimensions that do not generalize quite as one might hope to higher dimensions, and so on. All these are signs that homology is involved. And if that is the case, then the work that you would need to do to make the above arguments rigorous has already been done, so it is better to learn how to use the machinery that has been built. Best of all is of course to understand how the machinery is built, but the point is that the somewhat complicated work needed to make it rigorous should be done once and for all, and after that the machinery can just be used.

*What are homology groups?*

One way of thinking about homology is as what one might call “soap-bubble homotopy”. For example, if one is looking at curves in the plane with a few points removed, then two closed curves and will be homotopic if you can continuously deform to without crossing any of , and the fundamental group of is formed out of homotopy classes. To be more accurate, the elements of the fundamental group are homotopy classes of closed curves that begin and end at one particular arbitrarily chosen point, known as the base point.

With homology, one no longer needs to bother with base points. But a bigger difference is that the basic objects are not closed curves but *collections* of closed curves (just as we were seeing in the discussions above). One can define a *cycle* to be a collection , where the are closed curves (thought of as continuous functions from to such that ) that do not have to be distinct. (So the collection is not a set but a multiset.)

There is an equivalence relation on cycles that is given by the following rules. Let us think of a cycle as a collection of not necessarily closed paths that can be put together to form a collection of closed paths. Then we are allowed to reparametrize the , or cut them up into smaller paths, or put two paths together if the end point of one is equal to the start point of another. We are also allowed to *cancel* two paths if one is the same as the other, but backwards. Finally, and most importantly, we are allowed to do continuous deformations of these paths as long as at every stage they can be put together to form collections of closed paths. This allows operations such as a circle stretching into a (two-dimensional) sausage shape, the two ends bending round until they meet, and then the point where they meet pulling apart so that you have two circles, one inside the other, traversed in opposite directions. Two equivalent cycles are called *homologous*, and the equivalence classes are called *homology classes*. The homology classes are the elements of the homology group. To add two homology classes, pick representatives and and take the homology class of the multiset .

All this generalizes to higher dimensions. For example, if you have two spheres in some space and can continuously deform them until they touch (and if they are oriented in the same way), then the point where they touch can open up and the two spheres can become one sphere. In the other direction, you can pinch the equator of a sphere down to a point and then split that point up so that you have two spheres. And so on.

Now imagine taking two closed surfaces and in and gradually deforming them. If they are reasonably generic, then their intersection will be a one-dimensional set, and since that one-dimensional set will not have end points, it will be a collection of closed curves. (As an example, two spheres intersect in a circle, and a torus can intersect a suitably placed large sphere in two paths that are almost circles.) As the surfaces and move, so does their intersection, and the way it can move is remarkably similar to the processes we have described above: closed paths can merge or split, and so on. (Indeed, the description of a torus intersecting a plane was very much like this, though here we are thinking of closed bounded surfaces.) This observation suggests that the intersection of two homology classes is a well-defined homology class. That is, if you take two cycles in some space and intersect them, then the homology class of their intersection should be unchanged if you replace the cycles with homologous ones.

Under many circumstances, this is indeed the case, and it leads to the notion of *co*homology. Given a -dimensional manifold , the cohomology group consists of homology classes of *co*dimension , with addition defined just as it is in the homology group. This might seem rather artificial, since all we have done is taken the homology group and given it a new name ($H^n(M)$ instead of ), but there are two immediate reasons for its being natural. The first is that if we have a continuous map from to an -dimensional manifold, then the inverse image of a point will, in the generic situation, be a set of codimension , and this is indeed the situation we found ourselves in above. Secondly, the intersection of two cohomology classes (as defined in the previous paragraph), one in and the other in , belongs to . It can be shown that this binary operation turns the group into a *graded ring*: addition is defined pointwise, and multiplication is the obvious extension of the intersection operation just defined. This extra multiplicative structure is what gives cohomology its advantage over homology.

**How thinking about Brouwer’s fixed point theorem leads naturally to cohomology (continued).**

Let us return to the discussion about Brouwer’s theorem, this time assuming that all the basic facts about cohomology (chiefly that the product operation is well-defined) have been established. How can we convert the informal arguments into a statement about cohomology?

First, let us rephrase the problem very slightly. We have a continuous function from to itself that fixes the boundary, and we want to prove that has a preimage. We have been trying to do this by first understanding the inverse image of , and then inside that the inverse image of and finally inside that the inverse image of . Our hope has been that the first set, being homologous to a square, is sufficiently similar to a square for the two-dimensional argument to continue to be valid.

This discussion is slightly complicated by the presence of the boundary, so our trick will be to convert into a three-dimensional torus by identifying parts of the boundary appropriately. To be precise, we shall identify with , with and with . If we do this, then we can convert our continuous map that fixes the boundary into a a continuous map , since always maps equivalent points to equivalent points. Then our aim is to prove that is contained in the image of .

For let be the two-dimensional torus defined by taking all points such that . Then is the intersection of the three sets , each of which is the inverse image of under the continuous function that takes to the th coordinate of .

Let us write that less wordily: we are trying to prove that . (Strictly speaking we should write here.) Now each set is a representative of some element of the cohomology group , and if we let vary from to , the sets will move in a soap-bubbly way from to , which is an informal way of saying that the cohomology class of remains constant. Therefore, since the product operation is well-defined, the cohomology class of the intersection is the same as the cohomology class of the intersection . But that intersection is (at least in the case where no internal points map to the boundary) just the point (together with a plus sign that comes from the way the three sets are oriented) and is therefore a non-trivial element of the cohomology group (which is isomorphic to ). It follows that is non-empty, since otherwise its cohomology class would be .

**General discussion.**

The moral of the article so far (this is probably all that I am going to write, but maybe others could add some more examples), is that if your intuition tells you that inverse images of points or other nice sets should vary in a soap-bubbly way, then the effort of making that intuition precise has been done for you and encapsulated in the notion of a homology or cohomology group.

This is of course just the beginning of a huge story: there are many kinds of cohomology, and many applications that are nothing like the one just given. But it gives a start.

As a final remark, what is the meaning of the title of this article? Well, the homology group of a manifold consists of equivalence classes of finite sets of points, each with a sign attached. Two points of opposite sign can come towards each other and then cancel out, and a pair of points of opposite sign can be created ex nihilo. (Think back to the intermediate value theorem and the crossing points of a graph with a horizontal line.) The sum of the signs is obviously invariant, and this invariant takes values in . So the point is that if you have defined an integer invariant, and if it involved adding up signs attached to points, then the values of your invariant are really elements of a zeroth homology group. Once you think this way, then it makes it much clearer how to generalize your invariant to higher dimensions.

May 7, 2009 at 2:42 pm |

[…] Math and more math. […]

May 7, 2009 at 6:51 pm |

The sort of animation that you wished for is easily made with Mathematica using the ContourPlot command. For example, see the animated GIF images at http://ditka.fmf.uni-lj.si/~andrej/curves/ . For example curve3.gif was generated by the following code (also posted at the URL):

If someone can suggest a good function to try, I’ll generate the GIFs.

May 7, 2009 at 10:55 pm |

Here’s my attempt to design a function that has contours that are described by the account I gave. I’ll start with , to get the straight line going from one side to another. I then want to perturb that by making a hole in it, so I need to add a function that’s zero on the boundary of the square and goes downwards. Also, I want the hole to be a bit to the right. So I think I’d go for something like and would end up taking . I’m doing this in my head so I’m not 100 percent certain that it would look nice, but I have put a bit of effort into it.

May 8, 2009 at 7:07 am |

The function you suggested works nicely, but I had to change it to h(x,y) = x – g(x,y)^3 because division by three killed the bubble. The result is at http://ditka.fmf.uni-lj.si/~andrej/curves/gowers-faster.gif and it looks pretty nice. The line moves very slowly after it absorbs the bubble, so I made the animation go faster after the interesting bit with the bubble happens. Here is the Mathematica code that made the picture:

It should also be possible to animate surfaces this way. Feel free to use the animation however you like. Please copy it to your computer, I won’t keep it forever. And thank you for a very interesting post (as usual)!

May 8, 2009 at 8:34 am |

I apologize for posting so many comments, but I made a further improvement. In the last attempt the bubble was there immediately at time 0. By changing the function slightly we get an animation that is exactly like the description in the post. Let’s see if the blog allows me to embed pictures (the address is http://ditka.fmf.uni-lj.si/~andrej/curves/gowers-better.gif):

The function used to generate this is h(x,y) = x – 0.8 * g(x,y)^5 with g(x,y) = (1-x)^2 (1+x)^4 (1 – y^2)^6.

May 8, 2009 at 8:36 am |

Argh, now the blog incorrectly attached a closing parenthesis to the link. The new animation is at http://ditka.fmf.uni-lj.si/~andrej/curves/gowers-better.gif (I feel like a guy in a movie who leaves 20 messages on the answer machine.)

May 8, 2009 at 9:56 am |

Many thanks! Now all I need to do is work out how to attach that animation to the Tricki article …

May 12, 2009 at 12:49 am |

Just a small typo: in line 3 of Part 1 one should probably have $f(0)\neq 0$ rather than just $f(0)0$ (at least this is how it is displayed by my browser, Firefox 3).

May 23, 2009 at 12:44 am |

I have had a question about cohomology/homology ever since grad school. Perhaps this forum can help. When we are taught about the cup product, it is presented as additional structure in cohomology which homology does not possess. This operation essentially derives from the diagonal map from a space A into AxA. The cohomology is contravariant, so we get a map from H*(AxA) to H*(A) and from this and the Kunneth formula we get the cup product. My conjecture is that homology admits exactly the same amount of structure as cohomology, but because it is a covariant functor, the resulting algebraic structure is less familiar than a product; it’s more like a “coproduct”. Is this true?

May 23, 2009 at 3:20 am

Yes, you get a coalgebra strucure on homology, which, as you remark, is less familiar.

Cohomology has other advantages, though, which are related to the fact that you get an algebra strucure, rather than a coalgebra structure: essentially, being contravariant, rather than covariant, is more natural (surprising as this might seem at first). For example, functions on spaces are contravariant: they pull-back. The same is true of differential forms (which is why these can be used to compute a version of cohomology — de Rham cohomology — rather than a version of homology). Vector fields, on the other hand, can’t be pushed forward in general (because several points might map to one point, so while you can push forward on individual fibres of the tangent bundle, you can’t pushforward a section of the tangent bundle in general). While there are covariant geometric structures, these are less familiar than functions or forms.

So the familiarity of the ring structure on cohomology is aligned (so to speak) with the familiarity of notions like functions and forms and their contravariant nature. It is these (and other) observations taken together that tend to make cohomology, rather than homology, the default choice in many situations.

June 6, 2009 at 1:13 pm |

[…] Cohomology for amateurs — by an amateur […]

August 14, 2009 at 9:00 pm |

[…] gowers 2009-05-07 17:00:46 More: Cohomology for amateurs—by an amateur « Gowers's Weblog […]

June 25, 2019 at 12:20 pm |

I would encourage mathematicians to learn javascript and SVG rather than mathematica for mathematical visualisation.

I would start with mozilla MDN and take serious looks at codepen.io.

June 25, 2019 at 12:24 pm |

Dr. Gowers, I looked for your article on tricki and can’t find it. Here was my search path.

search “cohomology” — nothing

search “homology” — nothing

search “gowers” — your profile, no links to your articles

http://www.tricki.org/tricki/articles —> click on “how to use cohomology” —-> 404 <— http://www.tricki.org/article/How_to_use_cohomology

August 13, 2019 at 2:44 pm

I think I never got round to this …