Let C\mathcal C be a and let AA be an of C\mathcal C.

An endomorphism of AA is a

f:A⟶A.f:A\longrightarrow A.

The set of endomorphisms of AA is denoted

EndC(A)  :=  HomC(A,A).\mathrm{End}_{\mathcal C}(A)\;:=\;\mathrm{Hom}_{\mathcal C}(A,A).
Algebraic structure

With as multiplication,

(f,g)↦f∘g,(f,g)\mapsto f\circ g,

the set EndC(A)\mathrm{End}_{\mathcal C}(A) is a monoid with identity element the idA\mathrm{id}_A.

An endomorphism is an precisely when it is invertible (i.e., an A→AA\to A).

Examples
  1. Set\mathbf{Set}: Endomorphisms of a set XX are just X→XX\to X.
  1. Grp\mathbf{Grp} / Ab\mathbf{Ab}: Endomorphisms of a group (or abelian group) GG are group homomorphisms G→GG\to G. For example, n↦knn\mapsto kn defines an endomorphism of Z\mathbb Z for each integer kk.
  1. R−ModR\mathbf{-Mod}: Endomorphisms of an RR-module MM are RR-linear maps M→MM\to M. For a free module RnR^n, EndR(Rn)\mathrm{End}_R(R^n) can be identified with the ring of n×nn\times n matrices over RR (via the action on the standard basis).