Cokernel

The cokernel of a linear mapping of vector spaces is the quotient space of the codomain of by the image of . The dimension of the cokernel is called the "corank" of .
Cokernels are dual to the kernels of category theory, hence the name: the kernel is a subobject of the domain (it maps to the domain), while the cokernel is a quotient object of the codomain (it maps from the codomain).
Intuitively, given an equation that one is seeking to solve, the cokernel measures the "constraints" that must satisfy for this equation to have a solution – the obstructions to a solution – while the kernel measures the "degrees of freedom" in a solution, if one exists. This is elaborated in intuition, below.
More generally, the cokernel of a morphism in some category (e.g. a homomorphism between groups or a bounded linear operator between Hilbert spaces) is an object and a morphism such that the composition is the zero morphism of the category, and furthermore is universal with respect to this property. Often the map is understood, and itself is called the cokernel of .
In many situations in abstract algebra, such as for abelian groups, vector spaces or modules, the cokernel of the homomorphism is the quotient of by the image of . In topological settings, such as with bounded linear operators between Hilbert spaces, one typically has to take the closure of the image before passing to the quotient.
Formal definition.
One can define the cokernel in the general framework of category theory. In order for the definition to make sense the category in question must have zero morphisms. The cokernel of a morphism is defined as the coequalizer of and the zero morphism .
Explicitly, this means the following. The cokernel of is an object together with a morphism such that the diagram
commutes. Moreover, the morphism must be universal for this diagram, i.e. any other such can be obtained by composing with a unique morphism :
As with all universal constructions the cokernel, if it exists, is unique up to a unique isomorphism, or more precisely: if and are two cokernels of , then there exists a unique isomorphism with .
Like all coequalizers, the cokernel is necessarily an epimorphism. Conversely an epimorphism is called "normal" (or "conormal") if it is the cokernel of some morphism. A category is called "conormal" if every epimorphism is normal (e.g. the category of groups is conormal).
Examples.
In the category of groups, the cokernel of a group homomorphism is the quotient of by the normal closure of the image of . In the case of abelian groups, since every subgroup is normal, the cokernel is just modulo the image of :
Special cases.
In a preadditive category, it makes sense to add and subtract morphisms. In such a category, the coequalizer of two morphisms and (if it exists) is just the cokernel of their difference:
In an abelian category (a special kind of preadditive category) the image and coimage of a morphism are given by
In particular, every abelian category is normal (and conormal as well). That is, every monomorphism can be written as the kernel of some morphism. Specifically, is the kernel of its own cokernel:
Intuition.
The cokernel can be thought of as the space of "constraints" that an equation must satisfy, as the space of "obstructions", just as the kernel is the space of "solutions."
Formally, one may connect the kernel and the cokernel of a map by the exact sequence
These can be interpreted thus: given a linear equation to solve,
The dimension of the cokernel plus the dimension of the image (the rank) add up to the dimension of the target space, as the dimension of the quotient space is simply the dimension of the space "minus" the dimension of the image.
As a simple example, consider the map , given by . Then for an equation to have a solution, we must have (one constraint), and in that case the solution space is , or equivalently, , (one degree of freedom). The kernel may be expressed as the subspace : the value of is the freedom in a solution. The cokernel may be expressed via the real valued map : given a vector , the value of is the "obstruction" to there being a solution.
Additionally, the cokernel can be thought of as something that "detects" surjections in the same way that the kernel "detects" injections. A map is injective if and only if its kernel is trivial, and a map is surjective if and only if its cokernel is trivial, or in other words, if .