In mathematics, specifically in homology theory and algebraic topology, cohomology is a general term for a sequence of abelian groups, usually one associated with a topological space, often defined from a cochain complex. Cohomology can be viewed as a method of assigning richer algebraic invariants to a space than homology. Some versions of cohomology arise by dualizing the construction of homology. In other words, cochains are functions on the group of chains in homology theory.

From its beginning in topology, this idea became a dominant method in the mathematics of the second half of the twentieth century. From the initial idea of homology as a method of constructing algebraic invariants of topological spaces, the range of applications of homology and cohomology theories has spread throughout geometry and algebra. The terminology tends to hide the fact that cohomology, a contravariant theory, is more natural than homology in many applications. At a basic level, this has to do with functions and pullbacks in geometric situations: given spaces X and Y, and some kind of function F on Y, for any mapping f : XY, composition with f gives rise to a function Ff on X. The most important cohomology theories have a product, the cup product, which gives them a ring structure. Because of this feature, cohomology is usually a stronger invariant than homology.

Singular cohomology is a powerful invariant in topology, associating a graded-commutative ring with any topological space. Every continuous map f: XY determines a homomorphism from the cohomology ring of Y to that of X; this puts strong restrictions on the possible maps from X to Y. Unlike more subtle invariants such as homotopy groups, the cohomology ring tends to be computable in practice for spaces of interest.

For a topological space X, the definition of singular cohomology starts with the singular chain complex:[1]

By definition, the singular homology of X is the homology of this chain complex (the kernel of one homomorphism modulo the image of the previous one). In more detail, Ci is the free abelian group on the set of continuous maps from the standard i-simplex to X (called "singular i-simplices in X"), and ∂i is the ith boundary homomorphism. The groups Ci are zero for i negative.

This has the effect of "reversing all the arrows" of the original complex, leaving a cochain complex

In what follows, the coefficient group A is sometimes not written. It is common to take A to be a commutative ring R; then the cohomology groups are R-modules. A standard choice is the ring Z of integers.

Some of the formal properties of cohomology are only minor variants of the properties of homology:

On the other hand, cohomology has a crucial structure that homology does not: for any topological space X and commutative ring R, there is a bilinear map, called the cup product:

defined by an explicit formula on singular cochains. The product of cohomology classes u and v is written as uv or simply as uv. This product makes the direct sum

into a graded ring, called the cohomology ring of X. It is graded-commutative in the sense that:[4]

Here are some of the geometric interpretations of the cup product. In what follows, manifolds are understood to be without boundary, unless stated otherwise. A closed manifold means a compact manifold (without boundary), whereas a closed submanifold N of a manifold M means a submanifold that is a closed subset of M, not necessarily compact (although N is automatically compact if M is).

In what follows, cohomology is taken with coefficients in the integers Z, unless stated otherwise.

The cup product on cohomology can be viewed as coming from the diagonal map Δ: XX × X, x ↦ (x,x). Namely, for any spaces X and Y with cohomology classes uHi(X,R) and vHj(Y,R), there is an external product (or cross product) cohomology class u × vHi+j(X × Y,R). The cup product of classes uHi(X,R) and vHj(X,R) can be defined as the pullback of the external product by the diagonal:[12]

Alternatively, the external product can be defined in terms of the cup product. For spaces X and Y, write f: X × YX and g: X × YY for the two projections. Then the external product of classes uHi(X,R) and vHj(Y,R) is:

Another interpretation of Poincaré duality is that the cohomology ring of a closed oriented manifold is self-dual in a strong sense. Namely, let X be a closed connected oriented manifold of dimension n, and let F be a field. Then Hn(X,F) is isomorphic to F, and the product

is a perfect pairing for each integer i.[13] In particular, the vector spaces Hi(X,F) and Hni(X,F) have the same (finite) dimension. Likewise, the product on integral cohomology modulo torsion with values in Hn(X,Z) ≅ Z is a perfect pairing over Z.

An oriented real vector bundle E of rank r over a topological space X determines a cohomology class on X, the Euler class χ(E) ∈ Hr(X,Z). Informally, the Euler class is the class of the zero set of a general section of E. That interpretation can be made more explicit when E is a smooth vector bundle over a smooth manifold X, since then a general smooth section of X vanishes on a codimension-r submanifold of X.

There are several other types of characteristic classes for vector bundles that take values in cohomology, including Chern classes, Stiefel–Whitney classes, and Pontryagin classes.

for any integers i and j and any commutative ring R. The resulting map

makes the singular homology of X into a module over the singular cohomology ring of X.

For example, let X be an oriented manifold, not necessarily compact. Then a closed oriented codimension-i submanifold Y of X (not necessarily compact) determines an element of Hi(X,R), and a compact oriented j-dimensional submanifold Z of X determines an element of Hj(X,R). The cap product [Y] ∩ [Z] ∈ Hji(X,R) can be computed by perturbing Y and Z to make them intersect transversely and then taking the class of their intersection, which is a compact oriented submanifold of dimension ji.

A closed oriented manifold X of dimension n has a fundamental class [X] in Hn(X,R). The Poincaré duality isomorphism

Although cohomology is fundamental to modern algebraic topology, its importance was not seen for some 40 years after the development of homology. The concept of dual cell structure, which Henri Poincaré used in his proof of his Poincaré duality theorem, contained the germ of the idea of cohomology, but this was not seen until later.

There were various precursors to cohomology.[15] In the mid-1920s, J. W. Alexander and Solomon Lefschetz founded the intersection theory of cycles on manifolds. On a closed oriented n-dimensional manifold M, an i-cycle and a j-cycle with nonempty intersection will, if in general position, have intersection an (i + j − n)-cycle. This leads to a multiplication of homology classes

which in retrospect can be identified with the cup product on the cohomology of M.

Alexander had by 1930 defined a first notion of a cochain, by thinking of an i-cochain on a space X as a function on small neighborhoods of the diagonal in Xi+1.

In 1931, Georges de Rham related homology and differential forms, proving de Rham's theorem. This result can be stated more simply in terms of cohomology.

In 1934, Lev Pontryagin proved the Pontryagin duality theorem; a result on topological groups. This (in rather special cases) provided an interpretation of Poincaré duality and Alexander duality in terms of group characters.

At a 1935 conference in Moscow, Andrey Kolmogorov and Alexander both introduced cohomology and tried to construct a cohomology product structure.

In 1936, Norman Steenrod constructed Čech cohomology by dualizing Čech homology.

From 1936 to 1938, Hassler Whitney and Eduard Čech developed the cup product (making cohomology into a graded ring) and cap product, and realized that Poincaré duality can be stated in terms of the cap product. Their theory was still limited to finite cell complexes.

In 1944, Samuel Eilenberg overcame the technical limitations, and gave the modern definition of singular homology and cohomology.

In 1945, Eilenberg and Steenrod stated the axioms defining a homology or cohomology theory, discussed below. In their 1952 book, Foundations of Algebraic Topology, they proved that the existing homology and cohomology theories did indeed satisfy their axioms.

In 1948 Edwin Spanier, building on work of Alexander and Kolmogorov, developed Alexander–Spanier cohomology.

Sheaf cohomology is a rich generalization of singular cohomology, allowing more general "coefficients" than simply an abelian group. For every sheaf of abelian groups E on a topological space X, one has cohomology groups Hi(X,E) for integers i. In particular, in the case of the constant sheaf on X associated with an abelian group A, the resulting groups Hi(X,A) coincide with singular cohomology for X a manifold or CW complex (though not for arbitrary spaces X). Starting in the 1950s, sheaf cohomology has become a central part of algebraic geometry and complex analysis, partly because of the importance of the sheaf of regular functions or the sheaf of holomorphic functions.

Grothendieck elegantly defined and characterized sheaf cohomology in the language of homological algebra. The essential point is to fix the space X and think of sheaf cohomology as a functor from the abelian category of sheaves on X to abelian groups. Start with the functor taking a sheaf E on X to its abelian group of global sections over X, E(X). This functor is left exact, but not necessarily right exact. Grothendieck defined sheaf cohomology groups to be the right derived functors of the left exact functor EE(X).[16]

That definition suggests various generalizations. For example, one can define the cohomology of a topological space X with coefficients in any complex of sheaves, earlier called hypercohomology (but usually now just "cohomology"). From that point of view, sheaf cohomology becomes a sequence of functors from the derived category of sheaves on X to abelian groups.

In a broad sense of the word, "cohomology" is often used for the right derived functors of a left exact functor on an abelian category, while "homology" is used for the left derived functors of a right exact functor. For example, for a ring R, the Tor groups ToriR(M,N) form a "homology theory" in each variable, the left derived functors of the tensor product MRN of R-modules. Likewise, the Ext groups ExtiR(M,N) can be viewed as a "cohomology theory" in each variable, the right derived functors of the Hom functor HomR(M,N).

Sheaf cohomology can be identified with a type of Ext group. Namely, for a sheaf E on a topological space X, Hi(X,E) is isomorphic to Exti(ZX, E), where ZX denotes the constant sheaf associated with the integers Z, and Ext is taken in the abelian category of sheaves on X.

There are various ways to define cohomology for topological spaces (such as singular cohomology, Čech cohomology, Alexander–Spanier cohomology or sheaf cohomology). (Here sheaf cohomology is considered only with coefficients in a constant sheaf.) These theories give different answers for some spaces, but there is a large class of spaces on which they all agree. This is most easily understood axiomatically: there is a list of properties known as the Eilenberg–Steenrod axioms, and any two constructions that share those properties will agree at least on all CW complexes.[17] There are versions of the axioms for a homology theory as well as for a cohomology theory. Some theories can be viewed as tools for computing singular cohomology for special topological spaces, such as simplicial cohomology for simplicial complexes, cellular cohomology for CW complexes, and de Rham cohomology for smooth manifolds.

One of the Eilenberg–Steenrod axioms for a cohomology theory is the dimension axiom: if P is a single point, then Hi(P) = 0 for all i ≠ 0. Around 1960, George W. Whitehead observed that it is fruitful to omit the dimension axiom completely: this gives the notion of a generalized homology theory or a generalized cohomology theory, defined below. There are generalized cohomology theories such as K-theory or complex cobordism that give rich information about a topological space, not directly accessible from singular cohomology. (In this context, singular cohomology is often called "ordinary cohomology".)

By definition, a generalized homology theory is a sequence of functors hi (for integers i) from the category of CW-pairs (XA) (so X is a CW complex and A is a subcomplex) to the category of abelian groups, together with a natural transformationi: hi(X, A) → hi−1(A) called the boundary homomorphism (here hi−1(A) is a shorthand for hi−1(A,∅)). The axioms are:

The axioms for a generalized cohomology theory are obtained by reversing the arrows, roughly speaking. In more detail, a generalized cohomology theory is a sequence of contravariant functors hi (for integers i) from the category of CW-pairs to the category of abelian groups, together with a natural transformation d: hi(A) → hi+1(X,A) called the boundary homomorphism (writing hi(A) for hi(A,∅)). The axioms are:

A spectrum determines both a generalized homology theory and a generalized cohomology theory. A fundamental result by Brown, Whitehead, and Adams says that every generalized homology theory comes from a spectrum, and likewise every generalized cohomology theory comes from a spectrum.[18] This generalizes the representability of ordinary cohomology by Eilenberg–MacLane spaces.

A subtle point is that the functor from the stable homotopy category (the homotopy category of spectra) to generalized homology theories on CW-pairs is not an equivalence, although it gives a bijection on isomorphism classes; there are nonzero maps in the stable homotopy category (called phantom maps) that induce the zero map between homology theories on CW-pairs. Likewise, the functor from the stable homotopy category to generalized cohomology theories on CW-pairs is not an equivalence.[19] It is the stable homotopy category, not these other categories, that has good properties such as being triangulated.

If one prefers homology or cohomology theories to be defined on all topological spaces rather than on CW complexes, one standard approach is to include the axiom that every weak homotopy equivalence induces an isomorphism on homology or cohomology. (That is true for singular homology or singular cohomology, but not for sheaf cohomology, for example.) Since every space admits a weak homotopy equivalence from a CW complex, this axiom reduces homology or cohomology theories on all spaces to the corresponding theory on CW complexes.[20]

Many of these theories carry richer information than ordinary cohomology, but are harder to compute.

Cohomology theories in a broader sense (invariants of other algebraic or geometric structures, rather than of topological spaces) include: