# Kernel of a function

In mathematics, the **kernel** of a function *f* may be taken to be either

- the equivalence relation on the function's domain that roughly expresses the idea of "equivalent as far as the function
*f*can tell", or - the corresponding partition of the domain.

Note that there are several other meanings of the word "kernel" in mathematics; see kernel (mathematics) for these.

For the formal definition, let *X* and *Y* be sets and let *f* be a function from *X* to *Y*.
Elements *x*_{1} and *x*_{2} of *X* are *equivalent* if *f*(*x*_{1}) and *f*(*x*_{2}) are equal, i.e. are the same element of *Y*.
The kernel of *f* is the equivalence relation thus defined.

The kernel, in the equivalence-relation sense, may be denoted "=_{f}" (or a variation) and may be defined symbolically as

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle (x =_{f} y)\; :\Longleftrightarrow\; (f(x) = f(y)). \! }**

Like any equivalence relation, the kernel can be modded out by to form a quotient set, and the quotient set is the partition:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \left\{\, \left\{\, w \in X: f(x)=f(w) \,\right\} : x \in X \,\right\}.}**

This quotient set *X*/=_{f} is called the *coimage* of the function *f*, and denoted "coim *f*" (or a variation).
The coimage is naturally isomorphic (in the set-theoretic sense of a bijection) to the image, im *f*; specifically, the equivalence class of *x* in *X* (which is an element of coim *f*) corresponds to *f*(*x*) in *Y* (which is an element of im *f*).

Like any binary relation, the kernel of a function may be thought of as a subset of the Cartesian product *X* × *X*.
In this guise, the kernel may be denoted "ker *f*" (or a variation) and may be defined symbolically as

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \mathop{\mathrm{ker}} f := \{(x,x') \mid f(x) = f(x')\}\mbox{.} \! }**

But this is not useful merely as a formalisation in set theory! In fact, the study of the properties of this subset can shed important light on the function in question. We give here two examples.

First, if *X* and *Y* are algebraic structures of some fixed type (such as groups, rings, or vector spaces), and if the function *f* from *X* to *Y* is a homomorphism, then ker *f* will be a subalgebra of the direct product *X* × *X*. Subalgebras of *X* × *X* that are also equivalence relations (called *congruence relations*) are important in abstract algebra, because they define the most general notion of quotient algebra. Thus the coimage of *f* is a quotient algebra of *X* much as the image of *f* is a subalgebra of *Y*; and the bijection between them becomes an isomorphism in the algebraic sense as well (this is the most general form of the first isomorphism theorem in algebra). The use of kernels in this context is discussed further in the article Kernel (algebra).

Secondly, if *X* and *Y* are topological spaces and *f* is a continuous function between them, then the topological properties of ker *f* can shed light on the spaces *X* and *Y*.
For example, if *Y* is a Hausdorff space, then ker *f* must be a closed set.
Conversely, if *X* is a Hausdorff space and ker *f* is a closed set, then the coimage of *f*, if given the quotient space topology, must also be a Hausdorff space.