(also nonabelian homological algebra)
The kernel of a morphism is that part of its domain which is sent to zero.
There are various definitions of the notion of kernel, depending on the properties and structures available in the ambient category. We list a few definitions and discuss (in parts) when they are equivalent.
In a category with an initial object $0$ and pullbacks, the kernel $ker(f)$ of a morphism $f: A \to B$ is the pullback $ker(f) \to A$ along $f$ of the unique morphism $0 \to B$
More explicitly, this characterizes the object $ker(f)$ as the object (unique up to unique isomorphism) that satisfies the following universal property:
for every object $C$ and every morphism $h : C \to A$ such that $f\circ h = 0$ is the zero morphism, there is a unique morphism $\phi : C \to ker(f)$ such that $h = p\circ \phi$.
In a category with zero morphisms (meaning: enriched over the category of pointed sets), the kernel $ker(f)$ of a morphism $f : c \to d$ is, if it exists, the equalizer of $f$ and the zero morphism $0_{c,d}$.
In any category enriched over pointed sets, the kernel of a morphism $f:c\to d$ is the universal morphism $k:a\to c$ such that $f \circ k$ is the basepoint. It is a weighted limit in the sense of enriched category theory. This applies in particular in any (pre)-additive category.
This is a special case of the construction of generalized kernels in enriched categories.
Let $Ab$ be the category of abelian groups. It is a category with kernels. In every $Ab$-enriched category $A$, for every morphism $f: X\to Y$ in $A$ there is a subfunctor
of the representable functor $hom(-,X)$, defined on objects by
where $ker$ on the right-hand side is the kernel n the category of abelian groups.
If the category is in fact preabelian, $ker f$ is also representable with representing object $Ker f$. One has to be careful with $Coker f$ which does not represent the functor naive $coker f$ defined as $(coker f)(Z) = coker(hom(Z,X)\to hom(Z,Y))$ in $Ab$, which is often not representable at all, even in the simple example of the category of abelian groups. Instead, as a colimit construction, one should corepresent another functor, namely, the covariant functor $Z\mapsto ker(hom(Y,Z) \to hom(X,Z))$ (which is a quotient of the corepresentable functor $hom(X,-)$). In short, $Coker f$ is defined by the double dualization using the kernel in $Ab$: $Coker f = (Ker f^{op})^{op}$. This is a particular case of the dualization involved in defining any colimit from its corresponding limit.
The kernel of a morphism in an (∞,1)-category with $\infty$-categorical zero object is the homotopy pullback as in the pullback definition above: the homotopy fiber.
See also stable (∞,1)-category.
In some fields, the term ‘kernel’ refers to an equivalence relation that category theorists would see as a kernel pair. This is especially important in fields such as monoid theory where both notions exist but are not equivalent (while in group theory they are equivalent).
In ring theory, even when one assumes that rings have units preserved by ring homomorphisms, the traditional notion of kernel (an ideal) exists in the category of non-unital rings (and is not itself a unital ring in general). A purely category-theoretic theory of unital rings can be recovered either by using the kernel pair instead or (to fit better the usual language) moving to a category of modules.
In universal algebra, this may be handled in the framework of Malʹcev varieties.
Kashiwara-Schapira, following the terminology of EGA, uses kernel as a synonym of equalizer (and co-kernel of co-equalizer).
By the pasting law for pullbacks we have that the total square
is a pullback. Since $0 \to c$ is a monomorphism and the pullback of a monomorphism along itself is the domain of the monomorphis, we have $ker ker f \simeq 0$.
This statement crucially fails to be true in higher category theory. There, the kernel of a kernel is the based loop space object of $d$. For this reason where one has short exact sequences in 1-category theory, there are instead long fiber sequences in higher category theory.
In a category $C$ with pullbacks and pushouts and zero object, kernel and cokernel form a pair of adjoint functors on the arrow categories
We check the hom-isomorphism of a pair of adjoint functors. An element in the hom-set $Arr_C(g,ker f)$ is a diagram
By the universal property of the pullback, this is the same as a diagram
By the dual reasoning, an element in $Arr_C(coker g, f)$ is a diagram
By the universal property of the pushout this is equivalently a diagram
(This also follows from the general theory of generalized kernels.)
In the category Ab of abelian groups, the kernel of a group homomorphism $f : A \to B$ is the subgroup of $A$ on the set $f^{-1}(0)$ of elements of $A$ that are sent to the zero-element of $B$.
More generally, for $R$ any ring, this is true in $R$Mod: the kernel of a morphism of modules is the preimage of the zero-element at the level of the underlying sets, equipped with the unique sub-module structure on that set.
kernel, fiber, generalized kernel