Given an operation , an element of is called a left identity for if for every element of . That is, the map given by is the identity function on .
If , then there is a similar concept of right identity.
If , then is a two-sided identity, or simply identity, if it is both a left and right identity.
Historically, identity elements (as above) came first, then identity functions, and then identity morphisms. These are all the same basic idea, however: an identity morphism is an identity element for the operation of composition.
An identity is sometimes called a unit (although that term also has a broader meaning, and an operation that has an identity element is called unital or unitary. In particular, a magma whose underlying operation has an identity is called a unital magma or a unitary magma.