topic badge

1.09 Inverse relations and functions

Lesson

Finding the inverse of a function

We have seen the word "inverse" before when we were solving equations. Recall that all of our basic operations have an inverse.

Remember!

Addition and subtraction are inverse operations of one another

Multiplication and division are inverse operations of one another

Squaring and square rooting are inverse operations of one another

We now want to find the inverse of not just one operation, but an entire function.

Notation

For a function $f(x)$f(x) we say that the inverse function is $f^{-1}\left(x\right)$f1(x). Remember that inverse means to "undo", so from the output of $f(x)$f(x) we can figure out what the original input to $f(x)$f(x) was.

  $f$f   $f^{-1}$f1  
$a$a $\to$ $b$b $\to$ $a$a

 

Finding the inverse graphically

Notice that from the notation above, if $\left(a,b\right)$(a,b) is a point on the function $f(x)$f(x), then $\left(b,a\right)$(b,a) is a point on $f^{-1}\left(x\right)$f1(x).

The inverse can be found graphically by "swapping" the $x$x and $y$y coordinates for every single point on the function.

Did you know?

Swapping the $x$x-coordinate and the $y$y-coordinate for an ordered pair is the same as reflecting that point in the line $y=x$y=x.

When we think about the graphs of inverse functions, geometrically we are talking about reflecting the function $f(x)$f(x) over the line $y=x$y=x to draw the inverse function $f^{-1}\left(x\right)$f1(x).

By doing this the $x$x values, or the inputs, become the $y$y values, or the outputs, and vice versa.

Let's start by reflecting a few points, belonging to a curve, over the line $y=x$y=x to see this in action.

We can see that $(0,2)$(0,2) is reflected across to $(2,0)$(2,0)

Similarly $(1,3)$(1,3) is transformed to $(3,1)$(3,1) and $(2,6)$(2,6) to $(6,2)$(6,2).

So when we want to use the graph of $f(x)$f(x) to draw its inverse $f^{-1}\left(x\right)$f1(x), then we want to take points on the curve of $f(x)$f(x) and reflect them over the line $y=x$y=x.

 

Worked example

Question 1

The function $f\left(x\right)$f(x) is graphed below along with the line $y=x$y=x. Sketch the graph of $f^{-1}\left(x\right)$f1(x).

Think: We'll first identify some points on $f(x)$f(x) and then reflect them over $y=x$y=x. Then we will join with a smooth curve.

Do: 

 

Finding the inverse algebraically

To explain the idea of the inverse algebraically, think about the function $f(x)=2x+3$f(x)=2x+3. An inverse is formed by swapping the $x$x and $y$y variables and then solving for $y$y.

Worked example

Question 2

Find the inverse of $f(x)=2x+3$f(x)=2x+3 algebraically and graph both on the same set of axes.

Think: We first need to replace the $f(x)$f(x) with $y$y. To find the inverse we swap $x$x and $y$y, then solve for $y$y to get $f^{-1}\left(x\right)$f1(x).

Do:

$f(x)$f(x) $=$= $2x+3$2x+3 Start with the original function
$y$y $=$= $2x+3$2x+3 Write with $y$y instead of $f(x)$f(x)
       
$x$x $=$= $2y+3$2y+3     Swap $x$x and $y$y to find the inverse
$x-3$x3 $=$= $2y$2y Subtract $3$3 from both sides 
$\frac{x-3}{2}$x32 $=$= $y$y Divide both sides by $2$2
$f^{-1}\left(x\right)$f1(x) $=$= $\frac{x-3}{2}$x32 State the inverse function

Geometrically, swapping the $x$x and $y$y variables around ensures that the function and the inverse function are mirror images across the line $y=x$y=x as shown in the first graph.

 

Practice questions

Question 3

Below we have sketched the line $y=\frac{1}{2}x$y=12x (labeled $B$B) over the line $y=x$y=x (labeled $A$A).

Loading Graph...

  1. By reflecting $y=\frac{1}{2}x$y=12x about the line $y=x$y=x, graph the inverse of $y=\frac{1}{2}x$y=12x.

    Loading Graph...

Question 4

Consider the graph of the function $f\left(x\right)$f(x).

Loading Graph...

  1. Write down the ordered pairs for the points labeled $A$A, $B$B and $C$C:

    $A$A $B$B $C$C
    $\left(\editable{},\editable{}\right)$(,) $\left(\editable{},\editable{}\right)$(,) $\left(\editable{},\editable{}\right)$(,)
  2. Now write down the corresponding ordered pairs for $f^{-1}$f1, the inverse of $f$f:

    Inverse of $A$A Inverse of $B$B Inverse of $C$C
    $\left(\editable{},\editable{}\right)$(,) $\left(\editable{},\editable{}\right)$(,) $\left(\editable{},\editable{}\right)$(,)
  3. Plot the three inverse point on the set of axes below.

    Loading Graph...

  4. Now graph $f^{-1}(y)=x$f1(y)=x , the inverse function of $f\left(x\right)$f(x).

    Loading Graph...

 

Existence of an inverse function

For now we will focus on the inverse of linear function, which will always exist, but not all functions are invertible.

Careful!

A function is invertible if its inverse is also a function. For an inverse of a function to be a function, the domain of the function may need to be restricted.

Let's look at our basic parabola $f(x)=x^2$f(x)=x2 to see why it isn't invertible over its entire domain, but needs to have the domain restricted. If we reflect $f(x)=x^2$f(x)=x2 shown in blue in the line $y=x$y=x we will get the relation shown in green. Notice the relation is not a function.

Reflection of the parabola is not a function, so is it is not invertible over its whole domain

Some functions are already invertible over their natural domain, so their inverse exists without requiring any domain restrictions. These invertible functions include linear functions like $f(x)=ax+b$f(x)=ax+b, and rational functions like $f(x)=\frac{k}{x}$f(x)=kx.

To be able to get an inverse function from a function such as a parabola we need to restrict the domain of the original function so that it becomes invertible.

Testing invertibility

For a function described as a set of ordered pairs, we can test for invertibility by checking that every x and y value only occur once.

$\left\{\left(1,2\right),\left(2,3\right),\left(4,3\right)\right\}${(1,2),(2,3),(4,3)}

Not invertible

 

$\left\{\left(1,2\right),\left(2,5\right),\left(3,6\right)\right\}${(1,2),(2,5),(3,6)}

Invertible function

 

 

We can see with the function on the left-hand side that both the second and third pairs have a $y$y-value of $3$3, so this is a many-to-one function and is not invertible. The function on the right hand side has unique $y$y-values for each $x$x-value and so it is invertible.

Horizontal line test - graphically

We can use the horizontal line test to determine whether a function is invertible over its domain.

The key property of non-invertible functions is that there are two or more values of $x$x from the domain that correspond to the same value of $f(x)$f(x) in the range.

Let's say that $f(a)=c$f(a)=c and $f(b)=c$f(b)=c, so that the numbers $a$a and $b$b from the domain correspond to the same number $c$c in the range. Graphically, we can think of the points $\left(a,c\right)$(a,c) and $\left(b,c\right)$(b,c) as being the points of intersection of the graph $y=f(x)$y=f(x) and the horizontal line $y=c$y=c.

$f\left(x\right)$f(x) does not pass the horizontal line test.

If we can draw a horizontal line that intersects the graph of a function in at least two places, then the function is not invertible. If, however, there is no horizontal line that we can draw that passes through the graph of the function more than once, then the function "passes the horizontal line test", and we know it is invertible.

Worked example

Question 5

Determine whether the function $f(x)=2x-3$f(x)=2x3 has an inverse.

Think: This is a linear function, and its graph is a straight line that increases at a constant rate. The natural domain of $f\left(x\right)$f(x) is $\left(-\infty,\infty\right)$(,).

Do: Using the horizontal line test, we can see that any horizontal line we draw will intersect the graph of $f(x)$f(x) at only one point.

$f\left(x\right)$f(x) does pass the horizontal line test.

The function passes the horizontal line test, so it is a one-to-one function. This means that it does have an inverse.

Reflect: Find the inverse of a function amounts to reflecting the graph of the function across the line $y=x$y=x. Algebraically, this is equivalent to swapping the $x$x and $y$y variables in the equation. Let's use this idea to find $f^{-1}$f1, the inverse of $f(x)$f(x).

$f(x)$f(x) $=$= $2x-3$2x3  
$y$y $=$= $2x-3$2x3 (Substitute $f(x)=y$f(x)=y for notational convenience)
$x$x $=$= $2y-3$2y3 (Swap $x$x and $y$y in the equation)
$x+3$x+3 $=$= $2y$2y  
$\frac{x+3}{2}$x+32 $=$= $y$y (Rearrange to solve for $y$y)
$\frac{x+3}{2}$x+32 $=$= $f^{-1}\left(x\right)$f1(x) (Identify $y$y with $f^{-1}\left(x\right)$f1(x))

The function $f(x)=2x-3$f(x)=2x3 has an inverse function $f^{-1}\left(x\right)=\frac{x+3}{2}$f1(x)=x+32. We have determined the inverse without needing to restrict the natural domain of $f\left(x\right)$f(x).

Making a function invertible

If a function is not invertible over a particular domain, we can restrict the domain in such a way that the graph of the function passes the horizontal line test, and the function becomes invertible.

Notice that in general the actual algebraic expression for the function will not change in this process. We are only reducing the domain, the set of possible input values that we can feed into the function.

Worked example

Question 6

Choose a domain restriction on the function $f\left(x\right)=\left(x-4\right)^2+1$f(x)=(x4)2+1 that makes $f\left(x\right)$f(x) invertible.

Think: This function is a quadratic, so there are two values of $x$x in the natural domain $\left(-\infty,\infty\right)$(,) that correspond to each value in the range $\left[1,\infty\right)$[1,), except for the point representing the vertex (or turning point) at $\left(4,1\right)$(4,1).

Do: Looking at the graph of $f\left(x\right)$f(x), if we select any interval that includes the vertex of the parabola then we will still have a non-invertible function. We need to choose a domain that represents at most one half of the parabola.

$f\left(x\right)$f(x) is not invertible over its natural domain.

If we restrict the domain of $f\left(x\right)$f(x) to any of the following intervals, then the resulting function will be invertible.

$\left[4,\infty\right)$[4,), $\left(4,\infty\right)$(4,), $\left(-\infty,4\right)$(,4), $\left(-23,1\right)$(23,1)

These are just a few valid intervals. There are infinitely many we could choose.

$f\left(x\right)$f(x) is invertible over the restricted domain $\left[4,\infty\right)$[4,).
The inverse function
$f^{-1}\left(x\right)$f1(x) is a reflection across the line $y=x$y=x.

In contrast, if we restrict the domain of $f\left(x\right)$f(x) to any of the following intervals, then the resulting function will not be one-to-one, since each interval still contains the vertex.

$\left[3,\infty\right)$[3,), $\left(0,8\right)$(0,8), $\left(-23,4.01\right)$(23,4.01)

Reflect: We could select any of the valid restricted domains to make $f\left(x\right)$f(x) invertible, but for this function there happens to be two domains in particular that retain the most of the original domain. These are $\left(-\infty,4\right]$(,4] and $\left[4,\infty\right)$[4,), and they correspond to the left and right half of the parabola respectively. We can think of these domains as the "least restricted" or the "largest" domains for which $f\left(x\right)$f(x) is invertible.

Practice questions

Question 7

Consider the graph of each function below and determine if it has an inverse function.

  1. Loading Graph...
    A graph of cubic function with only one x-intercept on a coordinate plane.

    Has an inverse function.

    A

    Does not have an inverse function.

    B
  2. Loading Graph...
    A graph of cubic function with three x-intercept on a coordinate plane.

    Has an inverse function.

    A

     Does not have an inverse function.

    B

Question 8

Consider the graph below.

Loading Graph...

  1. Does this graph represent a function or just a relation?

    Function

    A

    Relation

    B
  2. If we try to invert this function, do we get a function or just a relation?

    Function

    A

    Relation

    B

 

Composition of inverse functions

Something very special happens when we find the composition of inverse functions. 

Did you know?

Two functions, $f(x)$f(x) and $g(x)$g(x), are inverses of each other if $g\left(f\left(x\right)\right)=f\left(g\left(x\right)\right)=x$g(f(x))=f(g(x))=x.

Worked example

Question 4

Determine if $f(x)=2x$f(x)=2x and $g(x)=\frac{1}{2}x$g(x)=12x are inverse functions.

Think: We need to show that $g\left(f\left(x\right)\right)=x$g(f(x))=x and that $f\left(g\left(x\right)\right)=x$f(g(x))=x. If this is the case then they are inverses.

Do: 

$g\left(f\left(x\right)\right)$g(f(x))  $=$= $\frac{1}{2}f(x)$12f(x)
  $=$= $\frac{1}{2}\times2x$12×2x
  $=$= $x$x
$f\left(g\left(x\right)\right)$f(g(x))  $=$= $2g(x)$2g(x)
  $=$= $2\times\frac{1}{2}x$2×12x
  $=$= $x$x

Reflect: $f(x)$f(x) and $g(x)$g(x) are inverses.

 

Domain and range of inverse functions

Remember the inverse of a function, written as $f^{-1}$f1, swaps the order of the inputs and outputs of the original function $f$f.

A function $f$f and its inverse $f^{-1}$f1.

Because of this, we can view the outputs of the original function $f$f as the inputs for the function $f^{-1}$f1. In the same way, we can view the inputs of the original function $f$f as the outputs for the function $f^{-1}$f1.

For this reason, the function $f^{-1}$f1 reverses the domain and range of the function $f$f.

Domain and range of a function and its inverse

The domain of the inverse function $f^{-1}$f1 is equal to the range of the function $f$f.

The range of the inverse function $f^{-1}$f1 is equal to the domain of the function $f$f.

 

Worked example

Question 9

Find the inverse function of $f\left(x\right)=-\frac{4x-5}{9}$f(x)=4x59 defined over $\left[-1,8\right)$[1,8) and state its domain and range.

Think: To find the inverse function we would like to express the argument of $x$x in terms of $f\left(x\right)$f(x). Then we can determine the domain and range of $f^{-1}$f1 by considering the domain and range of $f$f.

Do:

$f\left(x\right)$f(x) $=$= $-\frac{4x-5}{9}$4x59 (Writing down the equation for $f\left(x\right)$f(x))
$y$y $=$= $-\frac{4x-5}{9}$4x59 (Substitute $f(x)=y$f(x)=y for notational convenience)
       
$x$x $=$= $-\frac{4y-5}{9}$4y59 (Swap $x$x and $y$y to begin finding the inverse)
$-9x$9x $=$= $4y-5$4y5 (Multiply by $-9$9 on both sides)
$-9x+5$9x+5 $=$= $4y$4y (Add $5$5 to both sides)
$\frac{-9x+5}{4}$9x+54 $=$= $y$y (Divide by $4$4 on both sides)
$f^{-1}(x)$f1(x) $=$= $-\frac{9x-5}{4}$9x54 (Rewriting the equation using $f^{-1}(x)$f1(x) and factoring the negative out front)

The equation of the inverse function is $f^{-1}(x)=-\frac{9x-5}{4}$f1(x)=9x54.

The range of $f^{-1}$f1 is equal to $\left[-1,8\right)$[1,8) since this is the domain of $f$f.

The domain of $f^{-1}$f1 is equal to the range of $f$f. To find the range of $f$f we observe that at the closed endpoint of $x=-1$x=1 the value of $f\left(x\right)$f(x) is $1$1. At the other open endpoint of $x=8$x=8, $f\left(x\right)$f(x) is $-3$3, so the domain of $f^{-1}$f1 is $\left(-3,1\right]$(3,1].

We can see the original $f(x)$f(x) in blue and the inverse$f^{-1}$f1 in green.

 

Practice questions

question 10

The graph of $f$f is represented by the line segment joining $\left(-4,5\right)$(4,5) and $\left(9,-4\right)$(9,4) while $f^{-1}$f1 is represented by the line segment joining $\left(5,-4\right)$(5,4) and $\left(-4,9\right)$(4,9).

Loading Graph...

  1. State the domain of $f$f in interval notation.

    Domain: $\editable{}$

  2. State the range of $f$f in interval notation.

    Range: $\editable{}$

  3. State the domain of $f^{-1}$f1 in interval notation.

    Domain: $\editable{}$

  4. State the range of $f^{-1}$f1 in interval notation.

    Range: $\editable{}$

  5. Select the correct statement.

    The range of $f$f is the same as the range of $f^{-1}$f1.

    A

    The range of $f$f is the same as the domain of $f^{-1}$f1.

    B

question 11

Consider the function given by $f\left(x\right)=x+6$f(x)=x+6 defined over the interval $\left[0,\infty\right)$[0,).

  1. Plot the function $f\left(x\right)=x+6$f(x)=x+6 over its domain.

    Loading Graph...

  2. Find the inverse $f^{-1}$f1.

  3. State the domain and range of $f^{-1}$f1 in interval notation.

    Domain: $\editable{}$

    Range: $\editable{}$

  4. Plot the function $f^{-1}$f1 over its domain.

    Loading Graph...

What is Mathspace

About Mathspace