thumb|[[Graph of a function|Graph of the identity function on the real numbers]]
In mathematics, an identity function, also called an identity relation, identity map or identity transformation, is a function that always returns the value that was used as its argument, unchanged. That is, when <math>f</math> is the identity function, the equality <math>f(x)=x</math> is true for all values of <math>x</math> to which <math>f</math> can be applied.
Definition
Formally, if <math>X</math> is a set, the identity function <math>f</math> on <math>X</math> is defined to be a function with <math>X</math> as its domain and codomain, satisfying
In other words, the function value <math>f(x)</math> in the codomain <math>X</math> is always the same as the input element <math>x</math> in the domain <math>X</math>. The identity function on <math>X</math> is clearly an injective function as well as a surjective function (its codomain is also its range), so it is bijective.
The identity function <math>f</math> on <math>X</math> is often denoted by <math>\mathrm{id}_X</math>.
In set theory, where a function is defined as a particular kind of binary relation, the identity function is given by the identity relation, or diagonal of <math>X</math>.
Algebraic properties
If <math>f:X\rightarrow Y</math> is any function, then <math>f\circ\mathrm{id}_X=f=\mathrm{id}_Y\circ f</math>, where "<math>\circ</math>" denotes function composition. In particular, <math>\mathrm{id}_X</math> is the identity element of the monoid of all functions from <math>X</math> to <math>X</math> (under function composition).
Since the identity element of a monoid is unique, one can alternately define the identity function on <math>M</math> to be this identity element. Such a definition generalizes to the concept of an identity morphism in category theory, where the endomorphisms of <math>M</math> need not be functions.
Properties
- The identity function is a linear operator when applied to vector spaces.
- In an <math>n</math>-dimensional vector space the identity function is represented by the identity matrix <math>I_n</math>, regardless of the basis chosen for the space.
- The identity function on the positive integers is a completely multiplicative function (essentially multiplication by 1), considered in number theory.
- In a metric space the identity function is trivially an isometry. An object without any symmetry has as its symmetry group the trivial group containing only this isometry (symmetry type <math>\mathrm{C}_1</math>).
- In a topological space, the identity function is always continuous.
- The identity function is idempotent.
- Every map from a set of a single element to itself is necessarily the identity map.
See also
- Identity matrix
- Inclusion map
- Indicator function
