Let be a possibly partial associative operation on a set . An identity element, or simply an identity is an element such that for every and for which the left-hand sides of the equalities are defined. If and are two identity elements such that is defined, then (This results immediately from the definition, by ) It follows that a total operation has at most one identity element, and if and are different identities, then is not defined. For example, in the case of matrix multiplication, there is one identity matrix for every positive integer , and two identity matrices of different size cannot be multiplied together. Similarly, identity functions are identity elements for function composition, and the composition of the identity functions of two different sets are not defined. Left and right inverses If where is an identity element, one says that is a left inverse of , and is a right inverse of . Left and right inverses do not always exist, even when the operation is total and associative. For example, addition is a total associative operation on nonnegative integers, which has as additive identity, and is the only element that has an additive inverse. This lack of inverses is the main motivation for extending the natural numbers into the integers. An element can have several left inverses and several right inverses, even when the operation is total and associative. For example, consider the functions from the integers to the integers. The doubling function has infinitely many left inverses under function composition, which are the functions that divide by two the even numbers, and give any value to odd numbers. Similarly, every function that maps to either or is a right inverse of the function the floor function that maps to or depending whether is even or odd. More generally, a function has a left inverse for function composition if and only if it is injective, and it has a right inverse if and only if it is surjective. In category theory, right inverses are also called sections, and left inverses are called retractions. Inverses An element is invertible under an operation if it has a left inverse and a right inverse. In the common case where the operation is associative, the left and right inverse of an element are equal and unique. Indeed, if and are respectively a left inverse and a right inverse of , then