In abstract algebra, one associates to certain objects a ring, the object's endomorphism ring, which encodes several internal properties of the object; this may be denoted End(X). As the resulting object is often an algebra over some ring R, this may also be called the endomorphism algebra.
The elements of the endomorphism ring of an abelian group (A, +) are the endomorphisms of A, i.e. the group homomorphisms from A to A. Any two such endomorphisms f and g can be added pointwise (using the formula (f+g)(x) = f(x) + g(x)), and the result f+g is again an endomorphism of A. Furthermore, f and g can also be composed to yield the endomorphism f o g, and this multiplication distributes over pointwise addition. The set of all endomorphisms of A, together with this addition and multiplication, satisfies all the axioms of a ring. This is the endomorphism ring of A. Its multiplicative identity is the identity map on A. Endomorphism rings are typically non-commutative.
The above construction does not work for groups that are not abelian: the sum of two homomorphisms need not be a homomorphism in that case.[1]
We can define the endomorphism ring of any module in exactly the same way, using module homomorphisms instead of abelian group homomorphisms; abelian groups are exactly modules over the integers. The result is an algebra over the ring R of scalar transformations.
If K is a field and we consider the K-vector space Kn, then the endomorphism ring of Kn (which consists of all K-linear maps from Kn to Kn) is naturally identified with the ring of n-by-n matrices with entries in K.[2] More generally, the endomorphism algebra of the free module is naturally n-by-n matrices with entries in R.
In general, endomorphism rings can be defined for the objects of any preadditive category.
One can often translate properties of an object into properties of its endomorphism ring. For instance: