# Cokernel

The **cokernel** of a homomorphism \( f: M \to N \) between modules (or, more generally, between objects of an abelian category) is the quotient of the target by the image of \( f \). For an \( R \)-module homomorphism \( f \), it is defined as

\[ \operatorname{coker}(f) = N / \operatorname{im}(f), \]

where \( \operatorname{im}(f) \) is the submodule of \( N \) consisting of all \( y \in N \) with \( y = f(x) \) for some \( x \in M \)<sup>[1](https://www.math.uwo.ca/faculty/jardine/courses/homalg/homalg-lecture001.pdf)</sup>. The cokernel measures what remains of the target after the image is collapsed to zero; it is the dual notion to the kernel, which measures what is lost at the source.

| Key fact | Detail |
|---|---|
| Definition (modules) | For \( f: M \to N \) an \( R \)-module homomorphism, \( \operatorname{coker}(f) = N/\operatorname{im}(f) \)<sup>[1](https://www.math.uwo.ca/faculty/jardine/courses/homalg/homalg-lecture001.pdf)</sup> |
| Canonical exact sequence | \( 0 \to \ker(f) \to M \xrightarrow{f} N \to \operatorname{coker}(f) \to 0 \) is exact for every \( f \)<sup>[1](https://www.math.uwo.ca/faculty/jardine/courses/homalg/homalg-lecture001.pdf)</sup> |
| Universal property | Homomorphisms \( \operatorname{coker}(f) \to D \) correspond to homomorphisms \( g: N \to D \) with \( g \circ f = 0 \)<sup>[2](https://leorneuhauser.com/files/algtop/AT24_rec12.pdf)</sup> |
| Nonabelian groups | The cokernel of \( \varphi: G \to H \) is the quotient by the normal closure of the image, \( H/\langle \operatorname{im} \varphi \rangle \)<sup>[3](https://ncatlab.org/nlab/show/cokernel)</sup> |
| Matrix cokernel | For an \( m \times n \) integer matrix \( M \), \( \operatorname{cok}(M) = \mathbb{Z}^m/\operatorname{im} M \); for \( M = [5] \) this is \( \mathbb{Z}/5\mathbb{Z} \)<sup>[4](https://people.reed.edu/~davidp/372/lectures/10fri-lecture.pdf)</sup> |
| Structure theorem | Over a PID, every finitely generated module is the cokernel of a matrix, and \( \operatorname{coker}(A) \cong R^{m-r} \oplus R/(a_1) \oplus \cdots \oplus R/(a_r) \) with \( a_r \mid a_{r-1} \mid \cdots \mid a_1 \)<sup>[5](https://www.math.iitb.ac.in/~saurav/MA5101/2016/ma5101-notes-2.pdf)</sup> |
| Functorial behavior | A functor between abelian categories is right exact if it preserves cokernels; the tensor product \( - \otimes_R N \) is right exact<sup>[6](https://ncatlab.org/nlab/show/exact%2Bfunctor)</sup><sup> • </sup><sup>[7](https://www.math.ucla.edu/~sharifi/notes/algebra-ch12.html)</sup> |

## Definition and the canonical exact sequence

For an \( R \)-module homomorphism \( f: M \to N \), the kernel \( \ker(f) = \{ x \in M : f(x) = 0 \} \) is a submodule of \( M \), and the image \( \operatorname{im}(f) \) is a submodule of \( N \). The cokernel is the [quotient module](https://www.edgepedia.org/quotient-module) \( N/\operatorname{im}(f) \), with the \( R \)-action induced from \( N \)<sup>[1](https://www.math.uwo.ca/faculty/jardine/courses/homalg/homalg-lecture001.pdf)</sup><sup> • </sup><sup>[8](https://www.math.ru.nl/personal/bmoonen/CatHomAlg/NotesHomAlgebra.pdf)</sup>.

The cokernel completes a four-term exact sequence attached to every homomorphism:

\[ 0 \to \ker(f) \to M \xrightarrow{f} N \to \operatorname{coker}(f) \to 0. \]

Here a sequence is exact at a term when the kernel of the outgoing map equals the image of the incoming one<sup>[1](https://www.math.uwo.ca/faculty/jardine/courses/homalg/homalg-lecture001.pdf)</sup>. The two end statements carry familiar information: \( 0 \to M \xrightarrow{f} N \) is exact if and only if \( f \) is injective, and \( M \xrightarrow{f} N \to 0 \) is exact if and only if \( f \) is surjective<sup>[1](https://www.math.uwo.ca/faculty/jardine/courses/homalg/homalg-lecture001.pdf)</sup>. In particular, the cokernel is zero exactly when \( f \) is surjective, just as the kernel is zero exactly when \( f \) is injective.

## Universal property

The cokernel is characterized by a mapping property rather than by its elements. For \( f: C \to D \), the cokernel \( \operatorname{coker}(f) \) has the universal property that homomorphisms \( \operatorname{coker}(f) \to E \) correspond to homomorphisms \( g: D \to E \) such that \( g \circ f = 0 \)<sup>[2](https://leorneuhauser.com/files/algtop/AT24_rec12.pdf)</sup>. In other words, the quotient map \( D \to \operatorname{coker}(f) \) is the most general map out of \( D \) that kills everything in the image of \( f \).

This property is what generalizes beyond modules. In an abelian category, every morphism \( f: A \to B \) admits both a kernel \( i: \ker f \to A \) and a cokernel \( p: B \to \operatorname{coker} f \)<sup>[9](https://math-jh.com/en/math/category_theory/abelian_categories)</sup>. The coimage is defined dually as \( \operatorname{coim} f := \operatorname{coker}(\ker f) \), and the existence of kernels and cokernels yields a canonical homomorphism \( \operatorname{coim} f \to \operatorname{im} f \)<sup>[10](https://people.math.ethz.ch/~pink/ftp/FGS/Lecture4.pdf)</sup>. In an abelian category this comparison map is an isomorphism; in categories that are merely additive it need not be. The category of topological Hausdorff abelian groups, for example, is additive and admits kernels and cokernels but is not abelian<sup>[11](https://www.math.ucla.edu/~sharifi/notes/homalg-ch02.html)</sup>.

## Nonabelian groups

For a homomorphism \( \varphi: G \to H \) of groups that are not necessarily abelian, the image \( \operatorname{im} \varphi \) may fail to be a normal subgroup of \( H \), so the plain quotient \( H/\operatorname{im} \varphi \) need not exist. The cokernel is then defined as the quotient by the normal closure of the image, the smallest normal subgroup containing \( \operatorname{im} \varphi \)<sup>[3](https://ncatlab.org/nlab/show/cokernel)</sup><sup> • </sup><sup>[12](https://www.math.miami.edu/~armstrong/NCA_Saar/NCAnotes2.pdf)</sup>. For abelian groups the image is automatically normal and this reduces to the usual quotient.

## Cokernels of matrices and Smith normal form

An integer \( m \times n \) matrix \( M \) determines a linear map \( \mathbb{Z}^n \to \mathbb{Z}^m \), and its cokernel is

\[ \operatorname{cok}(M) := \mathbb{Z}^m / \operatorname{im} M. \]

Concretely, this is the set of integer vectors with ordinary addition, where any vector in the column span of \( M \) is identified with zero<sup>[4](https://people.reed.edu/~davidp/372/lectures/10fri-lecture.pdf)</sup>. Two examples show the shape of the answer: for \( M = [5] \), \( \operatorname{cok}(M) = \mathbb{Z}/5\mathbb{Z} \); for \( M = \operatorname{diag}(2,3) \), \( \operatorname{cok}(M) \cong \mathbb{Z}/2\mathbb{Z} \oplus \mathbb{Z}/3\mathbb{Z} \), via \( (a,b) \mapsto (a \bmod 2, b \bmod 3) \)<sup>[4](https://people.reed.edu/~davidp/372/lectures/10fri-lecture.pdf)</sup>.

**Smith normal form.** Over a principal ideal domain \( R \), any matrix \( A \in M_{m \times n}(R) \) can be brought by invertible row and column operations \( P \in GL_m(R) \), \( Q \in GL_n(R) \) into diagonal form with entries \( a_1, \ldots, a_r \) satisfying \( a_r \mid a_{r-1} \mid \cdots \mid a_1 \), and \( \operatorname{coker}(A) \cong \operatorname{coker}(PAQ) \)<sup>[5](https://www.math.iitb.ac.in/~saurav/MA5101/2016/ma5101-notes-2.pdf)</sup>. Reading the diagonal form off gives the structure of the cokernel:

\[ \operatorname{coker}(A) \cong R^{m-r} \oplus R/(a_1) \oplus \cdots \oplus R/(a_r), \]

with torsion part \( R/(a_1) \oplus \cdots \oplus R/(a_r) \) and free part \( R^{m-r} \)<sup>[5](https://www.math.iitb.ac.in/~saurav/MA5101/2016/ma5101-notes-2.pdf)</sup>. Since \( R \) is noetherian, every finitely generated \( R \)-module \( M \) sits in an exact sequence \( R^n \xrightarrow{A} R^m \to M \to 0 \), so any finitely generated module over a PID can be regarded as the cokernel of a matrix, and the [Smith normal form](https://www.edgepedia.org/smith-normal-form) computes its isomorphism type<sup>[5](https://www.math.iitb.ac.in/~saurav/MA5101/2016/ma5101-notes-2.pdf)</sup><sup> • </sup><sup>[13](https://bruno.stonek.com/smith.pdf)</sup>. The same computation reduces the boundary matrices of a chain complex to Smith form to compute homology with \( \mathbb{Z} \)-coefficients<sup>[14](https://math.hodapp.com/lectures/foundations/modules/structure-applications.html)</sup>.

## Cokernels and functors

Cokernels are colimits, and how a functor treats them classifies its exactness. A functor \( F \) between abelian categories is right exact if it preserves cokernels (equivalently, exactness of sequences \( A \to B \to C \to 0 \)), and left exact if it preserves kernels<sup>[6](https://ncatlab.org/nlab/show/exact%2Bfunctor)</sup><sup> • </sup><sup>[9](https://math-jh.com/en/math/category_theory/abelian_categories)</sup>.

The standard example is the tensor product. For a right \( R \)-module \( N \), the functor \( N \otimes_R - \) on left \( R \)-modules is right exact: it preserves cokernels, so an exact sequence \( N' \to N \to N'' \to 0 \) yields an exact sequence \( N \otimes_R N' \to N \otimes_R N \to N \otimes_R N'' \to 0 \)<sup>[7](https://www.math.ucla.edu/~sharifi/notes/algebra-ch12.html)</sup>. Equivalently stated, tensoring commutes with cokernels in the sense that \( \operatorname{coker}(f \otimes \mathrm{id}) = \operatorname{coker} f \otimes N \)<sup>[15](https://web.tecnico.ulisboa.pt/~ist189623/wordpress/2021/06/07/a-rant-on-the-right-exactness-of-tensor-product-and-flatness/)</sup>. The failure of tensoring to preserve kernels, that is, its failure to be left exact, is measured by the Tor functors<sup>[16](https://knowlpedia.com/algebra-homological/tensor-right-exact/)</sup>.

## References

1. [Jardine, Notes on Homological Algebra, Lecture 1](https://www.math.uwo.ca/faculty/jardine/courses/homalg/homalg-lecture001.pdf)
2. [Algebraic topology, Recitation 12](https://leorneuhauser.com/files/algtop/AT24_rec12.pdf)
3. [cokernel, nLab](https://ncatlab.org/nlab/show/cokernel)
4. [Math 372 lecture, Week 10, Reed College](https://people.reed.edu/~davidp/372/lectures/10fri-lecture.pdf)
5. [Smith normal forms, MA5101 notes, IIT Bombay](https://www.math.iitb.ac.in/~saurav/MA5101/2016/ma5101-notes-2.pdf)
6. [exact functor, nLab](https://ncatlab.org/nlab/show/exact%2Bfunctor)
7. [Sharifi, Abstract Algebra, Chapter 12: Homological algebra](https://www.math.ucla.edu/~sharifi/notes/algebra-ch12.html)
8. [Moonen, Notes on Homological Algebra](https://www.math.ru.nl/personal/bmoonen/CatHomAlg/NotesHomAlgebra.pdf)
9. [Abelian Categories (summary of category-theory facts)](https://math-jh.com/en/math/category_theory/abelian_categories)
10. [Pink, Course notes, Lecture 4, ETH Zürich](https://people.math.ethz.ch/~pink/ftp/FGS/Lecture4.pdf)
11. [Sharifi, Homological Algebra, Chapter 2: Abelian Categories](https://www.math.ucla.edu/~sharifi/notes/homalg-ch02.html)
12. [Noncommutative algebra notes, University of Miami](https://www.math.miami.edu/~armstrong/NCA_Saar/NCAnotes2.pdf)
13. [Stonek, The Smith normal form](https://bruno.stonek.com/smith.pdf)
14. [Applications of the structure theorem, Math foundations](https://math.hodapp.com/lectures/foundations/modules/structure-applications.html)
15. [A rant on the right-exactness of tensor product and flatness](https://web.tecnico.ulisboa.pt/~ist189623/wordpress/2021/06/07/a-rant-on-the-right-exactness-of-tensor-product-and-flatness/)
16. [Tensor product is right exact](https://knowlpedia.com/algebra-homological/tensor-right-exact/)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Numbers and algebra › Algebraic structures › Module theory › Tensor products and bimodules › Module homomorphisms*

*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Oct 15, 2026; Oct 25, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
