Skip to main content
Mathematics LibreTexts

1.7: Inverse Functions

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

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

    \( \newcommand{\dsum}{\displaystyle\sum\limits} \)

    \( \newcommand{\dint}{\displaystyle\int\limits} \)

    \( \newcommand{\dlim}{\displaystyle\lim\limits} \)

    \( \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{\longvect}{\overrightarrow}\)

    \( \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}\)

    Focus: Understanding Inverse Functions

    As we look to build new functions to describe relationships, we explore an important type of functions, inverse functions. On a basic level, inverse functions are functions that undo each other. For example, if \(f\) is the function that adds 2 to its input, then the function \(g\) that subtracts 2 from its input undoes this. If \(h\) is the function that multiplies its input by 2, then the function \(k\) that divides 2 from its input undoes this. If \(m\) is the function that takes the square root of its input, then the function \(n\) that squares its input undoes this.

    a diagram showing function f undone by function g a diagram showing function h and k which are inverses. a diagram of function m and its inverse n undoing each other

    Definition: Inverse Function (Conceptual Definition)

    A function \(g\) is the inverse of a function \(f\) if the operations of function \(g\) undo the operations of function \(f\). The inverse of \(f(x)\) is typically notated with the function name \(f^{-1}\), which is read “\(f\) inverse ”. So we write \(x = g(y) = f^{-1}(y) \)

    Be Careful

    We are now using negative exponents in two contexts in mathematics. With numbers and variables, an exponent of negative one means we have one factor in the denominator. For example, \(3^{-1} = \dfrac{1}{3^{1}} \) and \( x^{-1} = \dfrac{1}{x^{1}} \). In the context of a function, \(f^{-1}\) refers to the inverse function of \(f\).

    Notice what a function and its inverse do to their inputs and outputs. For the function \(f\) which adds two to the input, if we input \(x=3\), we get an output of \(y=5\). For its inverse \(f^{-1} \) which subtracts two from its input, if we input \(y=5\), we get an output of \(x=3\). So

    \(f(3)=5\) and \(f^{-1}(5)=3\)

    function f which adds 2 is undone by its inverse function which subtracts 2

    Similarly, for the function \(h\) which multiplies its input by two, if we input \(x=3\), we get an output of \(y=6\). For its inverse \(h^{-1}\) which divides its input by two, if we input \(y=6\), we get an output of \(x=3\). So

    \(h(3)=6\) and \(h^{-1}(6)=3\).

    function f which multiplies by 2 is undone by its inverse function which divides 2

    Similarly, for the function \(m\) which takes the square root of input, if we input \(x=9\), we get an output of \(y=3\). For its inverse \(m^{-1}\) which divides its input by two, if we input \(y=6\), we get an output of \(x=3\). So

    \(m(9)=3\) and \(m^{-1}(3)=9\)

    function m which takes the square root is undone by its inverse function squares its input

    Notice that in each case the inputs and outputs of a function and its inverse are switched. The inputs of \(f\) are the outputs of \(f^{-1} \) and the outputs of \(f\) are the inputs of \(f^{-1} \).

    Key Point: \(\PageIndex{1}\)

    The inputs and outputs of a function \(f\) and its inverse \(f^{-1} \) are switched. The inputs of \(f\) are the outputs of \(f^{-1} \) and the outputs of \(f\) are the inputs of \(f^{-1} \).

    In other words, the domain of \(f\) is the range of the inverse \(f^{-1} \) and the range of \(f\) is the domain of the inverse \(f^{-1} \).

    Example \(\PageIndex{1}\)

    Function \(y=f(x)\) is given by the table below. Write a second table that defines the inverse \(f^{-1} \).

    The inputs and outputs of function f.
    input, x 1 2 3 4
    output, \(y=f(x)\) 2 5 8 3
    Solution
    the inputs and outputs of the inverse function
    input, \(y\) 2 5 8 3
    output, \(x=f^{-1}(y)\) 1 2 3 4
    Example \(\PageIndex{2}\)

    The function \(g\) is given by the ordered pairs \(g\) = {(1,2), (2,7), (3,4), 4,6)}. Write a set of ordered pairs for the inverse function \(g^{-1} \).

    Solution

    The inputs and outputs of \(g\) and \(g^{-1} \) are switched. So \(g^{-1} \) = {(1,2), (2,7), (3,4), 4,6)}.

    Example \(\PageIndex{3}\)

    The function \(P = f(t)=3000+200t\) gives the population of a town in \(t\) years. Evaluate and interpret the meaning of the following:

    1. \(f(20)\)
    2. \(f^{-1}(20,000)\)
    Solution

    Since \(f\) relates the years \(t\) to the population \(P\), the inverse \(f^{-1}\) relates the population \(P\) to the years \(t\).

    a diagram of the function f and its inverse relating time and population.

    1. For function \(f\) the input represents the years \(t\). So \(t\) = 20 years . To find the output \(P=f(20)\) we substitute for \(t\) and \[P=f(20)=3000+200(20)=7000 \nonumber \] In 20 years, the town will have a population of 7000 people.
    2. For the inverse function \(f^{-1}\) the input represents the population \(P\). So \(P\) = 20,000 people. To find the output \(t=f^{-1}(20,000)\) we substitute for \(P\) into the formula for \(f\) \[20000=3000+200t \nonumber \] Then solving for \(t\)\[17000=200t \nonumber \] \[t = \dfrac{17000}{200}=85 \nonumber \] In 85 years, the town will have a population of 85,000 people.
    Now You Try: Exercise \(\PageIndex{1}\)

    A function \(g(x)\) is given as a graph below. Find \(g(3)\) and \(g^{-1} (3)\)

    An increasing concave-up graph, passing through (3,1) and (5,3)

    Answer

    \(g(3)=1\) and \(g^{-1} (3)=5\)

    Now You Try: Exercise \(\PageIndex{2}\)

    The formula \(C=g(F) = \dfrac{5}{9} (F-32)\) gives the temperature in Celsius degrees \(C\) for a given temperature in Fahrenheit.

    Evaluate and interpret the meaning of the following:

    1. \(g(50)\)
    2. \(g^{-1}(50)\)
    Answer
    1. \(C=g(50)=10\). A temperature of 10 degrees Celsius is equivalent to 50 degrees Fahrenheit.
    2. \(F=g^{-1}(50)=122\). A temperature of 122 degrees Fahrenheit is equivalent to 50 degrees Celsius.
    Now You Try: Exercise \(\PageIndex{3}\)

    A function \(f(t)\) is given as a table below, showing distance in miles that a car has traveled in \(t\) minutes. Find and interpret \(f^{-1} (70)\)

    \(t\) (minutes) 30 50 70 90
    \(f(t)\) (miles) 20 40 60 70
    Answer

    \(f^{-1} (70)=90\). To drive 70 miles, it took 90 minutes.

    Focus: Finding a Formula for the Inverse Function

    Since the function \(f\) and its inverse \(f^{-1} \) switch their inputs and outputs, if \(y=f(x)\) where inputting \(x\) into \(f\) gives the output \(y\), then \(x = f^{-1} (y)\) where inputting \(y\) into \(f^{-1}\) gives the output \(x\). Essentially, the inverse function \(f^{-1}\) is a formula for \(x\) where \(x\) is the original input of function \(f\) and \(y\) is the original output of function \(f\).

    a diagram showing the function f and its inverse switching their inputs and outputs.

    Key Point: \(\PageIndex{2}\)

    The formula for the inverse \(f^{-1} \) of a function \(y=f(x)\) is a formula for \(x\) with \(x = f^{-1} (y)\) where \(x\) is the original input of function \(f\) and \(y\) is the original output of function \(f\).

    So to find a formula for the inverse function \(f^{-1} \), we need only solve for \(x\) using the formula for \(y=f(x)\).

    Example \(\PageIndex{4}\)

    Let \(y=f(x)=2x+1\). Find a formula for the inverse \(f^{-1} \).

    Solution

    The inverse function is a formula for \(x\). Solving for \(x\) in the formula for \(f\) \[y=2x+1 \nonumber\] Subtracting one from both sides \[y-1=2x \nonumber\] Then dividing by two on both sides \[x=\dfrac{y-1}{2} \nonumber\] Therefore, the formula for the inverse is \(x=f^{-1} (y)=\dfrac{y-1}{2}\)

    Example \(\PageIndex{5}\)

    Let \(y=g(x)=\dfrac{x-3}{x+1}\). Find a formula for the inverse \(g^{-1} \).

    Solution

    Again, the inverse function is a formula for \(x\). Solving for \(x\) in the formula for \(g\) \[y=\dfrac{x-3}{x+1} \nonumber\] Clearing the fraction by multiplying both sides by \(x+1\) and distributing \[y(x+1)=x-3 \nonumber\] \[xy+y=x-3 \nonumber\] Then getting the \(x\) terms on one side \[xy - x =-3 - y \nonumber\] Factoring out a common factor and dividing to solve for \(x\) \[x(y - 1) =-3 - y \nonumber\] \[x=\dfrac{-3 - y}{y-1} \nonumber\]Therefore, the formula for the inverse is \(x=g^{-1} (y)=\dfrac{-3 - y}{y-1} \)

    Now You Try: Exercise \(\PageIndex{4}\)

    Let \(y=f(x)=5\sqrt[3]{x-1}+2\). Find a formula for the inverse \(f^{-1} \).

    Answer

    \(x=g^{-1} (y)=(\dfrac{y-2}{5})^2+1 \)

    Focus: Determining whether functions are inverses

    Notice what happens when we compose a function and its inverse. For example, if function \(f\) adds 2 to its input and its inverse \(f^{-1}\) subtracts 2 from its input. If we compose them, applying function \(f\) which adds two to an input \(x\) and then apply the inverse \(f^{-1}\) which subtracts two, we have effectively done nothing to the input \(x\) yielding the original input \(x\). So \(f^{-1}(f(x))=x\). Similarly, \(f(f^{-1}(y))=y\).

    a diagram of the composition of function f and its inverse.

    diagram of the composition of function f and its inverse.

    Key Point: Mathematical Definition of Inverse Functions \(\PageIndex{3}\)

    Two functions \(f\) and \(g\) are inverses if and only if their composition gives the original input. That is, \(g(f(x))=x\) and \(f(g(x))=x\)

    This key point gives us a way to test if two functions are inverses. If their compositions yields the original input, they are inverses. If not, they are not inverses.

    Example \(\PageIndex{6}\)

    Let \(f(x)=2x+1\), \(g(x) = \dfrac{x-1}{2} \), and \(h(x)= \dfrac{x}{2} -1\). Determine which of the functions are inverses of one another.

    Solution

    To test if \(f\) and \(g\) are inverses, evaluate their composition. \[f(g(x))=f(\dfrac{x-1}{2})=2(\dfrac{x-1}{2})+1 \nonumber\] Simplifying by reducing a common factor of 2 and then adding, we have \[f(g(x))=x-1+1 = x \nonumber\] Similarly, \[g(f(x))=g(2x+1) = \dfrac{(2x+1)-1}{2} \nonumber\] Simplifying in the numerator, then reducing a common factor of 2 we have \[g(f(x))= \dfrac{2x}{2} = x \nonumber\] Therefore, \(f\) and \(g\) are inverses.

    To test if \(f\) and \(h\) are inverses, evaluate their composition. \[f(h(x))=f(\dfrac{x}{2}-1)=2(\dfrac{x}{2}-1)+1 \nonumber\] Distributing 2 and then combining like terms, we have \[f(h(x))= \dfrac{2x}{2}-2+1= x - 1 \neq x\nonumber\] Similarly, \[h(f(x))=h(2x+1) = \dfrac{2x+1}{2}-1 \nonumber\] Dividing by 2, then simplifying we have \[h(f(x))= \dfrac{2x}{2} + \dfrac{1}{2} - 1 = x - \dfrac{1}{2} \neq x \nonumber\] Therefore, \(f\) and \(h\) are not inverses.

    Also, \(g\) and \(h\) are not inverses, since \(f\) and \(g\) are inverses but \(f\) and \(h\) are not.

    Notice the operations of \(f\) and their order in example 6 above:

    1. Multiply by 2
    2. Add 1

    The individual operations of \(f\) are undone by the individual operations of \(g\) and \(h\). Multiplying by two is undone by dividing by two. Adding 1 is undone by subtracting 1. However, notice that \(g\) and \(h\) perform their operations in reverse order. The operations of \(g\) in order are

    1. Subtract 1
    2. Divide by 2

    Whereas the operations of \(g\) in order are

    1. Divide by 2
    2. Subtract 1

    Just because the individual operations of a function may undo the individual operations of another function, the order of multiple operations is important. Notice that the operations of \(g = f^{-1}\) undo the operations of \(f\) in reverse order.

    Consider, the process of putting your shoes:

    1. Put on your socks
    2. Put on your shoes
    3. Tie your laces

    Notice the order of the steps undoing putting on your shoes (taking them off) are undoing the operations of putting on your shoes in reverse order.

    1. Untie your laces
    2. Take off your shoes
    3. Take of your socks

    In general, if a function \(f\) has a single variable term, the inverse of a function \(f\) will undo the operations of \(f\) in reverse order. However, it is simpler to just test the composition of two functions to see if this gives you the original input \(x\) rather than looking at the individual operations. Moreover, this simplistic approach of looking at the operations doesn't apply to functions with multiple variable terms like that in example 1.7.7. However, testing the composition will work.

    Example \(\PageIndex{7}\)

    Let \(f(x)=\dfrac{x-3}{x+1}\) and \(g(x) = \dfrac{x+3}{1-x} \). Determine if \(f\) and \(g\) are inverses.

    Solution

    To test if \(f\) and \(g\) are inverses, evaluate their composition. \[f(g(x))=f(\dfrac{x+3}{1-x})=\dfrac{\dfrac{x+3}{1-x} - 3}{\dfrac{x+3}{1-x}+1} \nonumber\] Getting a common denominator in the fractions in the numerator and denominator, we have \[f(g(x))=\dfrac{\dfrac{x+3}{1-x} - 3(\dfrac{1-x}{1-x})}{\dfrac{x+3}{1-x}+\dfrac{1-x}{1-x}} \nonumber\] Distributing and adding the fractions in the numerator and denominator, we have \[f(g(x))=\dfrac{\dfrac{x+3 -3+3x}{1-x}}{\dfrac{x+3+1-x}{1-x}} = \dfrac{\dfrac{4x}{1-x}}{\dfrac{4}{1-x}}\nonumber\] To divide we multiply by the reciprocal and then simplifying, we have \[f(g(x))= (\dfrac{4x}{1-x})(\dfrac{1-x}{4}) = \dfrac{4x}{4} = x \nonumber\]

    Similarly, \(g(f(x))=x\). Therefore, \(f\) and \(g\) are inverses.

    Now You Try: Exercise \(\PageIndex{5}\)

    Let \(f(x)= 4x^3 - 5\) and \(g(x) = \sqrt[3]{\dfrac{x+5}{4}} \). Determine if \(f\) and \(g\) are inverses.

    Answer

    Yes, they are inverses since \(g(f(x))=x\) and \(f(g(x))=x\).

    This property of inverse functions is important in fields like cryptography which allows for the secure transmission of important information like passwords. An encryption function \(f\) transforms a password into an unreadable or meaningless format (called cipher text). The decryption function is the inverse functions \(f^{-1}\) which transforms the cipher text back into the original password. When a person enters their password into a secure website, the website applies the encryption function \(f\) to the password before it is sent out via the internet and/or WiFi, ensuring that any third party that intercept the transmission will only see the meaningless cipher text. Once the converted password cipher text is received at the server, the server applies the decryption function \(f^{-1}\) to convert the cipher text back into the original password. This ensures that only authorized parties with the correct decryption key can access the original password. For example, if we had a basic encrytion function \(f\) where \(a \rightarrow 1 \) , \(b \rightarrow 2 \), \(c \rightarrow 3 \), \(d \rightarrow 4 \), and so on, then the decryption function \(f^{-1}\) would be \(1 \rightarrow a \) , \(2 \rightarrow b \), \(3 \rightarrow c \), \(4 \rightarrow d \), and so on. If we chose a bad password such as "bad", the encryption function \(f\) would transform bad \( \rightarrow \) 123 and the decryption function \(f^{-1}\) would transform 123 \( \rightarrow \) bad. In the field of cryptography, it is essential that an encryption function is designed so the the inverse is not easily identified by a third party.

    Focus: Problems with Using Inverse Functions

    Consider, the two functions \(f\) and \(g\) listed in the tables below.

    The inputs and outputs of f
    \(x\) 1 2 3 4
    \(y=f(x)\) 3 4 5 1
    The inputs and outputs of g
    \(x\) 1 2 3 4
    \(y=g(x)\) 2 4 4 5

    Notice each is a function since each input is related to exactly one output. However, when we look at their inverse functions described in the tables below where the inverse functions relate each value of \(y\) back to the corresponding value of \(x\), we see that \(f^{-1}\) is a function but that \(g^{-1}\) in not.

    The inputs and outputs of the inverse of f
    \(y\) 3 4 5 1
    \(x=f^{-1}(y)\) 1 2 3 4

    Each input of \(f^{-1}\) is related to exactly one output. So \(f^{-1}\) is a function.

    The inputs and outputs of the inverse of g
    \(y\) 2 4 4 5
    \(x=g^{-1}(y)\) 1 2 3 4

    Notice the input \(y=4\) of \(g^{-1}\) is related to two outputs \(x=2\) and \(x=3\). So \(g^{-1}\) is not a function for these values of \(x\) and \(y\).

    Problem #1

    The inverse \(x=f^{-1}(y)\) of a function \(y=f(x)\) may not be a function for all values \(x\) and \(y\).

    Notice with function \(f\) each input \(x\) was related to a unique output \(y\). So then for the inverse \(f^{-1}\) to that unique \(y\) back to \(x\) ensuring that the inverse \(f^{-1}\) was a function. The property of function \(f\) is what we call a one-to-one function.

    Definition: A One-to-One Function

    A function \(y=f(x)\) is a one-to-one function if each input \(x\) was related to a unique output \(y\).

    Key Point \(\PageIndex{4}\)

    If a function \(y=f(x)\) is one-to-one on its domain, then its inverse \(x=f^{-1}(y)\) is also a function for those values of \(x\) in the domain of \(f\).

    Notice function \(g\) is not one-to-one since the inputs \(x=2\) and \(x=3\) are associated to the same output \(y=4\) and that the inverse \(g^{-1}\) is not a function. However, if we restricted the domain of \(g\) to {\(x\) | 1,2,4}, then the inverse \(g^{-1}\) would be a function since the input \(y=4\) of \(g^{-1}\) would only be related to a single output \(x=2\). In many cases, it is desirable to have an inverse for a function even though the original function is not one-to-one. In those cases, we can often limit the domain of the original function to an interval or other restricted domain on which the function is one-to-one as we did with function \(g\), then find an inverse only on that restricted domain.

    In general, determining if a function is one-to-one by looking at each input and determining if its corresponding output is not easily feasible at this level especially with a large or infinite domains. However, we have a much simpler approach using the graph of a function to determine if the function is one-to-one and if the inverse is a function. Let's look at the graphs of functions \(f\) and \(g\) from the example above.

    the graph of the data from function f with arrows showing the relationship between each input and output with f and its inverse. the graph of function g with arrow showing the relationship between each input and output with g and its inverse.

    The pair of inputs \(x=2\) and \(x=3\) of \(g\) were related to the same output \(y=4\). Therefore, the inverse \(g^{-1}\) must relate \(y=4\) back to both \(x=2\) and \(x=3\) as shown in the graph above causing \(g^{-1}\) not to be a function and \(g\) not to be one-to-one. We can identify this occurring on the graph of \(g\), if we follow the horizontal arrow from \(y=4\) to the two points on the graph, then down to the two inputs. In general, if a horizontal line can be drawn that intersects the graph of a function in two or more points, then the same situation occurs: the inverse must relate a single value of \(y\) back to two or more values of \(x\) causing the inverse not to be a function. However, for function \(f\) every horizontal line intersects the graph at only one point, reflecting the fact that the inverse \(f^{-1}\) relates each value of \(y\) back to a single value of \(x\), making \(f\) a function. This is the idea behind the horizontal line test. It gives us a quick easy was of determining if the inverse of a function is itself a function.

    Key Point: The Horizontal Line Test \(\PageIndex{5}\)

    If a horizontal line can be drawn that intersects the graph of a function \(f\) in two or more points, then the inverse \(f^{-1}\) is not a function on the specified domain of \(f\).

    Example \(\PageIndex{8}\)

    Let \(f(x)=2x+1\). Use the graph below to determine if the inverse \(f^{-1}\) is a function for all real values of x? If not, how can you restrict the domain of \(f\) so that the inverse \(f^{-1}\) is a function on the restricted domain?

    the graph of a linear function with slope 2 and y-intercept 1

    Solution

    The inverse \(f^{-1}\) is a function since the graph of \(f\) passes the horizontal line test. There is no horizontal line that intersects the graph of the linear function \(f\).

    clipboard_eff8bfaf63d62bdff4fa500faea15e71a.png

    Example \(\PageIndex{9}\)

    Let \(g(x)=x^2\). Use the graph of the parabola below to determine if the inverse \(g^{-1}\) is a function for all real values of x? If not, how can you restrict the domain of \(g\) so that the inverse \(g^{-1}\) is a function on the restricted domain?

    the graph of a parabola.

    Solution

    No, the inverse \(g^{-1}\) is not a function for all real values of \(x\) since it fails the horizontal line test. We can limit the domain of \(g\) to \([0,\infty )\) so that that portion of the graph passes the horizontal line test and \(g^{-1}\) is a function on the restricted domain of \(g\).

    the graph of a parabola and horizontal lines that intersect it twice. the graph of the right half of the parabola and horizontal lines.

    You may have already guessed that since we undo a square with a square root, the inverse of \(g(x)=x^{2}\) on this restricted domain is \(g^{-1} (x)=\sqrt{x}\).

    Example \(\PageIndex{10}\)

    Use the graph of the sine function \(y=sin(x)\) from trigonometry below to determine if its inverse \(sin^{-1}\) is a function for all real values of x? If not, how can you restrict the domain of \(y=sin(x)\) so that the inverse \(sin^{-1}\) is a function on the restricted domain?

    the graph of the sine wave.

    Solution

    No, \(sin^{-1}\) is not a function for all real values of \(x\) since it fails the horizontal line test. We can limit the domain of \(h(x)=sin(x)\) to \([-\dfrac{\pi}{2},\dfrac{\pi}{2}]\) so that that portion of the graph passes the horizontal line test and \(sin^{-1}\) is a function on the restricted domain of \(sin\).

    the graph of sine on a restricted domain

    Now You Try: Exercise \(\PageIndex{6}\)

    Use the graph the cosine function \(y=cos(x)\) from trigonometry below to determine if its inverse \(cos^{-1}\) is a function for all real values of x? If not, how can you restrict the domain of \(y=cos(x)\) so that the inverse \(cos^{-1}\) is a function on the restricted domain?

    The graph of the cosine wave with amplitude one and period 2 pie.

    Answer

    No, \(cos^{-1}\) is not a function for all real values of \(x\) since the graph of \(h(x)=cos(x)\) fails the horizontal line test. We can limit the domain of \(h(x)=cos(x)\) to \([0,\pi] \) so that that portion of the graph passes the horizontal line test and \(cos^{-1}\) is a function on the restricted domain of \(cos\).

    The graph of the cosine wave with amplitude one and period 2 pie on a restricted domain.

    Another problem with inverse functions occurs when using them in the context of applications. In previous examples, we have referred to the inverse of a function \(y=f(x)=2x+1\) as both \(y=g(x)= \dfrac{x-1}{2} \) and \(x=f^{-1}(y)= \dfrac{y-1}{2} \). In a pure mathematical example where the input quantity and outputs quantity are just numbers without associated units, the expressions \(g(3)=1\) where \(x=3\) and \(f^{-1}(3)=1\) where \(y=3\) are equivalent. However, in the context of an application the units and quantities that the input and output represent have meaning and are distinct from each other. In example 1.7.3 where \(P=f(t)\) represents the population of a town in \(t\) years, the statements \(f(20)=10,000\) and \(f^{-1}(20)=10,000\) have very distinct meanings. The statement \(f(20)=10,000\) tells us that the population is \(P=10,000\) in \(t=20\) years whereas the statement \(f^{-1}(20)=10,000\) tells us that the population is \(P=20)\) in \(t=10,000\) years. The formula for the inverse \(t = f^{-1}(P)\) has an input of P representing the population and the output represents the years from now \(t\). It would render the statement meaningless and loose all connotation to the application if we used other variables, such as \(y = f^{-1}(x)\).

    Problem #2

    When using a function and its inverse function in an application, the variables have a specific meaning and cannot be substituted with other variables.

    Example \(\PageIndex{11}\)

    The formula for converting the Fahrenheit temperature to Celsius temperature is \(C=f(F) = \dfrac{5}{9} (F-32) \)

    1. Find and interpret the meaning of \(f(92)\)
    2. Find and interpret the meaning of \(f^{-1}(92)\)
    3. Find a formula for the inverse function \(f^{-1}\)
    Solution
    1. For function \(f\), the input represents the temperature in Fahrenheit degrees and the output represents the Celsius temperature. So we are given \(F= 92\) and want \(C = f(92)\). Evaluating \[C=\dfrac{5}{9} (92-32) = \dfrac{5}{9} (60) = \dfrac{100}{3} \approx 33.3 \text{ degrees} \nonumber \]
    2. For the inverse function \(f^{-1} \) the inputs and outputs are switched to the input represents the temperature in Celcius degrees and the output represents the Fahrenheit temperature. So we are given \(C= 92\) and want \(F = f^{-1}(92)\). Substituting the value for \(c\) and solving \[92=\dfrac{5}{9} (F-32) \nonumber \] \[92 \cdot \dfrac{9}{5}=F-32 \nonumber \] \[92 \cdot \dfrac{9}{5}+32 =F \nonumber \] \[F = 197.6\nonumber \]
    3. The inverse function \(F = f^{-1}(C)\) is a formula for \(F\). Using the formula for \(f\) and solving for F, we have \[\begin{array}{l} {C=\dfrac{5}{9} (F-32)} \\ {C\cdot \dfrac{9}{5} =F-32} \\ {F=\dfrac{9}{5} C+32} \end{array}\nonumber \] The inverse function is \[F=h^{-1} (C)=\dfrac{9}{5} C+32\nonumber \]

    Focus: The Graphs of a Function and its Inverse

    In key point 1.7.1, we highlighted that a function and its inverse have their inputs and outputs switched. Let's explore how this relation impacts the graphs of a function and its inverse. For example, if a function \(f\) has \(f(2)=3\), then for its inverse \(f^{-1}(3)=2\). If we graph both points on the same axis below, notice that they are reflections of one another about the line \(y=x\). Similarly, if \(f(0)=3\), then for its inverse \(f^{-1}(3)=0\). On the graph, the points are once again reflections of one another about the line \(y=x\).

    The graph of points that are the reflections of one another about the line y=x.

    If we did this for each point on the graph of a function, the graphs of a function and its inverse are reflections of one another about the line \(y=x\).

    Notice if we graph the portion of the parabola\(y=h(x)=x^2\) on the restricted domain \([0, \infty] \) and its inverse, the square root function, \(h^{-1} (x) \sqrt{x}\) on the same axes, we can notice symmetry: the graph of \(h^{-1} (x)\) is the graph of h(x) reflected over the line \(y = x\).

    Three graphs: 1: Half of a parabola, labeled h(x), starting at the origin and opening upward to the right, 2: a straight line through 0 comma 0 and 3 comma 3 labeled y=x, and 3: a square root graph; and a graph labeled h-inverse

    Key Point \(\PageIndex{6}\)

    The graphs of a function and its inverse are reflections of one another about the line \(y=x\).

    Example \(\PageIndex{12}\)

    Given the graph of \(f(x)\) shown, sketch a graph of \(f^{-1} (x)\).

    An increasing concave down graph increasing from out of view to the right of x=0 and passing through 1 comma 0 and 2 comma 1

    Solution

    Since the graph of function \(f\) passes the horizontal line test, the inverse is a function. Reflecting this graph of the line \(y = x\), the point (1, 0) reflects to (0, 1), and the point (4, 2) reflects to (2, 4). Sketching the inverse on the same axes as the original graph:

    Three graphs: first labeled f(x), an increasing concave down graph increasing from out of view to the right of x=0 and passing through 1 comma 0 and 2 comma 1. Second is a unlabeled straight line through 0 comma 0 and 4 comma 4, and third an increasing concave up graph starting leveled off just above y=0 passing through 0 comma 1 and 1 comma 2

    Important Topics of this Section

    • Definition of an inverse function
    • Finding the formula for an inverse function
    • Composition of inverse functions yield the original input value
    • The inverse of every function may not be a function
    • Restricting the domain of functions so the inverse is a function

    This page titled 1.7: Inverse Functions is shared under a CC BY-SA license and was authored, remixed, and/or curated by Jason Gardner (The OpenTextBookStore) .