In algebra, the kernel of a homomorphism is the relation describing how elements in the domain of the homomorphism become related in the image. A homomorphism is a function that preserves the underlying algebraic structure in the domain to its image.
When the algebraic structures involved have an underlying group structure, the kernel is taken to be the preimage of the group's identity element in the image, that is, it consists of the elements of the domain mapping to the image's identity. For example, the map that sends every integer to its parity (that is, 0 if the number is even, 1 if the number is odd) would be a homomorphism to the integers modulo 2, and its respective kernel would be the even integers which all have 0 as its parity. The kernel of a homomorphism of group-like structures will only contain the identity if and only if the homomorphism is injective, that is if the inverse image of every element consists of a single element. This means that the kernel can be viewed as a measure of the degree to which the homomorphism fails to be injective.