Group homomorphism

In mathematics, given two groups, ("G", ∗) and ("H", ·), a group homomorphism from ("G", ∗) to ("H", ·) is a function "h" : "G" → "H" such that for all "u" and "v" in "G" it holds that
where the group operation on the left side of the equation is that of "G" and on the right side that of "H".
From this property, one can deduce that "h" maps the identity element "eG" of "G" to the identity element "eH" of "H",
and it also maps inverses to inverses in the sense that 
Hence one can say that "h" "is compatible with the group structure".
Older notations for the homomorphism "h"("x") may be "x""h" or "x""h", though this may be confused as an index or a general subscript. In automata theory, sometimes homomorphisms are written to the right of their arguments without parentheses, so that "h"("x") becomes simply "x h".
In areas of mathematics where one considers groups endowed with additional structure, a "homomorphism" sometimes means a map which respects not only the group structure (as above) but also the extra structure. For example, a homomorphism of topological groups is often required to be continuous.
Intuition.
The purpose of defining a group homomorphism is to create functions that preserve the algebraic structure. An equivalent definition of group homomorphism is: The function "h" : "G" → "H" is a group homomorphism if whenever 
"a" ∗ "b" = "c"   we have   "h"("a") ⋅ "h"("b") = "h"("c"). 
In other words, the group "H" in some sense has a similar algebraic structure as "G" and the homomorphism "h" preserves that.
Image and kernel.
We define the "kernel of h" to be the set of elements in "G" which are mapped to the identity in "H"
and the "image of h" to be
The kernel and image of a homomorphism can be interpreted as measuring how close it is to being an isomorphism. The first isomorphism theorem states that the image of a group homomorphism, "h"("G") is isomorphic to the quotient group "G"/ker "h".
The kernel of h is a normal subgroup of "G" and the image of h is a subgroup of "H":
If and only if }, the homomorphism, "h", is a "group monomorphism"; i.e., "h" is injective (one-to-one). Injection directly gives that there is a unique element in the kernel, and a unique element in the kernel gives injection:
The category of groups.
If and are group homomorphisms, then so is . This shows that the class of all groups, together with group homomorphisms as morphisms, forms a category.
Homomorphisms of abelian groups.
If "G" and "H" are abelian (i.e., commutative) groups, then the set of all group homomorphisms from "G" to "H" is itself an abelian group: the sum of two homomorphisms is defined by
The commutativity of "H" is needed to prove that is again a group homomorphism.
The addition of homomorphisms is compatible with the composition of homomorphisms in the following sense: if "f" is in , "h", "k" are elements of , and "g" is in , then 
Since the composition is associative, this shows that the set End("G") of all endomorphisms of an abelian group forms a ring, the "endomorphism ring" of "G". For example, the endomorphism ring of the abelian group consisting of the direct sum of "m" copies of Z/"nZ is isomorphic to the ring of "m"-by-"m" matrices with entries in Z/"nZ. The above compatibility also shows that the category of all abelian groups with group homomorphisms forms a preadditive category; the existence of direct sums and well-behaved kernels makes this category the prototypical example of an abelian category.