Identity, inclusion and restriction
This note describes 3 concepts: identity functions, inclusion functions and function restriction.
Identity function
Every set \( A \) has a function whose graph is the subset of \(A \times A \) consisting of the elements on the diagonal. This function is called the identity function on \( A \), denoted as \( \operatorname{id_A} \).
The identity function can be generalized slightly to arrive at the inclusion function.
Inclusion function
Let \( S \) be a subset of \( A \). The inclusion function \( i : S \to A \) maps an element in \( S \) to the same elements in \( A \).
For a given function \( f \), the inclusion function composes with \( f \) to create a restriction.
Restriction
Let \( f : A \to X \) be a function, and let \( S \subseteq A \) be a subset of \( A \). The restriction of \( f \) to \( S \), denoted as \( f|_{S} \) is defined as:
The restriction \( f|_{S} \) can be viewed as the composition \( f \circ i \), where \( i : S \to A \) is the inclusion function.
Identity function and composition
The identity function is very special with respect to composition: for any function \( f \), both \( \operatorname{id_B} \circ f = f \) and \(f \circ \operatorname{id_A} = f \). As a graphical representation, these two statements correspond to stating that the following two diagrams compute.