Skip to main content
Mathematics LibreTexts

5.2: Inverse Functions

  • Page ID
    80785
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}}      % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}}      % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vectorC}[1]{\textbf{#1}} \)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    Thinking of a function as a process like we did in Section 1.4, in this section we seek another function which might reverse that process. As in real life, we will find that some processes (like putting on socks and shoes) are reversible while some (like cooking a steak) are not. We start by discussing a very basic function which is reversible, \(f(x) = 3x+4\). Thinking of \(f\) as a process, we start with an input \(x\) and apply two steps, as we saw in Section 1.4

    1. multiply by \(3\)
    2. add \(4\)

    To reverse this process, we seek a function \(g\) which will undo each of these steps and take the output from \(f\), \(3x+4\), and return the input \(x\). If we think of the real-world reversible two-step process of first putting on socks then putting on shoes, to reverse the process, we first take off the shoes, and then we take off the socks. In much the same way, the function \(g\) should undo the second step of \(f\) first. That is, the function \(g\) should

    1. subtract \(4\)
    2. divide by \(3\)

    Following this procedure, we get \(g(x) = \frac{x-4}{3}\). Let’s check to see if the function \(g\) does the job. If \(x=5\), then \(f(5) = 3(5)+4 = 15+4 = 19\). Taking the output \(19\) from \(f\), we substitute it into \(g\) to get \(g(19) = \frac{19-4}{3} = \frac{15}{3} = 5\), which is our original input to \(f\). To check that \(g\) does the job for all \(x\) in the domain of \(f\), we take the generic output from \(f\), \(f(x) = 3x+4\), and substitute that into \(g\). That is, \(g(f(x)) = g(3x+4) = \frac{(3x+4)-4}{3} = \frac{3x}{3} = x\), which is our original input to \(f\). If we carefully examine the arithmetic as we simplify \(g(f(x))\), we actually see \(g\) first ‘undoing’ the addition of \(4\), and then ‘undoing’ the multiplication by \(3\). Not only does \(g\) undo \(f\), but \(f\) also undoes \(g\). That is, if we take the output from \(g\), \(g(x) = \frac{x-4}{3}\), and put that into \(f\), we get \(f(g(x)) = f\left(\frac{x-4}{3}\right) = 3 \left(\frac{x-4}{3}\right) + 4 = (x-4) + 4 = x\). Using the language of function composition developed in Section 5.1, the statements \(g(f(x)) = x\) and \(f(g(x)) = x\) can be written as \((g \circ f)(x) = x\) and \((f \circ g)(x) = x\), respectively. Abstractly, we can visualize the relationship between \(f\) and \(g\) in the diagram below.

    Screen Shot 2022-04-01 at 4.25.08 AM.png

    The main idea to get from the diagram is that \(g\) takes the outputs from \(f\) and returns them to their respective inputs, and conversely, \(f\) takes outputs from \(g\) and returns them to their respective inputs. We now have enough background to state the central definition of the section.

    Definition 5.2.

    Suppose \(f\) and \(g\) are two functions such that

    1. \((g \circ f)(x) = x\) for all \(x\) in the domain of \(f\) and
    2. \((f \circ g)(x) = x\) for all \(x\) in the domain of \(g\)

    then \(f\) and \(g\) are inverses of each other and the functions \(f\) and \(g\) are said to be invertible.

    We now formalize the concept that inverse functions exchange inputs and outputs.

    Theorem 5.2. Properties of Inverse Functions

    Suppose \(f\) and \(g\) are inverse functions.

    • The rangea of \(f\) is the domain of \(g\) and the domain of \(f\) is the range of \(g\)
    • \(f(a) = b\) if and only if \(g(b) = a\)
    • \((a,b)\) is on the graph of \(f\) if and only if \((b,a)\) is on the graph of \(g\)

    a Recall this is the set of all outputs of a function.

    Theorem 5.2 is a consequence of Definition 5.2 and the Fundamental Graphing Principle for Functions. We note the third property in Theorem 5.2 tells us that the graphs of inverse functions are reflections about the line \(y=x\). For a proof of this, see Example 1.1.7 in Section 1.1 and Exercise 72 in Section 2.1. For example, we plot the inverse functions \(f(x) = 3x+4\) and \(g(x) = \frac{x-4}{3}\) below.

    Screen Shot 2022-04-13 at 10.08.26 PM.png

    If we abstract one step further, we can express the sentiment in Definition 5.2 by saying that \(f\) and \(g\) are inverses if and only if \(g \circ f = I_{1}\) and \(f \circ g = I_{2}\) where \(I_{1}\) is the identity function restricted1 to the domain of \(f\) and \(I_{2}\) is the identity function restricted to the domain of \(g\). In other words, \(I_{1}(x) = x\) for all \(x\) in the domain of \(f\) and \(I_{2}(x) = x\) for all \(x\) in the domain of \(g\). Using this description of inverses along with the properties of function composition listed in Theorem 5.1, we can show that function inverses are unique.2 Suppose \(g\) and \(h\) are both inverses of a function \(f\). By Theorem 5.2, the domain of \(g\) is equal to the domain of \(h\), since both are the range of \(f\). This means the identity function \(I_{2}\) applies both to the domain of \(h\) and the domain of \(g\). Thus \(h = h \circ I_{2} = h \circ (f \circ g) = (h \circ f) \circ g = I_{1} \circ g = g\), as required.3 We summarize the discussion of the last two paragraphs in the following theorem.4

    Theorem 5.3. Uniqueness of Inverse Functions and Their Graphs

    Suppose \(f\) is an invertible function.

    • There is exactly one inverse function for \(f\), denoted \(f^{-1}\) (read \(f\)-inverse)
    • The graph of \(y=f^{-1}(x)\) is the reflection of the graph of \(y=f(x)\) across the line \(y=x\).

    The notation \(f^{-1}\) is an unfortunate choice since you’ve been programmed since Elementary Algebra to think of this as \(\frac{1}{f}\). This is most definitely not the case since, for instance, \(f(x) = 3x+4\) has as its inverse \(f^{-1}(x) = \frac{x-4}{3}\), which is certainly different than \(\frac{1}{f(x)} = \frac{1}{3x+4}\). Why does this confusing notation persist? As we mentioned in Section 5.1, the identity function \(I\) is to function composition what the real number \(1\) is to real number multiplication. The choice of notation \(f^{-1}\) alludes to the property that \(f^{-1} \circ f = I_{1}\) and \(f \circ f^{-1} = I_{2}\), in much the same way as \(3^{-1} \cdot 3 = 1\) and \(3 \cdot 3^{-1} = 1\).

    Let’s turn our attention to the function \(f(x) = x^2\). Is \(f\) invertible? A likely candidate for the inverse is the function \(g(x) = \sqrt{x}\). Checking the composition yields \((g\circ f)(x) = g(f(x)) = \sqrt{x^2} = |x|\), which is not equal to \(x\) for all \(x\) in the domain \((-\infty, \infty)\). For example, when \(x=-2\), \(f(-2)= (-2)^2 = 4\), but \(g(4) = \sqrt{4}=2\), which means \(g\) failed to return the input \(-2\) from its output \(4\). What \(g\) did, however, is match the output \(4\) to a different input, namely \(2\), which satisfies \(f(2) = 4\). This issue is presented schematically in the picture below.

    Screen Shot 2022-04-13 at 10.24.10 PM.png

    We see from the diagram that since both \(f(-2)\) and \(f(2)\) are \(4\), it is impossible to construct a function which takes \(4\) back to both \(x=2\) and \(x=-2\). (By definition, a function matches a real number with exactly one other real number.) From a graphical standpoint, we know that if \(y=f^{-1}(x)\) exists, its graph can be obtained by reflecting \(y=x^2\) about the line \(y=x\), in accordance with Theorem 5.3. Doing so produces

    Screen Shot 2022-04-13 at 10.31.40 PM.png

    We see that the line \(x=4\) intersects the graph of the supposed inverse twice - meaning the graph fails the Vertical Line Test, Theorem 1.1, and as such, does not represent \(y\) as a function of \(x\). The vertical line \(x=4\) on the graph on the right corresponds to the horizontal line \(y=4\) on the graph of \(y=f(x)\). The fact that the horizontal line \(y=4\) intersects the graph of \(f\) twice means two different inputs, namely \(x=-2\) and \(x=2\), are matched with the same output, \(4\), which is the cause of all of the trouble. In general, for a function to have an inverse, different inputs must go to different outputs, or else we will run into the same problem we did with \(f(x) = x^2\). We give this property a name.

    Definition 5.3.

    A function \(f\) is said to be one-to-one if \(f\) matches different inputs to different outputs. Equivalently, \(f\) is one-to-one if and only if whenever \(f(c) = f(d)\), then \(c=d\).

    Graphically, we detect one-to-one functions using the test below.

    Theorem 5.4. The Horizontal Line Test

    A function \(f\) is one-to-one if and only if no horizontal line intersects the graph of \(f\) more than once.

    We say that the graph of a function passes the Horizontal Line Test if no horizontal line intersects the graph more than once; otherwise, we say the graph of the function fails the Horizontal Line Test. We have argued that if \(f\) is invertible, then \(f\) must be one-to-one, otherwise the graph given by reflecting the graph of \(y = f(x)\) about the line \(y = x\) will fail the Vertical Line Test. It turns out that being one-to-one is also enough to guarantee invertibility. To see this, we think of \(f\) as the set of ordered pairs which constitute its graph. If switching the \(x\)- and \(y\)-coordinates of the points results in a function, then \(f\) is invertible and we have found \(f^{-1}\). This is precisely what the Horizontal Line Test does for us: it checks to see whether or not a set of points describes \(x\) as a function of \(y\). We summarize these results below.

    Theorem 5.5. Equuivelent Conditions for Invertibility

    Equivalent Conditions for Invertibility: Suppose \(f\) is a function. The following statements are equivalent.

    • \(f\) is invertible
    • \(f\) is one-to-one
    • The graph of \(f\) passes the Horizontal Line Test

    We put this result to work in the next example.

    Example 5.2.1

    Determine if the following functions are one-to-one in two ways: (a) analytically using Definition 5.3 and (b) graphically using the Horizontal Line Test.

    1. \(f(x) = \dfrac{1-2x}{5}\)
    2. \(g(x) = \dfrac{2x}{1-x}\)
    3. \(h(x) = x^2 - 2x+4\)
    4. \(F = \{(-1,1), (0,2), (2,1)\}\)

    Solution

      1. To determine if \(f\) is one-to-one analytically, we assume \(f(c) = f(d)\) and attempt to deduce that \(c=d\).

        \[\begin{array}{rclr} f(c) & = & f(d) & \\[4pt] \dfrac{1-2c}{5} & = & \dfrac{1-2d}{5} & \\[4pt] 1-2c & = & 1-2d & \\ -2c & = & -2d & \\ c & = & d \, \, \checkmark & \\ \end{array}\nonumber\]

        Hence, \(f\) is one-to-one.

      2. To check if \(f\) is one-to-one graphically, we look to see if the graph of \(y=f(x)\) passes the Horizontal Line Test. We have that \(f\) is a non-constant linear function, which means its graph is a non-horizontal line. Thus the graph of \(f\) passes the Horizontal Line Test.
      1. We begin with the assumption that \(g(c) = g(d)\) and try to show \(c=d\).

        \[\begin{array}{rclr} g(c) & = & g(d) & \\[4pt] \dfrac{2c}{1-c} & = & \dfrac{2d}{1-d} & \\ [6pt] 2c(1-d) & = & 2d(1-c) & \\ 2c - 2cd & = & 2d - 2dc & \\ 2c & = & 2d & \\ c & = & d \, \, \checkmark \\ \end{array}\nonumber\]

        We have shown that \(g\) is one-to-one.

      2. We can graph \(g\) using the six step procedure outlined in Section 4.2. We get the sole intercept at \((0,0)\), a vertical asymptote \(x=1\) and a horizontal asymptote (which the graph never crosses) \(y = -2\). We see from that the graph of \(g\) passes the Horizontal Line Test.

        Screen Shot 2022-04-13 at 10.49.55 PM.png

      1. We begin with \(h(c) = h(d)\). As we work our way through the problem, we encounter a nonlinear equation. We move the non-zero terms to the left, leave a \(0\) on the right and factor accordingly.

        \[\begin{array}{rclr} h(c) & = & h(d) & \\ c^2 - 2c+4 & = & d^2 - 2d+4 & \\ c^2 - 2c & = & d^2 - 2d & \\ c^2 - d^2 - 2c + 2d & = & 0 & \\ (c+d)(c-d) - 2(c-d) & = & 0 & \\ (c-d)((c+d) -2) & = & 0 & \mbox{factor by grouping} \\ c-d = 0 & \mbox{or} & c+d -2 = 0 & \\ c = d & \mbox{or} & c = 2-d & \\ \end{array}\nonumber\]

        We get \(c=d\) as one possibility, but we also get the possibility that \(c=2-d\). This suggests that \(f\) may not be one-to-one. Taking \(d=0\), we get \(c = 0\) or \(c = 2\). With \(f(0) = 4\) and \(f(2) = 4\), we have produced two different inputs with the same output meaning \(f\) is not one-to-one.

      2. We note that \(h\) is a quadratic function and we graph \(y=h(x)\) using the techniques presented in Section 2.3. The vertex is \((1,3)\) and the parabola opens upwards. We see immediately from the graph that \(h\) is not one-to-one, since there are several horizontal lines which cross the graph more than once.
      1. The function \(F\) is given to us as a set of ordered pairs. The condition \(F(c)=F(d)\) means the outputs from the function (the \(y\)-coordinates of the ordered pairs) are the same. We see that the points \((-1,1)\) and \((2,1)\) are both elements of \(F\) with \(F(-1)=1\) and \(F(2) = 1\). Since \(-1 \neq 2\), we have established that \(F\) is not one-to-one.
      2. Graphically, we see the horizontal line \(y=1\) crosses the graph more than once. Hence, the graph of \(F\) fails the Horizontal Line Test.

        Screen Shot 2022-04-13 at 10.54.54 PM.png

    We have shown that the functions \(f\) and \(g\) in Example 5.2.1 are one-to-one. This means they are invertible, so it is natural to wonder what \(f^{-1}(x)\) and \(g^{-1}(x)\) would be. For \(f(x) = \frac{1-2x}{5}\), we can think our way through the inverse since there is only one occurrence of \(x\). We can track step-by-step what is done to \(x\) and reverse those steps as we did at the beginning of the chapter. The function \(g(x) = \frac{2x}{1-x}\) is a bit trickier since \(x\) occurs in two places. When one evaluates \(g(x)\) for a specific value of \(x\), which is first, the \(2x\) or the \(1-x\)? We can imagine functions more complicated than these so we need to develop a general methodology to attack this problem. Theorem 5.2 tells us equation \(y = f^{-1}(x)\) is equivalent to \(f(y) = x\) and this is the basis of our algorithm.

    Steps for finding the Inverse of a Once-to-one Function
    1. Write \(y=f(x)\)
    2. Interchange \(x\) and \(y\)
    3. Solve \(x = f(y)\) for \(y\) to obtain \(y=f^{-1}(x)\)

    Note that we could have simply written ‘Solve \(x=f(y)\) for \(y\)’ and be done with it. The act of interchanging the \(x\) and \(y\) is there to remind us that we are finding the inverse function by switching the inputs and outputs.

    Example 5.2.2

    Find the inverse of the following one-to-one functions. Check your answers analytically using function composition and graphically.

    1. \(f(x) = \dfrac{1-2x}{5}\)
    2. \(g(x) = \dfrac{2x}{1-x}\)
    Solution
    1. As we mentioned earlier, it is possible to think our way through the inverse of \(f\) by recording the steps we apply to \(x\) and the order in which we apply them and then reversing those steps in the reverse order. We encourage the reader to do this. We, on the other hand, will practice the algorithm. We write \(y=f(x)\) and proceed to switch \(x\) and \(y\)

      \[\begin{array}{rclr} y & = & f(x) & \\[4pt] y & = & \dfrac{1-2x}{5} & \\ [6pt] x & = & \dfrac{1-2y}{5} & \mbox{switch $x$ and $y$} \\ [6pt] 5x & = & 1 - 2y & \\ 5x-1 & = & -2y & \\ \dfrac{5x-1}{-2} & = & y & \\ y & = & -\dfrac{5}{2} x + \dfrac{1}{2} & \\ \end{array}\nonumber\]

      We have \(f^{-1}(x) = -\frac{5}{2} x + \frac{1}{2}\). To check this answer analytically, we first check that \(\left(f^{-1} \circ f \right)(x) = x\) for all \(x\) in the domain of \(f\), which is all real numbers.

      \[\begin{array}{rclr} \left(f^{-1} \circ f \right)(x) & = & f^{-1}(f(x)) & \\ & = & -\dfrac{5}{2} f(x) + \dfrac{1}{2} & \\ [6pt] & = & -\dfrac{5}{2} \left(\dfrac{1-2x}{5}\right) + \dfrac{1}{2} & \\ & = & -\dfrac{1}{2} (1-2x) + \dfrac{1}{2} & \\ [6pt] & = & -\dfrac{1}{2} + x + \dfrac{1}{2} & \\ & = & x \, \, \checkmark \\ \end{array}\nonumber\]

      We now check that \(\left(f \circ f^{-1} \right)(x) = x\) for all \(x\) in the range of \(f\) which is also all real numbers. (Recall that the domain of \(f^{-1}\)) is the range of \(f\).)

      \[\begin{array}{rclr} \left(f \circ f^{-1} \right)(x) & = & f(f^{-1}(x)) & \\[4pt] & = &\dfrac{1-2f^{-1}(x)}{5} & \\ [6pt] & = &\dfrac{1-2\left( -\frac{5}{2} x + \frac{1}{2} \right)}{5} & \\ [6pt] & = & \dfrac{1+5x-1}{5} & \\ & = &\dfrac{5x}{5} & \\ & = & x \, \, \checkmark\\ \end{array}\nonumber\]

      To check our answer graphically, we graph \(y=f(x)\) and \(y=f^{-1}(x)\) on the same set of axes.5 They appear to be reflections across the line \(y=x\).

      Screen Shot 2022-04-13 at 11.50.19 PM.png

    2. To find \(g^{-1}(x)\), we start with \(y=g(x)\). We note that the domain of \(g\) is \((-\infty,1) \cup (1, \infty)\).

      \[\begin{array}{rclr} y & = & g(x) & \\[4pt] y & = & \dfrac{2x}{1-x} & \\ [7pt] x & = & \dfrac{2y}{1-y} & \mbox{switch $x$ and $y$} \\[4pt] x(1-y) & = & 2y & \\[4pt] x-xy & = & 2y & \\[4pt] x & = & xy + 2y & \\[4pt] x & = & y(x+2) & \mbox{factor}\\ [8pt] y & = & \dfrac{x}{x+2} \end{array}\nonumber\]

      We obtain \(g^{-1}(x) = \frac{x}{x+2}\). To check this analytically, we first check \(\left(g^{-1} \circ g \right)(x) = x\) for all \(x\) in the domain of \(g\), that is, for all \(x \neq 1\).

      \(\begin{aligned}
      \left(g^{-1} \circ g\right)(x) &=g^{-1}(g(x)) \\
      &=g^{-1}\left(\frac{2 x}{1-x}\right) \\
      &=\frac{\left(\frac{2 x}{1-x}\right)}{\left(\frac{2 x}{1-x}\right)+2} \\
      &=\frac{\left(\frac{2 x}{1-x}\right)}{\left(\frac{2 x}{1-x}\right)+2} \cdot \frac{(1-x)}{(1-x)} \text { clear denominators }\\
      &=\frac{2 x}{2 x+2(1-x)} \\
      &=\frac{2 x}{2 x+2-2 x} \\
      &=\frac{2 x}{2} \\
      &=x \checkmark
      \end{aligned}\)

      Next, we check \(g\left(g^{-1}(x)\right)= x\) for all \(x\) in the range of \(g\). From the graph of \(g\) in Example 5.2.1, we have that the range of \(g\) is \((-\infty, -2) \cup (-2,\infty)\). This matches the domain we get from the formula \(g^{-1}(x) = \frac{x}{x+2}\), as it should.

      \[\begin{array}{rclr} \left(g \circ g^{-1} \right)(x) & = & g\left(g^{-1}(x)\right) & \\[15pt] & = & g \left(\dfrac{x}{x+2}\right) & \\[15pt] & = & \dfrac{ 2\left(\dfrac{x}{x+2}\right)}{ 1-\left(\dfrac{x}{x+2}\right)} \\ [30pt] & = & \dfrac{ 2\left(\dfrac{x}{x+2}\right)}{ 1-\left(\dfrac{x}{x+2}\right)} \cdot \dfrac{(x+2)}{(x+2)} & \mbox{clear denominators} \\ [30pt] & = & \dfrac{ 2x}{ (x+2) -x} & \\[15pt] & = & \dfrac{2x}{2} & \\[15pt] & = & x \, \, \checkmark \\ \end{array}\nonumber\]

      Graphing \(y=g(x)\) and \(y = g^{-1}(x)\) on the same set of axes is busy, but we can see the symmetric relationship if we thicken the curve for \(y=g^{-1}(x)\). Note that the vertical asymptote \(x=1\) of the graph of \(g\) corresponds to the horizontal asymptote \(y=1\) of the graph of \(g^{-1}\), as it should since \(x\) and \(y\) are switched. Similarly, the horizontal asymptote \(y=-2\) of the graph of \(g\) corresponds to the vertical asymptote \(x=-2\) of the graph of \(g^{-1}\).

      Screen Shot 2022-04-14 at 12.18.47 AM.png

    We now return to \(f(x) = x^2\). We know that \(f\) is not one-to-one, and thus, is not invertible. However, if we restrict the domain of \(f\), we can produce a new function \(g\) which is one-to-one. If we define \(g(x) = x^2\), \(x \geq 0\), then we have

    Screen Shot 2022-04-14 at 12.21.46 AM.png

    The graph of \(g\) passes the Horizontal Line Test. To find an inverse of \(g\), we proceed as usual

    \[\begin{array}{rclr} y & = & g(x) & \\ y & = & x^2, \, \, \, x \geq 0 & \\ x & = & y^2, \, \, \, y \geq 0 & \mbox{switch $x$ and $y$}\\ y & = & \pm \sqrt{x} & \\ y & = & \sqrt{x} & \mbox{since $y \geq 0$} \\ \end{array}\nonumber\]

    We get \(g^{-1}(x) = \sqrt{x}\). At first it looks like we’ll run into the same trouble as before, but when we check the composition, the domain restriction on \(g\) saves the day. We get \(\left(g^{-1} \circ g\right) (x) = g^{-1}(g(x)) = g^{-1}\left(x^2\right) = \sqrt{x^2} = |x| = x\), since \(x \geq 0\). Checking \(\left( g \circ g^{-1}\right)(x) = g\left(g^{-1}(x)\right) = g\left(\sqrt{x}\right) = \left(\sqrt{x}\right)^2 = x\). Graphing6 \(g\) and \(g^{-1}\) on the same set of axes shows that they are reflections about the line \(y=x\).

    Screen Shot 2022-04-14 at 12.25.05 AM.png

    Our next example continues the theme of domain restriction.

    Example 5.2.3

    Graph the following functions to show they are one-to-one and find their inverses. Check your answers analytically using function composition and graphically.

    1. \(j(x) = x^2 - 2x + 4\), \(x \leq 1\).
    2. \(k(x) = \sqrt{x+2} - 1\)

    Solution.

    1. The function \(j\) is a restriction of the function \(h\) from Example 5.2.1. Since the domain of \(j\) is restricted to \(x \leq 1\), we are selecting only the ‘left half’ of the parabola. We see that the graph of \(j\) passes the Horizontal Line Test and thus \(j\) is invertible.

      Screen Shot 2022-04-14 at 12.46.06 AM.png

      We now use our algorithm7 to find \(j^{-1}(x)\).

      \[\begin{array}{rclr} y & = & j(x) & \\ y & = & x^2-2x+4, \, \, \, x \leq 1 \\ x & = & y^2 - 2y+4, \, \, \, y \leq 1 & \mbox{switch $x$ and $y$} \\ 0 & = & y^2 - 2y + 4-x & \\ y & = & \dfrac{2 \pm \sqrt{(-2)^2-4(1)(4-x)}}{2(1)} & \mbox{quadratic formula, $c=4-x$} \\ [10pt] y & = & \dfrac{2 \pm \sqrt{4x-12}}{2} & \\ [6pt] y & = & \dfrac{2 \pm \sqrt{4(x-3)}}{2} & \\ [6pt] y & = & \dfrac{2 \pm 2\sqrt{x-3}}{2} & \\ [6pt] y & = & \dfrac{2\left(1 \pm \sqrt{x-3}\right)}{2} & \\ [6pt] y & = & 1 \pm \sqrt{x-3} & \\ y & = & 1 - \sqrt{x-3} & \mbox{since $y \leq 1$.} \\ \end{array}\nonumber\]

      We have \(j^{-1}(x) = 1 - \sqrt{x-3}\). When we simplify \(\left(j^{-1} \circ j\right)(x)\), we need to remember that the domain of \(j\) is \(x \leq 1\).

      \[\begin{array}{rclr} \left(j^{-1} \circ j \right)(x) & = & j^{-1}(j(x)) & \\ & = & j^{-1}\left(x^2-2x+4\right), \, \, \, x \leq 1 & \\ & = & 1 - \sqrt{\left(x^2-2x+4\right)-3} & \\ & = & 1 - \sqrt{x^2-2x+1} & \\ & = & 1 - \sqrt{(x-1)^2} & \\ & = & 1 - |x-1|& \\ & = & 1 - (-(x-1)) & \mbox{since $x \leq 1$}\\ & = & x \, \, \checkmark &\\ \end{array}\nonumber\]

      Checking \(j \circ j^{-1}\), we get

      \[\begin{array}{rclr} \left(j \circ j^{-1} \right)(x) & = & j\left(j^{-1}(x)\right) & \\ & = & j\left(1 - \sqrt{x-3}\right) & \\ & = & \left(1 - \sqrt{x-3}\right)^2-2\left(1 - \sqrt{x-3}\right)+4 & \\ & = & 1 - 2\sqrt{x-3} + \left(\sqrt{x-3}\right)^2 -2 + 2\sqrt{x-3}+4 & \\ & = & 3+ x-3 & \\ & = & x \, \, \checkmark &\\ \end{array}\nonumber\]

      Using what we know from Section 1.7, we graph \(y=j^{-1}(x)\) and \(y=j(x)\) below.

      Screen Shot 2022-04-14 at 1.18.00 AM.png

    2. We graph \(y=k(x) =\sqrt{x+2} - 1\) using what we learned in Section 1.7 and see \(k\) is one-to-one.

      Screen Shot 2022-04-14 at 1.19.22 AM.png

      We now try to find \(k^{-1}\).

      \[\begin{array}{rclr} y & = & k(x) & \\ y & = & \sqrt{x+2}-1 & \\ x & = & \sqrt{y+2} - 1 & \mbox{switch $x$ and $y$} \\ x+1 & = & \sqrt{y+2} & \\ (x+1)^2 & = & \left(\sqrt{y+2}\right)^2 & \\ x^2 + 2x + 1 & = & y + 2 & \\ y & = & x^2 + 2x - 1 & \\ \end{array}\nonumber\]

      We have \(k^{-1}(x) = x^2+2x-1\). Based on our experience, we know something isn’t quite right. We determined \(k^{-1}\) is a quadratic function, and we have seen several times in this section that these are not one-to-one unless their domains are suitably restricted. Theorem 5.2 tells us that the domain of \(k^{-1}\) is the range of \(k\). From the graph of \(k\), we see that the range is \([-1, \infty)\), which means we restrict the domain of \(k^{-1}\) to \(x \geq -1\). We now check that this works in our compositions.

      \[\begin{array}{rclr} \left(k^{-1} \circ k \right)(x) & = & k^{-1}(k(x)) & \\ & = & k^{-1}\left(\sqrt{x+2}-1\right), \, \, \, x \geq -2 & \\ & = & \left(\sqrt{x+2}-1\right)^2 + 2\left(\sqrt{x+2}-1\right) - 1& \\ & = & \left(\sqrt{x+2}\right)^2 - 2\sqrt{x+2} + 1 + 2 \sqrt{x+2} - 2 - 1 & \\ & = &x+2 -2 & \\ & = & x \, \, \checkmark &\\ \end{array}\nonumber\]

      and

      \[\begin{array}{rclr} \left(k \circ k^{-1} \right)(x) & = & k\left( x^2+2x-1 \right) \, \, \, x \geq -1 & \\ & = & \sqrt{\left(x^2+2x-1\right)+2}-1 & \\ & = & \sqrt{x^2+2x+1}-1 & \\ & = & \sqrt{(x+1)^2}-1 & \\ & = & |x+1| -1 & \\ & = & x+1 -1 & \mbox{since $x \geq -1$}\\ & = & x \, \, \checkmark &\\ \end{array}\nonumber\]

      Graphically, everything checks out as well, provided that we remember the domain restriction on \(k^{-1}\) means we take the right half of the parabola.

      Screen Shot 2022-04-14 at 1.20.48 AM.png

    Our last example of the section gives an application of inverse functions.

    Example 5.2.4

    Recall from Section 2.1 that the price-demand equation for the PortaBoy game system is \(p(x) = -1.5x + 250\) for \(0 \leq x \leq 166\), where \(x\) represents the number of systems sold weekly and \(p\) is the price per system in dollars.

    1. Explain why \(p\) is one-to-one and find a formula for \(p^{-1}(x)\). State the restricted domain.
    2. Find and interpret \(p^{-1}(220)\).
    3. Recall from Section 2.3 that the weekly profit \(P\), in dollars, as a result of selling \(x\) systems is given by \(P(x)= -1.5x^2+170x-150\). Find and interpret \(\left( P \circ p^{-1}\right)(x)\).
    4. Use your answer to part 3 to determine the price per PortaBoy which would yield the maximum profit. Compare with Example 2.3.3.

    Solution

    1. We leave to the reader to show the graph of \(p(x) = -1.5x + 250\), \(0 \leq x \leq 166\), is a line segment from \((0,250)\) to \((166,1)\), and as such passes the Horizontal Line Test. Hence, \(p\) is one-to-one. We find the expression for \(p^{-1}(x)\) as usual and get \(p^{-1}(x) = \frac{500-2x}{3}\). The domain of \(p^{-1}\) should match the range of \(p\), which is \([1,250]\), and as such, we restrict the domain of \(p^{-1}\) to \(1 \leq x \leq 250\).
    2. We find \(p^{-1}(220) = \frac{500-2(220)}{3} = 20\). Since the function \(p\) took as inputs the weekly sales and furnished the price per system as the output, \(p^{-1}\) takes the price per system and returns the weekly sales as its output. Hence, \(p^{-1}(220) = 20\) means \(20\) systems will be sold in a week if the price is set at \(\$ 220\) per system.
    3. We compute \(\left( P \circ p^{-1}\right)(x) = P \left(p^{-1}(x)\right) = P\left(\frac{500-2x}{3}\right) = -1.5\left(\frac{500-2x}{3}\right)^2+170\left(\frac{500-2x}{3}\right)-150\). After a hefty amount of Elementary Algebra,8 we obtain \(\left( P \circ p^{-1}\right)(x) = -\frac{2}{3} x^2 +220x - \frac{40450}{3}\). To understand what this means, recall that the original profit function \(P\) gave us the weekly profit as a function of the weekly sales. The function \(p^{-1}\) gives us the weekly sales as a function of the price. Hence, \(P \circ p^{-1}\) takes as its input a price. The function \(p^{-1}\) returns the weekly sales, which in turn is fed into \(P\) to return the weekly profit. Hence, \(\left(P \circ p^{-1}\right)(x)\) gives us the weekly profit (in dollars) as a function of the price per system, \(x\), using the weekly sales \(p^{-1}(x)\) as the ‘middle man’.
    4. We know from Section 2.3 that the graph of \(y = \left( P \circ p^{-1}\right)(x)\) is a parabola opening downwards. The maximum profit is realized at the vertex. Since we are concerned only with the price per system, we need only find the \(x\)-coordinate of the vertex. Identifying \(a = -\frac{2}{3}\) and \(b = 220\), we get, by the Vertex Formula, Equation 2.4, \(x = -\frac{b}{2a} = 165\). Hence, weekly profit is maximized if we set the price at \(\$165\) per system. Comparing this with our answer from Example 2.3.3, there is a slight discrepancy to the tune of \(\$0.50\). We leave it to the reader to balance the books appropriately.

    Exercises

    In Exercises 1 - 20, show that the given function is one-to-one and find its inverse. Check your answers algebraically and graphically. Verify that the range of \(f\) is the domain of \(f^{-1}\) and vice-versa.

    1. \(f(x) = 6x - 2\)
    2. \(f(x) = 42-x\)
    3. \(f(x) = \dfrac{x-2}{3} + 4\)
    4. \(f(x) = 1 - \dfrac{4+3x}{5}\)
    5. \(f(x) = \sqrt{3x-1}+5\)
    6. \(f(x) = 2-\sqrt{x - 5}\)
    7. \(f(x) = 3\sqrt{x-1}-4\)
    8. \(f(x) = 1 - 2\sqrt{2x+5}\)
    9. \(f(x) = \sqrt[5]{3x-1}\)
    10. \(f(x) = 3-\sqrt[3]{x-2}\)
    11. \(f(x) = x^2 - 10x\), \(x \geq 5\)
    12. \(f(x) = 3(x + 4)^{2} - 5, \; x \leq -4\)
    13. \(f(x) = x^2-6x+5, \; x \leq 3\)
    14. \(f(x) = 4x^2 + 4x + 1\), \(x < -1\)
    15. \(f(x) = \dfrac{3}{4-x}\)
    16. \(f(x) = \dfrac{x}{1-3x}\)
    17. \(f(x) = \dfrac{2x-1}{3x+4}\)
    18. \(f(x) = \dfrac{4x + 2}{3x - 6}\)
    19. \(f(x) = \dfrac{-3x - 2}{x + 3}\)
    20. \(f(x) = \dfrac{x-2}{2x-1}\)

    With help from your classmates, find the inverses of the functions in Exercises 21 - 24.

    1. \(f(x) = ax + b, \; a \neq 0\) [genericinversefirst]
    2. \(f(x) = a\sqrt{x - h} + k, \; a \neq 0, x \geq h\)
    3. \(f(x) = ax^{2} + bx + c\) where \(a \neq 0, \, x \geq -\dfrac{b}{2a}\).
    4. \(f(x) = \dfrac{ax + b}{cx + d},\;\) (See Exercise 33 below.)
    5. In Example 1.5.3, the price of a dOpi media player, in dollars per dOpi, is given as a function of the weekly sales \(x\) according to the formula \(p(x) = 450-15x\) for \(0 \leq x \leq 30\).
      1. Find \(p^{-1}(x)\) and state its domain.
      2. Find and interpret \(p^{-1}(105)\).
      3. In Example 1.5.3, we determined that the profit (in dollars) made from producing and selling \(x\) dOpis per week is \(P(x)= -15x^2+350x-2000\), for \(0 \leq x \leq 30\). Find \(\left(P \circ p^{-1}\right)(x)\) and determine what price per dOpi would yield the maximum profit. What is the maximum profit? How many dOpis need to be produced and sold to achieve the maximum profit?
    6. Show that the Fahrenheit to Celsius conversion function found in Exercise 35 in Section 2.1 is invertible and that its inverse is the Celsius to Fahrenheit conversion function.
    7. Analytically show that the function \(f(x) = x^3 + 3x + 1\) is one-to-one. Since finding a formula for its inverse is beyond the scope of this textbook, use Theorem 5.2 to help you compute \(f^{-1}(1), \; f^{-1}(5), \;\) and \(f^{-1}(-3)\).
    8. Let \(f(x) = \frac{2x}{x^2-1}\). Using the techniques in Section 4.2, graph \(y=f(x)\). Verify that \(f\) is one-to-one on the interval \((-1,1)\). Use the procedure outlined on Page 384 and your graphing calculator to find the formula for \(f^{-1}(x)\). Note that since \(f(0) = 0\), it should be the case that \(f^{-1}(0) = 0\). What goes wrong when you attempt to substitute \(x=0\) into \(f^{-1}(x)\)? Discuss with your classmates how this problem arose and possible remedies.
    9. With the help of your classmates, explain why a function which is either strictly increasing or strictly decreasing on its entire domain would have to be one-to-one, hence invertible.
    10. If \(f\) is odd and invertible, prove that \(f^{-1}\) is also odd.
    11. [fcircginverse] Let \(f\) and \(g\) be invertible functions. With the help of your classmates show that \((f \circ g)\) is one-to-one, hence invertible, and that \((f \circ g)^{-1}(x) = (g^{-1} \circ f^{-1})(x)\).
    12. What graphical feature must a function \(f\) possess for it to be its own inverse?
    13. [whatconditions] What conditions must you place on the values of \(a, b, c\) and \(d\) in Exercise 24 in order to guarantee that the function is invertible?

    Answers

    1. \(f^{-1}(x) = \dfrac{x + 2}{6}\)
    2. \(f^{-1}(x) = 42-x\)
    3. \(f^{-1}(x) = 3x-10\)
    4. \(f^{-1}(x) = -\frac{5}{3} x + \frac{1}{3}\)
    5. \(f^{-1}(x) = \frac{1}{3}(x-5)^2+\frac{1}{3}\), \(x \geq 5\)
    6. \(f^{-1}(x) = (x - 2)^{2} + 5, \; x \leq 2\)
    7. \(f^{-1}(x) = \frac{1}{9}(x+4)^2+1\), \(x \geq -4\)
    8. \(f^{-1}(x) = \frac{1}{8}(x-1)^2-\frac{5}{2}\), \(x \leq 1\)
    9. \(f^{-1}(x) = \frac{1}{3} x^{5} + \frac{1}{3}\)
    10. \(f^{-1}(x) = -(x-3)^3+2\)
    11. \(f^{-1}(x) = 5 + \sqrt{x+25}\)
    12. \(f^{-1}(x) = -\sqrt{\frac{x + 5}{3}} - 4\)
    13. \(f^{-1}(x) = 3 - \sqrt{x+4}\)
    14. \(f^{-1}(x) =-\frac{\sqrt{x}+1}{2}\), \(x > 1\)
    15. \(f^{-1}(x) = \dfrac{4x-3}{x}\)
    16. \(f^{-1}(x) = \dfrac{x}{3x+1}\)
    17. \(f^{-1}(x) = \dfrac{4x+1}{2-3x}\)
    18. \(f^{-1}(x) = \dfrac{6x + 2}{3x - 4}\)
    19. \(f^{-1}(x) = \dfrac{-3x - 2}{x + 3}\)
    20. \(f^{-1}(x) = \dfrac{x-2}{2x-1}\)
      1. \(p^{-1}(x) = \frac{450-x}{15}\). The domain of \(p^{-1}\) is the range of \(p\) which is \([0,450]\)
      2. \(p^{-1}(105) = 23\). This means that if the price is set to \(\$105\) then \(23\) dOpis will be sold.
      3. \(\left(P\circ p^{-1}\right)(x) = -\frac{1}{15} x^2 + \frac{110}{3} x - 5000\), \(0 \leq x \leq 450\). The graph of \(y = \left(P\circ p^{-1}\right)(x)\) is a parabola opening downwards with vertex \(\left(275, \frac{125}{3}\right) \approx (275, 41.67)\). This means that the maximum profit is a whopping \(\$41.67\) when the price per dOpi is set to \(\$275\). At this price, we can produce and sell \(p^{-1}(275) = 11.\overline{6}\) dOpis. Since we cannot sell part of a system, we need to adjust the price to sell either \(11\) dOpis or \(12\) dOpis. We find \(p(11) = 285\) and \(p(12) = 270\), which means we set the price per dOpi at either \(\$285\) or \(\$270\), respectively. The profits at these prices are \(\left(P\circ p^{-1}\right)(285) = 35\) and \(\left(P\circ p^{-1}\right)(270) = 40\), so it looks as if the maximum profit is \(\$40\) and it is made by producing and selling \(12\) dOpis a week at a price of \(\$270\) per dOpi.
    1. Given that \(f(0) = 1\), we have \(f^{-1}(1) = 0\). Similarly \(f^{-1}(5) = 1\) and \(f^{-1}(-3) = -1\)

    Reference

    1 The identity function \(\ I\), which was introduced in Section 2.1 and mentioned in Theorem 5.1, has a domain of all real numbers. Since the domains of \(\ f\) and \(\ g\) may not be all real numbers, we need the restrictions listed here.

    2 In other words, invertible functions have exactly one inverse.

    3 It is an excellent exercise to explain each step in this string of equalities.

    4 In the interests of full disclosure, the authors would like to admit that much of the discussion in the previous paragraphs could have easily been avoided had we appealed to the description of a function as a set of ordered pairs. We make no apology for our discussion from a function composition standpoint, however, since it exposes the reader to more abstract ways of thinking of functions and inverses. We will revisit this concept again in Chapter 8.

    5 Note that if you perform your check on a calculator for more sophisticated functions, you’ll need to take advantage of the ‘ZoomSquare’ feature to get the correct geometric perspective.

    6 We graphed \(y=\sqrt{x}\) in Section 1.7.

    7 Here, we use the Quadratic Formula to solve for \(y\). For ‘completeness,’ we note you can (and should!) also consider solving for \(y\) by ‘completing’ the square.

    8 It is good review to actually do this!


    This page titled 5.2: Inverse Functions is shared under a CC BY-NC-SA 3.0 license and was authored, remixed, and/or curated by Carl Stitz & Jeff Zeager via source content that was edited to the style and standards of the LibreTexts platform.