Canonical: https://knowlpedia.com/shared-foundations/identity-function/

# Identity function

The function that maps every element of a set to itself

An **identity function** on a set \(A\) is the [function](https://knowlpedia.com/shared-foundations/function/) \(\mathrm{id}_A:A\to A\) defined by
\[
\mathrm{id}_A(a)=a\quad\text{for all }a\in A.
\]

## Remarks

Identity functions are neutral elements for [composition](https://knowlpedia.com/shared-foundations/composition/): if \(f:A\to B\) is any function, then \(f\circ \mathrm{id}_A=f\) and \(\mathrm{id}_B\circ f=f\). The identity function is always [bijective](https://knowlpedia.com/shared-foundations/bijective-function/), and its [inverse function](https://knowlpedia.com/shared-foundations/inverse-function/) is itself.

## Examples

- On [the real numbers](https://knowlpedia.com/shared-foundations/real-numbers/), \(\mathrm{id}_{\mathbb{R}}(x)=x\) for all \(x\in\mathbb{R}\).
- On the [power set](https://knowlpedia.com/shared-foundations/power-set/) \(\mathcal{P}(A)\) of a set \(A\), the identity function sends each subset \(S\subseteq A\) to itself.
