Canonical: https://knowlpedia.com/algebra-category-theory/cokernel-categorical/

# Cokernel (categorical)

In a pointed category, the cokernel of f:A→B is the coequalizer of f and the zero morphism A→B.

Let \(\mathcal C\) be a [category](https://knowlpedia.com/algebra-category-theory/category/) with a zero object, and hence with zero morphisms \(0_{A,B}:A\to B\). Given a morphism \(f:A\to B\), a **cokernel** of \(f\) is a morphism
\[
q:B\to Q
\]
such that:

1. \(q\circ f = 0_{A,Q}\), and
2. for every morphism \(s:B\to T\) with \(s\circ f=0_{A,T}\), there exists a unique morphism \(v:Q\to T\) with
   \[
   v\circ q = s.
   \]

This construction is dual to a [kernel](https://knowlpedia.com/algebra-category-theory/kernel-categorical/).

## Equivalent characterizations

Equivalently, \(q:B\to Q\) is a [coequalizer](https://knowlpedia.com/algebra-category-theory/coequalizer/) of the parallel pair \(f,0_{A,B}:A\rightrightarrows B\).

## Remarks

A cokernel, if it exists, is unique up to unique [isomorphism](https://knowlpedia.com/algebra-category-theory/isomorphism-category/). Cokernels are [epimorphisms](https://knowlpedia.com/algebra-category-theory/epimorphism-category/) (because coequalizers are epic).

## Examples

1. **\(\mathbf{Ab}\).** For \(f:A\to B\) a homomorphism, \(\operatorname{coker}(f)\cong B/\operatorname{im}(f)\), and the cokernel map is the quotient \(B\twoheadrightarrow B/\operatorname{im}(f)\).

2. **\(R\)-\(\mathbf{Mod}\).** For \(f:M\to N\) an \(R\)-linear map, \(\operatorname{coker}(f)\cong N/\operatorname{im}(f)\).

3. **\(\mathbf{Grp}\).** For a group homomorphism \(f:G\to H\), the cokernel is the quotient
   \[
   H \twoheadrightarrow H/\langle\!\langle f(G)\rangle\!\rangle
   \]
   where \(\langle\!\langle f(G)\rangle\!\rangle\) is the normal closure of the subgroup \(f(G)\) in \(H\). (This is the coequalizer of \(f\) and the trivial map \(G\to H\).)
