DeRham cohomology

Definition

Let Ωk(M) be the space of smooth k-forms on a smooth manifold M.

  1. A form ω∈Ωk(M) is closed if dω=0, where d is the exterior derivative.
  2. A form ω∈Ωk(M) is exact if ω=dη for some (k−1)-form η.

The De Rham cohomology group is defined as:

HdRk(M)=ker⁡(d:Ωk(M)→Ωk+1(M))im(d:Ωk−1(M)→Ωk(M)).

This means:

The quotient HdRk(M) measures how many closed k-forms are not exact. These equivalence classes are the cohomology classes.

How to find a closed p-form which is not exact?

@baez1994gauge
The trick is to use Stokes’ theorem. Suppose S⊆M is a circle embedded in M. If ω∈Ω1(M) equals df for some function f, then Stokes’ theorem implies

∫Sω=∫Sdf=∫∂Sf=0

because ∂S is the empty set! So if we can find a circle S⊆M with

∫Sω≠0,

we automatically know that ω is not exact.
This idea can be generalized to p-forms. For examples, we can use spheres to find closed 2-forms which are not exact.

Indeed, the converse is also true: if ∫Sω=0 for every compact oriented submanifold S of M then ω is exact. See @baez1994gauge page 125.