Let RR be a ring and let {Cn}nZ\{C^n\}_{n\in\mathbb Z} be . A cochain complex (C,d)(C^\bullet, d) is a collection of RR-linear maps

dn:CnCn+1(nZ)d^n : C^n \longrightarrow C^{n+1}\qquad (n\in\mathbb Z)

such that

dn+1dn=0for all n.d^{n+1}\circ d^n = 0\quad\text{for all }n.

Its cohomology modules are

Hn(C)=ker(dn)/im(dn1),H^n(C^\bullet)=\ker(d^n)/\operatorname{im}(d^{n-1}),

see .

Remarks
Examples
  1. Cochain complex concentrated in degree 0. For an RR-module MM, the diagram
    0M0\cdots \to 0 \to M \to 0 \to \cdots
    with MM in degree 00 is a cochain complex. Then H0MH^0\cong M and Hn=0H^n=0 for n0n\neq 0.
  1. Hom of a chain complex is a cochain complex. If (C,d)(C_\bullet,d) is a and MM is an RR-module, define
    HomR(C,M)n:=HomR(Cn,M),\operatorname{Hom}_R(C_\bullet,M)^n := \operatorname{Hom}_R(C_n,M),
    and set
    δn(φ):=φdn+1HomR(Cn+1,M).\delta^n(\varphi) := \varphi\circ d_{n+1} \in \operatorname{Hom}_R(C_{n+1},M).
    Then δn+1δn=0\delta^{n+1}\circ \delta^n=0 because dd=0d\circ d=0, so this is a cochain complex. This construction underlies the computation of from a .
  1. “Multiplication by xx” as a cochain complex. For xRx\in R, the 2-term cochain complex
    0RxR00 \to R \xrightarrow{\,\cdot x\,} R \to 0
    (degrees 010\to 1) has
    H0AnnR(x),H1R/xR.H^0 \cong \operatorname{Ann}_R(x),\qquad H^1 \cong R/xR.