---
tag: 0FSNQ0GNCC
kind: definition
name: Identity function
msc: ["03E20"]
defines: 0PSKT5W817
uses: [0XHDTE5YMZ]
sources:
  - url: https://en.wikipedia.org/wiki/Identity_function
    locator: lead section
---

## Definition

Let $A$ be a [[set|0SJ3RX9TXA]].
The identity function of $A$ is the [[function|0XHDTE5YMZ]] $\mathrm{id}_A \colon A \to A$ with $\mathrm{id}_A(a) = a$ for each $a \in A$.

## Remarks

For each function $f \colon A \to B$, $f \circ \mathrm{id}_A = f$ and $\mathrm{id}_B \circ f = f$. See [[function composition|07HF9YCWPP]].
The identity function is a [[bijection|0SNQEF7Z53]], and it is its own inverse.
Its graph is the diagonal $\{(a, a) \mid a \in A\}$.

## Explanations

### L1 human

The identity function does nothing: each input comes out unchanged.
It plays the role for composition that the number $1$ plays for multiplication.
