Tricki
a repository of mathematical know-how

How to compute the (co)homology of a space

Quick description

This will eventually become a list of many different techniques for computing homology and cohomology, including passing between different flavours (simplicial, singular, Cech, de Rham, sheaf), the advantages and disadvantages of each, the use of various long exact sequences and spectral sequences, universal coefficient theorems, and so on.

Prerequisites

A knowledge of various points of view on algebraic topology, and in particular on homology and cohomology, as well as some algebra (especially computing with exact sequences, and related methods of homological algebra). The precise requirements vary from example to example.

See also

How to use exact sequences

How to use spectral sequences

How to compute the cohomology of a sheaf

Example 1

If X is path-wise connected, then H_0(X) and H^0(X) are both isomorphic to \Z. More generally, if \pi_0(X) denotes the set of path components of X, then H_0(X) = \Z^{\oplus \pi_0(X)} (a direct sum of |\pi_0(X)| many copies of \Z), and H^0(X) = \Z^{\pi_0(X)} (a direct product of |\pi_0(X)| many copies of \Z). (More generally, if you are computing (co)homology with coefficients in an abelian group G, then replace \Z by G.)

The isomorphisms are quite concrete: if X_i is a particular path component of X, then the "basis vector" e_i \in \Z^{\oplus \pi_0(X)} = H_0(X) which is 1 in the ith component and 0 in all other components is generated by the class of any point lying in X_i, while if f = (f_i) \in \Z^{\pi_0(X)} = H^0(X), then f is represented by the 0-cochain which takes the value f_i on all the points in the path component X_i.

Example 2

As a general remark, it is useful when trying to compute (co)homology to have a geometric picture of the (co)chains that represent the various (co)homology classes that you are working with. The explicit descriptions of the isomorphisms in Example 1 are the most elementary examples of this. The discussion of the boundary map in Example 6 below, and the related computation in Example 7, give slightly more substantial examples.

Example 3

If X has dimension n (or is the union of pieces of dimension at most n), then H_i(X) and H^i(X) vanish if i > n.

Example 4

Homology and cohomology are homotopy invariants, i.e. if  X \rightarrow Y is a homotopy equivalence, then the maps induced by f on all homology and cohomology groups are isomorphisms.

For example, R^n \setminus \{0\} retracts onto the n-1-sphere S^{n-1}, and so has the same (co)homology as S^{n-1}. (For a computation of the homology of S^{n-1}, see Example 7 below.)

Example 5

As a special case of the preceding example, a contractible space has vanishing homology and cohomology in all degrees above 0, and \Z in degree 0 (as an instance of Example 1), or more generally, G in degree 0, if we compute (co)homology with coefficients in the abelian group G.

One way to show that a space is contractible is to embed it homeomorphically as a convex subspace of a Euclidean space.

Example 6

If the space X you are studying can be broken up in a reasonable way into a union of two pieces, say X = U \cup V, then the Mayer-Vietoris sequence can be used. This long exact sequence has the form

 \cdots \rightarrow H_i(U\cap V) \rightarrow H_i(U) \oplus H_i(V) \rightarrow H_i(X) \rightarrow H_{i-1}(U\cap V) \rightarrow \cdots

(Here I am working with homology, for definiteness, and to make the subsequent discussion somewhat more concrete. The Mayer-Vietoris sequence for cohomology works similarly, with all arrows reversed.) As with any long exact sequence arising in topology that one wants to work with, it is important to understand the maps.

The map H_i(U\cap V) \rightarrow H_i(U) \oplus H_i(V) is just the direct sum of the maps H_i(U\cap V) \rightarrow H_i(U) and H_i(U\cap V) \rightarrow H_i(V) induced by the inclusions U\cap V \subset U and U\cap V \subset V.

The map H_i(U)\oplus H_i(V) \rightarrow H_i(X) is the difference of the two maps H_i(U) \rightarrow H_i(X) and H_i(V) \rightarrow H_i(X) induced by the inclusions U\subset X and V\subset X.

The boundary map H_i(X) \rightarrow H_{i-1}(U\cap V) is the most interesting map, since it carries the geometric information describing exactly how X has been glued together from U and V.

Imagine that U and V meet along an "interface" U\cap V. If a class [c] \in H_i(X) is represented by an i-chain c (say a simplicial or singular chain), then we can cut [c] into two along the interface U\cap V, to write it as c = c_U + c_V, where c_U lies entirely in U, and c_V entirely in V. Now c was a cycle, i.e. \partial c = 0, since it represents a homology class. But neither c_U nor c_V will typically be a cycle, i.e. typically, their boundary is non-zero. (Imagine taking something without boundary, e.g. a closed loop, and slicing it in half. The two pieces you obtain will each have boundary.) Since \partial c = 0, we find that \partial c_U = - \partial c_V. (This reflects that geometrically c_U and c_V share a common boundary, along which we can reglue them to obtain the cycle c.) The boundary map H_i(X) \rightarrow H_{i-1}(U\cap V) is then defined via [c] \mapsto [\partial c_U]. (Note that [\partial c_U] makes sense, since \partial^2 = 0, so \partial c_U is a cycle. On the other hand, although \partial c_U is a boundary in U, it typically won't be a boundary in U\cap V, and so typically [\partial c_U] is non-zero in H_{i-1}(U\cap V).)

Example 7

We can apply the Mayer-Vietoris sequence to compute the homology of an n-sphere. If we slice an n-sphere down the middle, it gets decomposed into two n-disks glued along their common boundary, which is an (n-1)-sphere.

Our computation will thus be inductive, beginning with n = 0. Since S^0 is just the subset \{-1, 1\} \subset \R, i.e. a pair of points, we have from Example 1 that H_0(S^0) = \Z \oplus \Z, while Example 3 shows that H_i(S^0) = 0 for i > 0.

Let us now consider the case n = 1. If we cut the circle S^1 into two, it becomes the union of two intervals (or if you prefer, 1-disks), say U and V, glued along their common boundary U\cap V (which is a pair of points, i.e. S^0). Intervals are contractible (being convex; see Example 5), and so have vanishing homology above degree 0, and homology equal to \Z in degree 0.

The Mayer-Vietoris sequence thus becomes

 0 \rightarrow H_1(S^1) \rightarrow H_0(S^0) = \Z \oplus \Z\rightarrow  H^0(U)\oplus H^0(V) = \Z \oplus \Z \rightarrow H_0(S^1) \rightarrow 0.

(All homology vanishes in degrees i > 1, as we see either by contemplating the higher degree parts of the Mayer-Vietoris sequence, or by appealing to Example 3.) Thus everything hinges on understanding the third map. If this were an isomorphism, we would conclude that H_i(S^1) vanishes for all i. Of course, this is impossible, because Example 1 tells us that H_0(S^1) = \Z. We conclude that the third arrow must have an image of rank 1, and hence, by the rank-nullity theorem, it must also have a rank 1 kernel. Consequently, H_1(S^1)= \Z.

We could also directly compute the structure of the third arrow. Namely, if P and Q are the two points on the boundary of U \cap V, its source is spanned by [P] and [Q] (the homology classes of these two points). On the other hand, each of U and V is path connected, and so all points in U or V represent the same homology class. Thus [P] and [Q] map to the same element in H_0(U), and also map to the same element in H_0(V). Thus the image does inded have rank 1. And the kernel has an explicit description: it is spanned by [P] - [Q].

This also has a geometric meaning: if we consider the description of the boundary map in the Mayer-Vietoris sequence given in Example 6, we see that H_0(X) must be generated by the class [c] of some 1-cycle c such that, when we cut c into two and thus decompose it as c = c_U + c_V, we have \partial c_U = P - Q (or at least, the two should be homologous). But there is one obvious such 1-cycle, namely, the circle itself! Thus H_1(S^1) is generated by [S^1].

Proceeding with the induction, one finds that H_i(S^n) vanishes unless i = 0 or n. Of course, H_0(S^n) is generated by the class of any point, while H_n(S^n) is generated by [S^n].

Example 8

If M is any connected, compact, orientable n-dimensional manifold, then H_n(M) is isomorphic to \Z, and is generated by [M], the class of M itself. (To be precise, we have to fix an orientation of M in order for this class to be well-defined; reversing the orientation changes its sign.)

General discussion

Note iconIncomplete This article is incomplete. A careful, comparative, discussion of all the different methods is needed, as are zillions more examples.

Comments

Inline comments

The following comments were made inline in the article. You can click on 'view commented text' to see precisely where they were made.

(minor) correction?

If I recall correctly, the Mayer-Vietoris sequence tells you something about a space decomposed as two sets _whose interiors cover the space_. So I think U and V must intersect in two intervals (which are homotopically trivial, so the rest of the proof runs the same).

Inline comments

The following comments were made inline in the article. You can click on 'view commented text' to see precisely where they were made.

Helpful tip

Maybe it'd be nice to mention that if your space is being decomposed into U and V and these have non-empty intersection, then the end terms (H_0 and such) can be taken as reduced homology instead of just normal homology, simplifying some calculations.