Skip to main content
Logo image

Section 7.4 Identity Functions

For every set \(A\) there is a special function under which the image of each element is the element itself. Because the image of an element is identical to the element, it is called the identity function.

Definition 7.36.

For any set \(A\text{,}\) the function \(\id_A:A\to A\) given by \(\id_A(b)=b\) for all \(b \in A\) is the identity function on \(A\text{.}\)
In the video in Figure 7.37 we introduce identity functions and give examples.
Figure 7.37. Identity Functions by Matt Farmer and Stephen Steward

Example 7.38. Identity function on \(\Z_3\).

The identity function on \(\Z_3=\{0,1,2\}\) is the function \(\id_{\Z_3}:\Z_3\to\Z_3\) given by:
\begin{align*} \id_{\Z_3}(0)\amp=0\\ \id_{\Z_3}(1)\amp=1\\ \id_{\Z_3}(2)\amp=2 \end{align*}
The behavior of the identity function with respect to composition is described in the following theorem.

Proof.

Let \(A\) and \(B\) be sets, and let \(f:A\to B\) be a function. Let \(a\in A\text{.}\) Then,
\begin{equation*} (f\circ \id_A)(a)=f(\id_A(a))=f(a)\text{,} \end{equation*}
implying that \(f\circ \id_A=f\text{.}\) Furthermore, \(\id_B(b)=b\) for all \(b\in B\text{.}\) So in particular,
\begin{equation*} (\id_B\circ f)(a)=\id_B(f(a))=f(a)\text{,} \end{equation*}
implying that \(\id_B\circ f=f\text{.}\)
Now complete the definition of the identity function on a set and the statement of the theorem.

Checkpoint 7.40. Definition of identity function.

Complete the following.
Let A be a nonempty set. The identity function on A is the function idA: A->A given by idA(x) =
  • 0
  • 1
  • -1
  • x
  • -x
  • 1/x
  • -1/x
.
Let B be a set and f:A->B and g:B->A be functions. Then
(f \(\circ\) idA)(x) =
  • 0
  • 1
  • -1
  • x
  • -x
  • f(x)
  • -f(x)
  • g(x)
  • 1/g(x)
  • 1/x
  • -1/x
and (idA \(\circ\) g)(x) =
  • 0
  • 1
  • -1
  • x
  • -x
  • f(x)
  • -f(x)
  • g(x)
  • 1/g(x)
  • 1/x
  • -1/x
.
To determine whether a function \(f\) is the identity function we can evaluate it at all elements of its domain to see whether \(f(a)=a\) for all element \(a\) of its domain.

Problem 7.41. Is \(f:\Z_5\to\Z_5\text{,}\) \(f(x)=(x^5)\fmod 5\) the identity.

Decide whether the function \(f:\Z_5\to\Z_5\) given by \(f(x)=(x^5)\fmod 5\) is the identity function on \(\Z_5\text{.}\)
Solution.
We evaluate the function \(f\) at all elements of its domain \(\Z_5=\{0,1,2,3,4\}\text{.}\) If \(f(x)=x\) for all \(x\in\Z_5\) then \(f\) is the identity function on \(\Z_5\text{.}\)
\begin{align*} f(0)\amp =(0^5)\fmod 5 = 0\fmod 5= 0\\ f(1)\amp =(1^5)\fmod 5 = 1\fmod 5= 1\\ f(2)\amp =(2^5)\fmod 5 = 32\fmod 5=2\\ f(3)\amp =(3^5)\fmod 5 = 243\fmod 3= 3\\ f(4)\amp =(4^5)\fmod 5 = 1024\fmod 5= 4 \end{align*}
As \(f(x)=x\) for all \(x\in\Z_5\) it is the identity function on \(\Z_5\text{.}\)

Problem 7.42. Is \(f:\Z_4\to\Z_4\text{,}\) \(f(x)=(x^2)\fmod 4\) the identity.

Decide whether the function \(f:\Z_4\to\Z_4\) given by \(f(x)=(x^2)\fmod 4\) is the identity function on \(\Z_4\text{.}\)
Solution.
We evaluate the function \(f\) at all elements of its domain \(\Z_4=\{0,1,2,3\}\text{.}\) If \(f(x)=x\) for all \(x\in\Z_4\) then \(f\) is the identity function on \(\Z_4\text{.}\)
\begin{align*} f(0)\amp =(0^2)\fmod 4 = 0\fmod 4= 0\\ f(1)\amp =(1^2)\fmod 4 = 1\fmod 4= 1\\ f(2)\amp =(2^2)\fmod 4 = 4\fmod 4= 0 \end{align*}
We have found that \(f(2)=0\ne 2\text{.}\) So \(f\) is not the identity function on \(\Z_4\text{.}\)
In Checkpoint 7.43 follow the methods from the two problems.

Checkpoint 7.43. Is this the identity function ?

Let \(f:\mathbb{Z}_{5}\to\mathbb{Z}_{5},\;\) \(f(x) = \left(3x^{4}+x^{3}\right) \bmod 5\text{.}\)
Evaluate \(f\) at all elements of the domain:
\(f(0) =\)
\(f(1) =\)
\(f(2) =\)
\(f(3) =\)
\(f(4) =\)
Now conclude whether \(f\) is equal to the identity function on \({\mathbb{Z}_{5}}\text{.}\)
The function \(f\)
  • select
  • is the identity function
  • is NOT the identity function
on \(\mathbb{Z}_{5}\text{.}\)
In Example 7.44 we consider the composite of two functions and find that it is an identity function.

Example 7.44. A composite that is the identity.

Consider the two functions
\begin{equation*} f:\Z_5\to \Z_5\text{ given by }f(x)=3\cdot x \end{equation*}
and
\begin{equation*} g:\Z_5\to \Z_5\text{ given by }g(x)=2\cdot x. \end{equation*}
Then \((g\circ f)\) is a function with domain \(\Z_5\) and codomain \(\Z_5\text{.}\) We show that \((g\circ f)\) is the identity function on \(\Z_5\text{.}\)
Since \(\Z_5=\{0,1,2,3,4\}\) does not have too many elements we can do this by exhausting all elements of \(\Z_5\text{.}\) We get
\(x\) \(f(x)\) \(g(f(x))\)
\(\mathbf{0}\) \(f(0)=(3\cdot 0)\fmod 5=0\) \(g(f(0))=(2\cdot f(0))\fmod 5=\mathbf{0}\)
\(\mathbf{1}\) \(f(1)=(3\cdot 1)\fmod 5 =3\) \(g(f(1))=(2\cdot f(1))\fmod 5=(2\cdot 3)\mod 5 = \mathbf{1}\)
\(\mathbf{2}\) \(f(2)=(3\cdot 2)\fmod 5 = 1\) \(g(f(1))=(2\cdot f(2))\fmod 5= 2\fmod 5 = \mathbf{2}\)
\(\mathbf{3}\) \(f(3)=(3\cdot 3)\fmod 5 =4\) \(g(f(1))=(2\cdot f(3))\fmod 5=(2\cdot 9)\mod 5=\mathbf{3}\)
\(\mathbf{4}\) \(f(4)=(3\cdot 4)\fmod 5 =2\) \(g(f(4))=(2\cdot f(4))\fmod 5=(2\cdot 2)\mod 5=\mathbf{4}\)
We see that in each row of the table the columns for \(x\) and for \(g(f(x))\) have the same entries, that is \(g(f(x))=x\) for all \(x\in\Z_5\text{.}\) Thus \((g\circ f)=\id_{\Z_5}\text{.}\)
Even the composite of a function with itself can be the identity function.

Example 7.45. A function that composed with itself is the identity.

Consider the function
\begin{equation*} f:\Z\to \Z\text{ given by }f(x)=(-x). \end{equation*}
We show that \((f\circ f)\) is the identity function on \(\Z\text{.}\)
Clearly both the domain and codomain of \((f\circ f)\) are the set of integers \(\Z\text{.}\) Let \(x\in\Z\text{.}\) We have
\begin{equation*} (f\circ f)(x)=f(f(x))=f(-x)=-(-x)=x. \end{equation*}
Thus, by Definition 7.36, the composite \((f\circ f)\) is the identity function on \(\Z\text{.}\)