Let RR be a and let

⋯→dn−1Cn→dnCn+1→dn+1⋯\cdots \xrightarrow{d^{n-1}} C^n \xrightarrow{d^{n}} C^{n+1} \xrightarrow{d^{n+1}} \cdots

be a of , i.e. dn+1∘dn=0d^{n+1}\circ d^{n}=0 for all nn.

The nnth cocycles and nnth coboundaries are

Zn(C∙):=ker⁡(dn)⊆Cn,Bn(C∙):=im⁡(dn−1)⊆Cn.Z^n(C^\bullet) := \ker(d^{n})\subseteq C^n, \qquad B^n(C^\bullet) := \operatorname{im}(d^{n-1})\subseteq C^n.

Since dn∘dn−1=0d^{n}\circ d^{n-1}=0, one has Bn(C∙)⊆Zn(C∙)B^n(C^\bullet)\subseteq Z^n(C^\bullet). The nnth cohomology module is

Hn(C∙):=Zn(C∙)/Bn(C∙).H^n(C^\bullet) := Z^n(C^\bullet) / B^n(C^\bullet).
Properties

A cochain complex is exact (as a sequence of modules) iff all its cohomology modules vanish; see .

Examples

Example 1: Two-term cochain complex over Z\mathbb Z

Let C0=ZC^0=\mathbb Z, C1=ZC^1=\mathbb Z, d0=×nd^0=\times n with n≠0n\ne 0, and Ci=0C^i=0 otherwise. Then

H0(C∙)=ker⁡(×n)=0,H1(C∙)=coker⁡(×n)≅Z/nZ.H^0(C^\bullet)=\ker(\times n)=0,\qquad H^1(C^\bullet)=\operatorname{coker}(\times n)\cong \mathbb Z/n\mathbb Z.

Example 2: Ext\mathrm{Ext} as cohomology (concrete computation)

Let R=ZR=\mathbb Z. A of Z/nZ\mathbb Z/n\mathbb Z is

0→Z→×nZ→Z/nZ→0.0\to \mathbb Z \xrightarrow{\times n} \mathbb Z \to \mathbb Z/n\mathbb Z \to 0.

Apply (−,Z)(-,\mathbb Z) to get a cochain complex

0→Hom⁡(Z,Z)→×nHom⁡(Z,Z)→0,0 \to \operatorname{Hom}(\mathbb Z,\mathbb Z) \xrightarrow{\times n} \operatorname{Hom}(\mathbb Z,\mathbb Z)\to 0,

which identifies with

0→Z→×nZ→0.0\to \mathbb Z \xrightarrow{\times n} \mathbb Z \to 0.

Thus

ExtZ1(Z/nZ,Z)  ≅  H1(Hom⁡(P∙,Z))  ≅  Z/nZ.\mathrm{Ext}^1_{\mathbb Z}(\mathbb Z/n\mathbb Z,\mathbb Z) \;\cong\; H^1(\operatorname{Hom}(P_\bullet,\mathbb Z)) \;\cong\; \mathbb Z/n\mathbb Z.

(See .)

Example 3: Vanishing over a field

If kk is a field and V,WV,W are kk-vector spaces, then every kk-module is and . Hence

Extkn(V,W)=0for all n>0\mathrm{Ext}^n_k(V,W)=0\quad \text{for all }n>0

(see ), because one may take a length-0 projective (or injective) resolution and the resulting cochain complex has zero cohomology in positive degrees.