Definition · applies to sets · also called identity map, $\operatorname{id}_X$

High school

Consider a set $X$. The identity function on $X$ is the function from $X$ to $X$ that sends each element of $X$ to itself.

The identity function on a set $X$.

Undergraduate

Consider a set $X$. The identity function on $X$ is the function $\operatorname{id}_X : X \to X$ defined by

\[\operatorname{id}_X(x) = x \quad \text{for all } x \in X.\]

Examples

Examples

Non-examples
Things that may be mistaken for examples of this term.

Properties

  • The identity function $\operatorname{id}_X$ is the identity element of function composition on the functions from $X$ to $X$: for every function $f : X \to X$, \[f \circ \operatorname{id}_X = \operatorname{id}_X \circ f = f.\] More generally, for every function $f : X \to Y$, $f \circ \operatorname{id}_X = f$ and $\operatorname{id}_Y \circ f = f$.
  • The identity function on $X$ is bijective, and $\operatorname{id}_X$ is its own inverse.
  • The domain and the codomain of an identity function are the same set.
  • The identity function on $X$ is the inclusion map of $X$ into itself.

Notes

The identity function on $X$ depends on the set $X$: the identity function on $[0, 1]$ and the identity function on $\reals$ are different functions, even though both are written $x \mapsto x$.

The identity function is different from an identity element of an operation, such as $0$ for addition, though the identity function on $X$ is the identity element of composition of functions from $X$ to $X$.

The identity function is also different from an identity equation, such as $(x + 1)^2 = x^2 + 2x + 1$.

Distinctions involving this term

  • Identity Function vs. Inclusion Map: The identity function and the inclusion map each send every element to itself, so both are written $x \mapsto x$. The inclusion map of a subset $A$ of a set $Y$ maps $A$ into $Y$. The identity function on a set $X$ is the inclusion map of $X$ into itself: the special case in which the codomain is the same set as the domain. A function is determined by its domain and codomain as well as its formula, so $x \mapsto x$ alone does not say whether a function is an identity function or only an inclusion map.

All definitions · All distinctions · All examples · Notation