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.
identity function ⊂ inclusion map
Definitions
Consider a set $X$. The identity function on $X$ is the function from $X$ to $X$ that sends each element of $X$ to itself.
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
-
The function $f : \reals \to \reals$ defined by $f(x) = x$ is the identity function on $\reals$, because $f$ sends each real number to itself, and its domain and codomain are both $\reals$.
-
The function $g : [0, 1] \to [0, 1]$ defined by $g(x) = x$ is the identity function on $[0, 1]$, because $g$ sends each point of $[0, 1]$ to itself and its codomain is its domain. It is a different function from the identity function on $\reals$, because its domain is different.
Non-examplesThings that may be mistaken for examples of this term.
-
The function $\iota : \mathbb{Z} \to \reals$ defined by $\iota(n) = n$ is not an identity function, because its codomain $\reals$ is different from its domain $\mathbb{Z}$. For example, no integer is sent to $1/2$.
-
The map from the unit circle $S^1$ to $\reals^2$ that sends each point to itself is not an identity function, because its codomain $\reals^2$ is larger than its domain $S^1$.
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.
Consider a set $Y$ and a subset $A$ of $Y$. The inclusion map of $A$ into $Y$ is the function $\iota : A \to Y$ that sends each element of $A$ to itself, as an element of $Y$:
\[\iota(a) = a \quad \text{for all } a \in A.\]The inclusion map is often written with a hooked arrow, $\iota : A \hookrightarrow Y$.
Examples
-
The function $f : \reals \to \reals$ defined by $f(x) = x$ is the inclusion map of $\reals$ into itself, because $\reals$ is a subset of $\reals$ and $f$ sends each real number to itself.
-
The function $g : [0, 1] \to [0, 1]$ defined by $g(x) = x$ is the inclusion map of $[0, 1]$ into itself, because $[0, 1]$ is a subset of itself and $g$ sends each point to itself.
-
The function $\iota : \mathbb{Z} \to \reals$ defined by $\iota(n) = n$ is the inclusion map of $\mathbb{Z}$ into $\reals$, because $\iota$ sends each integer to itself, as a real number.
-
The map from the unit circle $S^1$ to $\reals^2$ that sends each point to itself is the inclusion map of $S^1$ into $\reals^2$, because $S^1$ is a subset of $\reals^2$. With the subspace topology on $S^1$, this inclusion map is a topological embedding.
Properties
- The inclusion map of $A$ into $Y$ is injective. The inclusion map is surjective only when $A = Y$, and then it is the identity function on $Y$.
- For a function $f : Y \to Z$ and inclusion map $\iota : A \hookrightarrow Y$, the composition $f \circ \iota$ is the restriction of $f$ to $A$.
- If $Y$ is a topological space and $A$ has the subspace topology, then the inclusion map of $A$ into $Y$ is continuous; in fact, the inclusion map is a topological embedding.
Examples
| Example | identity function | inclusion map | Why |
|---|---|---|---|
| The function $f : \reals \to \reals$ defined by $f(x) = x$ | ✓ | ✓ | |
| The function $g : [0, 1] \to [0, 1]$ defined by $g(x) = x$ | ✓ | ✓ | The function $g : [0, 1] \to [0, 1]$ defined by $g(x) = x$ is the identity function on $[0, 1]$, which is the inclusion map of $[0, 1]$ into itself. The function $g$ differs from the inclusion map of $[0, 1]$ into $\reals$, which has the same formula but the codomain $\reals$, and so is not an identity function. |
| The function $\iota : \mathbb{Z} \to \reals$ defined by $\iota(n) = n$ | ✗ | ✓ | |
| The map from the unit circle $S^1$ to $\reals^2$ that sends each point of $S^1$ to itself | ✗ | ✓ |
Notes
- Many authors treat a subset $A \subseteq Y$ and the inclusion map $A \hookrightarrow Y$ as interchangeable, so the inclusion map is often left unwritten. Writing the inclusion map out matters when a construction depends on the codomain, such as surjectivity or the induced map on homotopy groups.