## Section7.5Inverse Functions

Sometimes it is possible to “undo” the effect of a function. In these cases, we can define a function that reverses the effects of another function. A function that we can “undo” is called invertible.

In the video in Figure 7.5.1 we introduce inverse functions and give examples.

We give the formal definition of an invertible function and of the inverse of an invertible function.

### Definition7.5.2.

Let $$A$$ and $$B$$ be non-empty sets. We say that a function $$f:A\to B$$ is invertible if for every $$b\in B$$ there is exactly one $$a\in A$$ such that $$f(a)=b\text{.}$$ The inverse of an invertible function $$f:A\to B\text{,}$$ denoted by $$f^{-1}\text{,}$$ is the function $$f^{-1}:B \to A$$ that assigns to each element $$b \in B$$ the unique element $$a \in A$$ such that $$f(a) = b\text{.}$$

In other words, a function $$f:A\to B$$ is invertible if every $$b\in B$$ has exactly one preimage $$a\in A\text{.}$$ So if $$f(a) = b\text{,}$$ then $$f^{-1}(b) = a\text{.}$$

Confirm your understanding of the definition by completing it in the exercise.

Complete the following:

Definition. Let $$f : A \rightarrow B$$ be a function. We say $$f$$ is invertible if

• select

• for every

• there is exactly one

• for one

element
• select

• a in A

• b in B

,
• select

• for every

• there is exactly one

• for one

element
• select

• a in A

• b in B

such that
• select

• f(a)=b

• f(b)=a

• f(a)=1

.

Definition. The inverse function $$f^{-1}:$$

• select

• A -> B

• B -> A

of an invertible function $$f: A \to B$$ is the function that assigns to each element
• select

• a in A

• b in B

the unique element
• select

• a in A

• b in B

such that
• select

• f(a)=b

• f(b)=a

• f(a)=1

.

Theorem. If a function $$f:$$

• select

• A -> B

• B -> A

is invertible and $$f^{-1}: B\to A$$ is its inverse, then $$f$$ is the inverse of $$f^{-1}$$ .

Theorem. Let $$f : A \rightarrow B$$ be a function and let $$f^{-1}:$$

• select

• A -> B

• B -> A

be its inverse, The function $$f \circ f^{-1}$$ is the
• select

• identity function on A

• identity function on B

. The function $$f^{-1}\circ f$$ is the
• select

• identity function on A

• identity function on B

.

$$\text{for every}$$

$$\text{b in B}$$

$$\text{there is exactly one}$$

$$\text{a in A}$$

$$\text{f(a)=b}$$

$${\verb!B -> A!}$$

$$\text{b in B}$$

$$\text{a in A}$$

$$\text{f(a)=b}$$

$${\verb!A -> B!}$$

$${\verb!B -> A!}$$

$$\text{identity function on B}$$

$$\text{identity function on A}$$

Figure 7.5.4

We investigate whether the two functions $$\mathrm{studentid}$$ and $$\mathrm{grade}$$ are invertible.

We use the functions $$\mathrm{studentid} \colon N \to I$$ and $$\mathrm{grade} \colon I \to G$$ from Example 7.1.5 and Example 7.1.7 given by the tables in Figure 7.1.4 and Figure 7.1.6 respectively.

The function $$\mathrm{studentid} \colon N \to I$$ where $$I$$ is the set of student identification numbers and $$N$$ is the set of student names is invertible as long as every student has a different name. The function $$\mathrm{studentid}^{-1}: I \to N$$ is the function that tells us the student's name for a given identification number. With the table in Figure 7.1.4 we get

\begin{equation*} \mathrm{studentid} (\mathsf{ Alice } ) = 1001, \text{ so } \mathrm{studentid}^{-1}(0001) = \mathsf{ Alice } \text{.} \end{equation*}

Recall the function grade from Example 7.1.7. The function $$\mathrm{grade} \colon I \to G$$ where $$I$$ is the set of identification numbers and $$G$$ is the set of grades is not invertible since many students may earn the same grade in a class. Both the students with the identification number 1007 and 1008 earn an A in MAT 112. We have $$\mathrm{grade} ({ 1007 } ) =\text{A}$$ and $$\mathrm{grade} ({ 1008 } ) = \mathsf{A}\text{,}$$ and we would not be able to uniquely define $$\mathrm{grade}^{-1}(A)\text{.}$$

In Figure 7.5.6 we give an example of an invertible function from $$\Z_5$$ to $$\Z_5$$ and its inverse. The function $$e$$ in Figure 7.5.12 illustrates that for an invertible function the domain and codomain do not have to be the same.

We ivestigate whether some given functions are invertible.

Let $$g:\{-1,0,1\}\to \{0,1,2\}$$ be given by $$g(x) := x^2$$ (compare Problem 7.3.10). Determine whether $$g$$ invertible.

Solution.

The function $$g$$ is not invertible since $$2\in\{0,1,2\}$$ has no preimage in $$\{-1,0,1\}\text{.}$$ (Note that $$g$$ fails to be invertible for multiple reasons, since $$g(-1) =1$$ and $$g(1) = 1\text{.}$$)

Let $$h:\{0,1,2\}\to \{2,3,4\}$$ be given by $$h(y) := y+2$$ (compare Problem 7.3.10). Determine whether $$h$$ invertible.

Solution.

The function $$h$$ is invertible since each element in the domain is assigned to a distinct element in the codomain. We have $$h^{-1}:\{2,3,4\}\to\{0,1,2\}$$ defined by $$h^{-1}(z)=z-2\text{.}$$ In particular, $$h^{-1}(2)=0\text{,}$$ $$h^{-1}(3)=1\text{,}$$ and $$h^{-1}(4)=2\text{.}$$

We give an example of an invertible function whose domain is a Cartesian product.

Consider the function $$b:\Z_4\to\Z_2\times\Z_2$$ given by $$b(0):=(0,0)\text{,}$$ $$b(1):=(0,1)\text{,}$$ $$b(2):=(1,0)\text{,}$$ and $$b(3):=(1,1)\text{.}$$ Since every element in $$\Z_2\times\Z_2$$ has exactly one preimage in $$\Z_4$$ under $$b\text{,}$$ the function $$b$$ is invertible. The inverse $$b^{-1}:\Z_2\times\Z_2 \to\Z_4$$ of the function $$b$$ is given by $$b^{-1}\left((0,0)\right):=0\text{,}$$ $$b^{-1}\left((0,1)\right):=1\text{,}$$ $$b^{-1}\left((1,0)\right):=2\text{,}$$ and $$b^{-1}\left((1,1)\right):=3\text{.}$$

Now determine yourself whether a given function is invertible.

Let $$f:\mathbb{Z}_{3}\to \mathbb{Z}_{3}\text{,}$$ $$f(x)=(2x+x)\bmod 3\text{.}$$

Evaluate $$f$$ at all elements of its domain.

$$f(0) =$$

$$f(1) =$$

$$f(2) =$$

Thus the function $$f$$

• select

• is invertible

• is not invertible

.

$$0$$

$$0$$

$$0$$

$$\text{is not invertible}$$

Suppose that $$f:A\to B$$ is invertible, and let $$f^{-1} :B \to A$$ be its inverse. If $$f(a) = b\text{,}$$ then $$f^{-1}(b)=a\text{.}$$ Thus for the composition functions $$f^{-1}\circ f$$ and $$f \circ f^{-1}\text{,}$$ we have

\begin{equation*} (f^{-1}\circ f)(a)=f^{-1}(f(a))=f^{-1}(b)=a\text{.} \end{equation*}

Hence $$f^{-1}\circ f=\id_A$$ where $$\id_A$$ denotes the identity function on $$A\text{.}$$ Similarly

\begin{equation*} (f\circ f^{-1})(b)=f(f^{-1}(b))=f(a)=b \end{equation*}

and so $$f\circ f^{-1}=\id_B\text{.}$$

For $$f^{-1}:B\to A$$ the inverse is the function $$\left(f^{-1}\right)^{-1}:A\to B$$ that assigns to $$a\in A$$ the element $$b\in B$$ such that $$f^{-1}(b)=a\text{.}$$ This element $$b$$ is equal to $$f(a)\text{.}$$ Thus $$\left(f^{-1}\right)^{-1}(a)=f(a)\text{.}$$ Therefore $$\left(f^{-1}\right)^{-1}=f\text{.}$$ So $$f$$ is the inverse of $$f^{-1}\text{.}$$

Assume that $$f:A\to B$$ is a function and there is a function $$g:B\to A$$ such that $$g\circ f=\id_A\text{.}$$ Let $$a\in A$$ and $$b=f(a)\text{.}$$ Now

\begin{equation*} g(b)=g(f(a))=(g\circ f)(a)=\id_A(a)=a. \end{equation*}

This assignment $$g(b)=a$$ is unique, as $$g$$ is a function. So $$g$$ is the inverse of $$f\text{.}$$ We have proven:

Already in Section 7.4 we have encountered two invertible functions and their inverses. In Example 7.4.9 we checked whether the composite of two functions is the identity function. By Theorem 7.5.13 this means that they are each others inverses. In Example 7.4.10 we encountered a functions that is its own inverse.