Cokernels are dual to , capturing “quotienting out by the image of ff” in contexts where that makes sense.

Throughout, assume C\mathcal C is a with a zero object (e.g. any ), hence zero morphisms 0A,B:AB0_{A,B}:A\to B.

Definition (Cokernel)

Given a morphism f:ABf:A\to B in C\mathcal C, a cokernel of ff is a morphism

q:BQq:B\to Q

such that:

  1. qf=0A,Qq\circ f = 0_{A,Q}, and
  2. (Universal property) for every morphism s:BTs:B\to T with sf=0A,Ts\circ f=0_{A,T}, there exists a unique morphism v:QTv:Q\to T with
    vq=s.v\circ q = s.
Equivalent characterizations

Equivalently, q:BQq:B\to Q is a of the parallel pair f,0A,B:ABf,0_{A,B}:A\rightrightarrows B.

Remarks

A cokernel, if it exists, is unique up to unique . Cokernels are (because coequalizers are epic).

Examples
  1. Ab\mathbf{Ab}. For f:ABf:A\to B a homomorphism, coker(f)B/im(f)\operatorname{coker}(f)\cong B/\operatorname{im}(f), and the cokernel map is the quotient BB/im(f)B\twoheadrightarrow B/\operatorname{im}(f).
  1. RR-Mod\mathbf{Mod}. For f:MNf:M\to N an RR-linear map, coker(f)N/im(f)\operatorname{coker}(f)\cong N/\operatorname{im}(f).
  1. Grp\mathbf{Grp}. For a group homomorphism f:GHf:G\to H, the cokernel is the quotient
    HH/ ⁣f(G) ⁣H \twoheadrightarrow H/\langle\!\langle f(G)\rangle\!\rangle
    where  ⁣f(G) ⁣\langle\!\langle f(G)\rangle\!\rangle is the normal closure of the subgroup f(G)f(G) in HH. (This is the coequalizer of ff and the trivial map GHG\to H.)