5.5: Inverse Functions and Composition
 Page ID
 26045
A bijection (or onetoone correspondence) is a function that is both onetoone and onto. Naturally, if a function is a bijection, we say that it is bijective. If a function \(f :A \to B\) is a bijection, we can define another function \(g\) that essentially reverses the assignment rule associated with \(f\). Then, applying the function \(g\) to any element \(y\) from the codomain \(B\), we are able to obtain an element \(x\) from the domain \(A\) such that \(f(x)=y\). Let us refine this idea into a more concrete definition.
Definition: Inverse Function
Let \(f :{A}\to{B}\) be a bijective function. Its inverse function is the function \({f^{1}}:{B}\to{A}\) with the property that \[f^{1}(b)=a \Leftrightarrow b=f(a).\] The notation \(f^{1}\) is pronounced as “\(f\) inverse.” See figure below for a pictorial view of an inverse function.
Why is \(f^{1}:B \to A\) a welldefined function? For it to be welldefined, every element \(b\in B\) must have a unique image. This means given any element \(b\in B\), we must be able to find one and only one element \(a\in A\) such that \(f(a)=b\). Such an \(a\) exists, because \(f\) is onto, and there is only one such element \(a\) because \(f\) is onetoone. Therefore, \(f^{1}\) is a welldefined function.
How to find \(f^{1}\)
If a function \(f\) is defined by a computational rule, then the input value \(x\) and the output value \(y\) are related by the equation \(y=f(x)\). In an inverse function, the role of the input and output are switched. Therefore, we can find the inverse function \(f^{1}\) by following these steps:
 \(f^{1}(y)=x \iff y=f(x),\) so write \(y=f(x)\), using the function definition of \(f(x).\)
 Solve for \(x\). That is, express \(x\) in terms of \(y\). The resulting expression is \(f^{1}(y)\).
 Be sure to write the final answer in the form \(f^{1}(y) = \ldots\,\). Do not forget to include the domain and the codomain, and describe them properly.
Example \(\PageIndex{1}\label{invfcn01}\)
To find the inverse function of \(f :{\mathbb{R}}\to{\mathbb{R}}\) defined by \(f(x)=2x+1\), we start with the equation \(y=2x+1\). Solving for \(x\), we find \(x=\frac{1}{2}\,(y1)\). Therefore, the inverse function is \[{f^{1}}:{\mathbb{R}}\to{\mathbb{R}}, \qquad f^{1}(y)=\frac{1}{2}\,(y1).\] It is important to describe the domain and the codomain, because they may not be the same as the original function.
Example \(\PageIndex{2}\label{eg:invfcn02}\)
The function \(s :{\big[\frac{\pi}{2}, \frac{\pi}{2}\big]}\to{[1,1]}\) defined by \(s(x)=\sin x\) is a bijection. Its inverse function is
\[s^{1}:[1,1] \to {\big[\frac{\pi}{2}, \frac{\pi}{2}\big]}, \qquad s^{1}(y)=\arcsin y.\]
The function \(\arcsin y\) is also written as \(\sin^{1}y\), which follows the same notation we use for inverse functions.
handson Exercise \(\PageIndex{1}\label{he:invfcn01}\)
The function \(f :{[3,\infty)}\to{[\,0,\infty)}\) is defined as \(f(x)=\sqrt{x+3}\). Show that it is a bijection, and find its inverse function
handson Exercise \(\PageIndex{2}\label{he:invfcn02}\)
Find the inverse function of \(g :{\mathbb{R}}\to{(0,\infty)}\) defined by \(g(x) = e^x\).
Remark
Exercise caution with the notation. Assume the function \(f :{\mathbb{Z}}\to{\mathbb{Z}}\) is a bijection. The notation \(f^{1}(3)\) means the image of 3 under the inverse function \(f^{1}\). If \(f^{1}(3)=5\), we know that \(f(5)=3\). The notation \(f^{1}(\{3\})\) means the preimage of the set \(\{3\}\). In this case, we find \(f^{1}(\{3\})=\{5\}\). The results are essentially the same if the function is bijective.
If a function \(g :{\mathbb{Z}}\to{\mathbb{Z}}\) is manytoone, then it does not have an inverse function. This makes the notation \(g^{1}(3)\) meaningless. Nonetheless, \(g^{1}(\{3\})\) is welldefined, because it means the preimage of \(\{3\}\). If \(g^{1}(\{3\})=\{1,2,5\}\), we know \(g(1)=g(2)=g(5)=3\).
In general, \(f^{1}(D)\) means the preimage of the subset \(D\) under the function \(f\). Here, the function \(f\) can be any function. If \(f\) is a bijection, then \(f^{1}(D)\) can also mean the image of the subset \(D\) under the inverse function \(f^{1}\). There is no confusion here, because the results are the same.
Example \(\PageIndex{3}\label{eg:invfcn03}\)
The function \(f :{\mathbb{R}}\to{\mathbb{R}}\) is defined as \[f(x) = \cases{ 3x & if $x\leq 1$, \cr 2x+1 & if $x > 1$. \cr}\] Find its inverse function.
 Solution

Since \(f\) is a piecewisedefined function, we expect its inverse function to be piecewisedefined as well. First, we need to find the two ranges of input values in \(f^{1}\). The images for \(x\leq1\) are \(y\leq3\), and the images for \(x>1\) are \(y>3\). Hence, the codomain of \(f\), which becomes the domain of \(f^{1}\), is split into two halves at 3. The inverse function should look like \[f^{1}(x) = \cases{ \mbox{???} & if $x\leq 3$, \cr \mbox{???} & if $x > 3$. \cr}\] Next, we determine the formulas in the two ranges. We find
\[f^{1}(x) = \cases{ \textstyle\frac{1}{3}\,x & if $x\leq 3$, \cr \textstyle\frac{1}{2} (x1) & if $x > 3$. \cr}\] The details are left to you as an exercise.
handson Exercise \(\PageIndex{3}\label{he:invfcn03}\)
Find the inverse function of \(g :{\mathbb{R}}\to{\mathbb{R}}\) defined by \[g(x) = \cases{ 3x+5 & if $x\leq 6$, \cr 5x7 & if $x > 6$. \cr}\] Be sure you describe \(g^{1}\) properly.
Example \(\PageIndex{4}\)
Find the inverse function of \(f :{\mathbb{Z}}\to{\mathbb{N}\cup\{0\}}\) defined by \[f(n) = \cases{ 2n & if $n\geq0$, \cr 2n1 & if $n < 0$. \cr}\]
 Solution

In an inverse function, the domain and the codomain are switched, so we have to start with \(f^{1}:\mathbb{N} \cup \{0\} \to \mathbb{Z}\) before we describe the formula that defines \(f^{1}\). Writing \(n=f(m)\), we find \[n = \cases{ 2m & if $m\geq0$, \cr 2m1 & if $m < 0$. \cr}\] We need to consider two cases.
If \(n=2m\), then \(n\) is even, and \(m=\frac{n}{2}\).
If \(n=2m1\), then \(n\) is odd, and \(m=\frac{n+1}{2}\).
Therefore, the inverse function is defined by \(f^{1}:\mathbb{N} \cup \{0\} \to \mathbb{Z}\) by:
\[f^{1}(n) = \cases{ \frac{2}{n} & if $n$ is even, \cr \frac{n+1}{2} & if $n$ is odd. \cr}\]
Verify this with some numeric examples.
handson Exercise \(\PageIndex{5}\label{he:invfcn05}\)
The function \(f :{\mathbb{Z}}\to{\mathbb{N}}\) is defined as \[f(n) = \cases{ 2n & if $n < 0$, \cr 2n+1 & if $n\geq0$. \cr}\] Find its inverse.
Let \(A\) and \(B\) be finite sets. If there exists a bijection \(f :{A} \to {B}\), then the elements of \(A\) and \(B\) are in onetoone correspondence via \(f\). Hence, \(A=B\). This idea will be very important for our section on Infinite Sets and Cardinality.
Composite Function
Given functions \(f :{A}\to{B}'\) and \(g :{B}\to{C}\) where \(B' \subseteq B\) , the composite function, \(g\circ f\), which is pronounced as “\(g\) after \(f\)”, is defined as \[{g\circ f}:{A}\to{C}, \qquad (g\circ f)(x) = g(f(x)).\] The image is obtained in two steps. First, \(f(x)\) is obtained. Next, it is passed to \(g\) to obtain the final result. It works like connecting two machines to form a bigger one, see first figure below. We can also use an arrow diagram to provide another pictorial view, see second figure below.
Numeric value of \((g\circ f)(x)\) can be computed in two steps. For example, to compute \((g\circ f)(5)\), we first compute the value of \(f(5)\), and then the value of \(g(f(5))\). To find the algebraic description of \((g\circ f)(x)\), we need to compute and simplify the formula for \(g(f(x))\). In this case, it is often easier to start from the “outside” function. More precisely, start with \(g\), and write the intermediate answer in terms of \(f(x)\), then substitute in the definition of \(f(x)\) and simplify the result.
Example \(\PageIndex{5}\)
Assume \(f,g :{\mathbb{R}}\to{\mathbb{R}}\) are defined as \(f(x)=x^2\), and \(g(x)=3x+1\). We find
\[\displaylines{ (g\circ f)(x)=g(f(x))=3[f(x)]+1=3x^2+1, \cr (f\circ g)(x)=f(g(x))=[g(x)]^2=(3x+1)^2. \cr}\]
Therefore,
\[g \circ f: \mathbb{R} \to \mathbb{R}, \qquad (g \circ f)(x)=3x^2+1\]
\[f \circ g: \mathbb{R} \to \mathbb{R}, \qquad (f \circ g)(x)=(3x+1)^2\]
We note that, in general, \(f\circ g \neq g\circ f\).
handson Exercise \(\PageIndex{6}\)
If \(p,q:\mathbb{R} \to \mathbb{R}\) are defined as \(p(x)=2x+5\), and \(q(x)=x^2+1\), determine \(p\circ q\) and \(q\circ p\). Do not forget to describe the domain and the codomain
Example \(\PageIndex{6}\)
Define \(f,g :{\mathbb{R}}\to{\mathbb{R}}\) as
\[f(x) = \cases{ 3x+1 & if $x < 0$, \cr 2x+5 & if $x\geq0$, \cr}\]
and \(g(x)=5x7\). Find \(g\circ f\).
 Solution

Since \(f\) is a piecewisedefined function, we expect the composite function \(g\circ f\) is also a piecewisedefined function. It is defined by \[(g\circ f)(x) = g(f(x)) = 5f(x)7 = \cases{ 5(3x+1)7 & if $x < 0$, \cr 5(2x+5)7 & if $x\geq0$. \cr}\]
After simplification, we find \(g \circ f: \mathbb{R} \to \mathbb{R}\), by: \[(g\circ f)(x) = \cases{ 15x2 & if $x < 0$, \cr 10x+18 & if $x\geq0$. \cr}\] In this example, it is rather obvious what the domain and codomain are. Nevertheless, it is always a good practice to include them when we describe a function.
handson Exercise \(\PageIndex{7}\)
The functions \(f :{\mathbb{R}}\to{\mathbb{R}}\) and \(g :{\mathbb{R}}\to{\mathbb{R}}\) are defined by \[f(x) = 3x+2, \qquad\mbox{and}\qquad g(x) = \cases{ x^2 & if $x\leq5$, \cr 2x1 & if $x > 5$. \cr}\] Determine \(f\circ g\)
Example \(\PageIndex{7}\)
Let \(\mathbb{R}^*\) denote the set of nonzero real numbers. Suppose
\[f : \mathbb{R}^* \to \mathbb{R}, \qquad f(x)=\frac{1}{x}\]
\[g : \mathbb{R} \to (0, \infty), \qquad g(x)=3x^2+11.\]
Determine \(f\circ g\) and \(g\circ f\). Be sure to specify their domains and codomains.
 Solution

To compute \(f\circ g\), we start with \(g\), whose domain is \(\mathbb{R}\). Hence, \(\mathbb{R}\) is the domain of \(f\circ g\). The result from \(g\) is a number in \((0,\infty)\). The interval \((0,\infty)\) contains positive numbers only, so it is a subset of \(\mathbb{R}^*\). Therefore, we can continue our computation with \(f\), and the final result is a number in \(\mathbb{R}\). Hence, the codomain of \(f\circ g\) is \(\mathbb{R}\). The image is computed according to \(f(g(x)) = 1/g(x) = 1/(3x^2+11)\). We are now ready to present our answer:
\(f \circ g: \mathbb{R} \to \mathbb{R},\) by:
\[(f \circ g)(x) = \frac{1}{3x^2+11}.\]
In a similar manner, the composite function \(g\circ f :{\mathbb{R}^*} {(0,\infty)}\) is defined as \[(g\circ f)(x) = \frac{3}{x^2}+11.\] Be sure you understand how we determine the domain and codomain of \(g\circ f\).
Identity Function relates to Inverse Functions
Recall the definition of the Identity Function:
The identity function on any nonempty set \(A\) maps any element back to itself: \[{I_A}:{A}\to{A}, \qquad I_A(x)=x.\] .
Theorem \(\PageIndex{1}\)
For a bijective function \(f :{A}\to{B}\),
\[f^{1}\circ f=I_A, \qquad\mbox{and}\qquad f\circ f^{1}=I_B,\]
where \(i_A\) and \(i_B\) denote the identity function on \(A\) and \(B\), respectively.
 Proof

To prove that \(f^{1}\circ f = I_A\), we need to show that \((f^{1}\circ f)(a)=a\) for all \(a\in A\). Assume \(f(a)=b\). Then, because \(f^{1}\) is the inverse function of \(f\), we know that \(f^{1}(b)=a\). Therefore,
\[(f^{1}\circ f)(a) = f^{1}(f(a)) = f^{1}(b) = a,\]
which is what we want to show. The proof of \(f\circ f^{1} = I_B\) procceds in the exact same manner, and is omitted here.
Example \(\PageIndex{8}\)
Show that the functions \(f,g :{\mathbb{R}}\to{\mathbb{R}}\) defined by \(f(x)=2x+1\) and \(g(x)=\frac{1}{2}(x1)\) are inverse functions of each other.
 Solution

The problem does not ask you to find the inverse function of \(f\) or the inverse function of \(g\). Instead, the answers are given to you already. You job is to verify that the answers are indeed correct, that the functions are inverse functions of each other.
Form the two composite functions \(f\circ g\) and \(g\circ f\), and check whether they both equal to the identity function:
\[\displaylines{ \textstyle (f\circ g)(x) = f(g(x)) = 2 g(x)+1 = 2\left[\frac{1}{2}(x1)\right]+1 = x, \cr \textstyle (g\circ f)(x) = g(f(x)) = \frac{1}{2} \big[f(x)1\big] = \frac{1}{2} \left[(2x+1)1\right] = x. \cr}\]
We conclude that \(f\) and \(g\) are inverse functions of each other.
handson Exercise \(\PageIndex{8}\)
Verify that \(f :{\mathbb{R}}\to{\mathbb{R}^+}\) defined by \(f(x)=e^x\), and \(g :{\mathbb{R}^+}\to{\mathbb{R}}\) defined by \(g(x)=\ln x\), are inverse functions of each other
Theorem \(\PageIndex{2}\)
Suppose \(f :{A}\to{B}\) and \(g :{B}\to{C}\). Let \(I_A\) and \(I_B\) denote the identity function on \(A\) and \(B\), respectively. We have the following results.
 \(f\circ I_A=f\) and \(I_B\circ f=f\).
 If both \(f\) and \(g\) are onetoone, then \(g\circ f\) is also onetoone.
 If both \(f\) and \(g\) are onto, then \(g\circ f\) is also onto.
 If \(g\circ f\) is bijective, then \((g\circ f)^{1}= f^{1}\circ g^{1}\).
 Proof of (a)

To show that \(f\circ I_A=f\), we need to show that \((f\circ I_A)(a)= f(a)\) for all \(a\in A\). This follows from direct computation: \[(f\circ I_A)(a) = f(I_A(a)) = f(a).\] The proofs of \(I_B\circ f=f\) and (b)–(d) are left as exercises.
Summary and Review
 A bijection is a function that is both onetoone and onto.
 The inverse of a bijection \(f :{A} \to {B}\) is the function \(f^{1}: B \to A\) with the property that \[f(x)=y \Leftrightarrow x=f^{1}(y).\]
 In brief, an inverse function reverses the assignment rule of \(f\). It starts with an element \(y\) in the codomain of \(f\), and recovers the element \(x\) in the domain of \(f\) such that \(f(x)=y\).
 Given \(B' \subseteq B\), the composition of two functions \(f :{A}\to{B'}\) and \(g :{B}\to{C}\) is the function \(g\circ f :{A}\to{C}\) defined by \((g\circ f)(x)=g(f(x))\).
 If \(f :{A}\to{B}\) is bijective, then \(f^{1}\circ f=I_A\) and \(f\circ f^{1}=I_B\).
 To check whether \(f :{A}\to{B}\) and \(g :{B}\to{A}\) are inverse of each other, we need to show that
 \((g\circ f)(x)=g(f(x))=x\) for all \(x\in A\), and
 \((f\circ g)(y)=f(g(y))=y\) for all \(y\in B\).
Exercises
Exercise \(\PageIndex{1}\label{ex:invfcn01}\)
Find the inverse of each of the following bijections.
 \(u:{\mathbb{Q}}\to{\mathbb{Q}}\), \(u(x)=3x2\).
 \(v:{\mathbb{Q}\{1\}}\to{\mathbb{Q}\{2\}}\), \(v(x)=\frac{2x}{x1}\).
 \(w:{\mathbb{Z}}\to{\mathbb{Z}}\), \(w(n)=n+3\).
 Solution

(a) \({u^{1}}:{\mathbb{Q}}\to{\mathbb{Q}}\), \(u^{1}(x)=(x+2)/3\)
Exercise \(\PageIndex{2}\label{ex:invfcn02}\)
Find the inverse of the function \(r :{(0,\infty)}\to{\mathbb{R}}\) defined by \(r(x)=4+3\ln x\).
Exercise \(\PageIndex{3}\label{ex:invfcn03}\)
The images of the bijection \({\alpha}:{\{1,2,3,4,5,6,7,8\}}\to{\{a,b,c,d,e,f,g,h\}}\) are given below. \[\begin{array}{c*{8}{c}} \hline x & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 \\ \hline \alpha(x)& g & a & d & h & b & e & f & c \\ \hline \end{array}\] Find its inverse function.
 Solution

The images under \({\alpha^{1}}:{\{a,b,c,d,e,f,g,h\}}\to {\{1,2,3,4,5,6,7,8\}}\) are given below. \[\begin{array}{c*{8}{c}} \hline x & a & b & c & d & e & f & g & h \\ \hline \alpha^{1}(x)& 2 & 5 & 8 & 3 & 6 & 7 & 1 & 4 \\ \hline \end{array}\]
Exercise \(\PageIndex{4}\label{ex:invfcn04}\)
The function \(h :{(0,\infty)}\to{(0,\infty)}\) is defined by \(h(x)=x+\frac{1}{x}\). Determine \(h\circ h\). Simplify your answer as much as possible.
Exercise \(\PageIndex{5}\label{ex:invfcn05}\)
The functions \(g,f :{\mathbb{R}}\to{\mathbb{R}}\) are defined by \(f(x)=13x\) and \(g(x)=x^2+1\). Evaluate \(f(g(f(0)))\).
 Solution

We do not need to find the formula of the composite function, as we can evaluate the result directly: \(f(g(f(0))) = f(g(1)) = f(2) = 5\).
Exercise \(\PageIndex{6}\label{ex:invfcn06}\)
The functions \(f,g :{\mathbb{Z}}\to{\mathbb{Z}}\) are defined by \[f(n) = \cases{ 2n1 & if $n\geq0$ \cr 2n & if $n < 0$ \cr} \qquad\mbox{and}\qquad g(n) = \cases{ n+1 & if $n$ is even \cr 3n & if $n$ is odd \cr}\] Determine \(g\circ f\)
Exercise \(\PageIndex{7}\)
Describe \(g\circ f\).
 \(f :{\mathbb{Z}}\to{\mathbb{N}}\), \(f(n)=n^2+1\); \(g :{\mathbb{N}}\to{\mathbb{Q}}\), \(g(n)=\frac{1}{n}\).
 \(f :{\mathbb{R}}\to{(0,1)}\), \(f(x)=1/(x^2+1)\); \(g :{(0,1)}\to{(0,1)}\), \(g(x)=1x\).
 \(f :{\mathbb{Q}\{2\}}\to{\mathbb{Q}^*}\), \(f(x)=1/(x2)\); \(g :{\mathbb{Q}^*}\to{\mathbb{Q}^*}\), \(g(x)=1/x\).
 \(f :{\mathbb{R}}\to{[\,1,\infty)}\),\(f(x)=x^2+1\); \(g :{[\,1,\infty)}\to {[\,0,\infty)}\) \(g(x)=\sqrt{x1}\).
 \(f :{\mathbb{Q}\{10/3\}}\to{\mathbb{Q}\{3\}}\),\(f(x)=3x7\); \(g :{\mathbb{Q}\{3\}}\to{\mathbb{Q}\{2\}}\), \(g(x)=2x/(x3)\).
 Solution

(a) \({g\circ f}:{\mathbb{Z}}\to{\mathbb{Q}}\), \((g\circ f)(n)=1/(n^2+1)\)
(b) \({g\circ f}:{\mathbb{R}}\to{(0,1)}\), \((g\circ f)(x)=x^2/(x^2+1)\)
Exercise \(\PageIndex{8}\label{ex:invfcn08}\)
If \(f :A \to B\) and \(g : B \to C\) are functions and \(g \circ f\) is onetoone, must \(g\) be onetoone? Prove or give a counterexample.
Exercise \(\PageIndex{9}\label{ex:invfcn09}\)
If \(f :A \to B\) and \(g : B \to C\) are functions and \(g \circ f\) is onto, must \(f\) be onto? Prove or give a counterexample.
 Solution

No. Consider \(f : \{2,3\} \to \{a,b,c\}\) by \(\{(2,a),(3,b)\}\) and \(g : \{a,b,c\} \to \{5\}\) by \(\{(a,5),(b,5),(c,5)\}.\)
Then \(f \circ g : \{2,3\} \to \{5\}\) is defined by \(\{(2,5),(3,5)\}.\) Clearly \(f \circ g\) is onto, while \(f\) is not onto.
Exercise \(\PageIndex{10}\label{ex:invfcn10}\)
If \(f :A \to B\) and \(g : B \to C\) are functions and \(g \circ f\) is onetoone, must \(f\) be onetoone? Prove or give a counterexample.
Exercise \(\PageIndex{11}\label{ex:invfcn11}\)
If \(f :A \to B\) and \(g : B \to C\) are functions and \(g \circ f\) is onto, must \(g\) be onto? Prove or give a counterexample.
 Answer

Yes, if \(f :A \to B\) and \(g : B \to C\) are functions and \(g \circ f\) is onto, then \(g\) must be onto.
 Proof

If \(g\) is not onto, then \(\exists c \in C\) such that there is no \(b \in B\) such that \(g(b)=c.\)
However, since \(g \circ f\) is onto, we know \(\exists a \in A\) such that \((g \circ f)(a) = c.\) This means \(g(f(a))=c\).
\(f(a) \in B\) and \(g(f(a))=c\); let \(b=f(a)\) and now there is a \(b \in B\) such that \(g(b)=c.\)
Since every element in set \(C\) does have a preimage in set \(B\), by the definition of onto, \(g\) must be onto. 
Exercise \(\PageIndex{12}\label{ex:invfcn12}\)
Given the bijections \(f\) and \(g\), find \(f\circ g\), \((f\circ g)^{1}\) and \(g^{1}\circ f^{1}\).
 \(f :{\mathbb{Z}}\to{\mathbb{Z}}\), \(f(n)=n+1\); \(g :{\mathbb{Z}}\to{\mathbb{Z}}\), \(g(n)=2n\).
 \(f :{\mathbb{Q}}\to{\mathbb{Q}}\), \(f(x)=5x\); \(g :{\mathbb{Q}}\to{\mathbb{Q}}\), \(g(x)=\frac{x2}{5}\).
 \(f :{\mathbb{Q}\{2\}}\to{\mathbb{Q}\{2\}}\), \(f(x)=3x4\); \(g :{\mathbb{Q}\{2\}}\to{\mathbb{Q}\{2\}}\), \(g(x)=\frac{x}{x2}\).
Exercise \(\PageIndex{13}\)
Prove part (b) of Theorem 5.5.2.
 Statement of Theorem 5.5.2b

Given \(f :{A}\to{B}\) and \(g :{B}\to{C}\), if both \(f\) and \(g\) are onetoone, then \(g\circ f\) is also onetoone.
 Proof

Suppose \((g\circ f)(a_1)=(g\circ f)(a_2)\) for some \(a_1,a_2 \in A.\) WMST \(a_1=a_2.\)
By definition of composition of functions, we have \[g(f(a_1))=g(f(a_2)).\]
\(f(a_1) \in B\) and \(f(a_2) \in B.\) Let \(b_1=f(a_1)\) and \(b_2=f(a_2).\) Substituting into equation 5.5.3, \[g(b_1)=g(b_2).\]
Since \(g\) is onetoone, we know \(b_1=b_2\) by definition of onetoone. Since \(b_1=b_2\) we have \(f(a_1)=f(a_2).\)
Now, since \(f\) is onetoone, we know \(a_1=a_2\) by definition of onetoone.
Thus we have demonstrated if \((g\circ f)(a_1)=(g\circ f)(a_2)\) then \(a_1=a_2\) and therefore by the definition of onetoone, \(g\circ f\) is onetoone.
Exercise \(\PageIndex{14}\)
Prove part (c) of Theorem 5.5.2
Exercise \(\PageIndex{15}\)
Prove part (d) of Theorem 5.5.