In set theory, the kernel of a function is the equivalence relation on the domain of the function expressing the property that equivalent elements have the same image under the function.
If then we define the relation by
The equivalence classes of are the fibres of f.
Every function gives rise to an equivalence relation as kernel. Conversely, every equivalence relation on a set X gives rise to a function of which it is the kernel. Consider the quotient set of equivalence classes under and consider the quotient map defined by
where is the equivalence class of x under . Then the kernel of the quotient map is just . This may be regarded as the set-theoretic version of the First Isomorphism Theorem.