information:highlighting, structural:expansion
General case

Let A and B be algebraic structures of a given type and let f be a homomorphism of that type from A to B.Then the kernel of f is the subset of the direct product A × A consisting of all those ordered pairs of elements of A whose components are both mapped by f to the same element in B.The kernel is usually denoted ker f (or a variation).In symbols:

Since f is a function, the elements of the form (a, a) must belong to the kernel.

The homomorphism f is injective if and only if its kernel is exactly the diagonal set {(a, a) : a ∈ A }.

It is easy to see that ker f is an equivalence relation on A, and in fact a congruence relation.Thus, it makes sense to speak of the quotient algebra A / (ker f).The first isomorphism theorem in general universal algebra states that this quotient algebra is naturally isomorphic to the image of f (which is a subalgebra of B).

Note that the definition of kernel here (as in the monoid example) doesn't depend on the algebraic structure; it is a purely set -theoretic concept.For more on this general concept, outside of abstract algebra, see kernel of a function.