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

dn:Cn⟶Cn+1(n∈Z)d^n : C^n \longrightarrow C^{n+1}\qquad (n\in\mathbb Z)

such that

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

Its cohomology modules are

Hn(C∙)=ker⁡(dn)/im⁡(dn−1),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
    ⋯→0→M→0→⋯\cdots \to 0 \to M \to 0 \to \cdots
    with MM in degree 00 is a cochain complex. Then H0≅MH^0\cong M and Hn=0H^n=0 for n≠0n\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
    Hom⁡R(C∙,M)n:=Hom⁡R(Cn,M),\operatorname{Hom}_R(C_\bullet,M)^n := \operatorname{Hom}_R(C_n,M),
    and set
    δn(φ):=φ∘dn+1∈Hom⁡R(Cn+1,M).\delta^n(\varphi) := \varphi\circ d_{n+1} \in \operatorname{Hom}_R(C_{n+1},M).
    These Hom groups form a cochain complex of abelian groups in general. If RR is commutative (or the Hom groups carry a specified compatible scalar action), they may be viewed as a cochain complex of RR-modules. Then δn+1∘δn=0\delta^{n+1}\circ \delta^n=0 because d∘d=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 a commutative ring RR and x∈Rx\in R, the 2-term cochain complex
    0→R→ ⋅x R→00 \to R \xrightarrow{\,\cdot x\,} R \to 0
    (degrees 0→10\to 1) has
    H0≅Ann⁡R(x),H1≅R/xR.H^0 \cong \operatorname{Ann}_R(x),\qquad H^1 \cong R/xR.