- Graph the inverse function of a logarithmic function
- Find the equation of the inverse function of a logarithmic function
- Use compositions of function to show equivalency: f(f−1(x))=f−1(f(x))=xf(f−1(x))=f−1(f(x))=x
Graphing the Inverse Function
One way to graph the inverse of a logarithmic function is by creating and using its inverse table. For example, to graph the inverse function of f(x)=log2xf(x)=log2x, we start by creating a table of values for the function (Table 1).
xx | y=log2xy=log2x |
1818 | −3−3 |
1414 | −2−2 |
1212 | −1−1 |
11 | 00 |
22 | 11 |
44 | 22 |
88 | 33 |
Table 1. Table of values for f(x)=log2xf(x)=log2x |
To create an inverse table, we switch the values in the xx and yy columns so that the inputs become the values of yy and the outputs become the values of xx. The table after switching the values of the xx and yy columns is the inverse table (Table 2). Since f(x)=log2xf(x)=log2x is a one-to-one function, its inverse will also be a one-to-one function.
xx | y=f−1(x)y=f−1(x) |
−3−3 | 1818 |
−2−2 | 1414 |
−1−1 | 1212 |
00 | 11 |
11 | 22 |
22 | 44 |
33 | 88 |
Table 2. Inverse table |
Looking at the values in table 2, notice that as xx increases by 1, the inverse function value increases by a multiple of 2. This means that the inverse of a logarithmic function is an exponential function. In this case, the inverse of f(x)=log2xf(x)=log2x is f−1(x)=2xf−1(x)=2x.
Figure 1 shows the graphs of the function f(x)=log2xf(x)=log2x (the blue curve) and its inverse (the green curve) graphed usings the values in Tables 1 and 2. Notice that the graph of the inverse function is a reflection of the graph of the original function with respect to the line y=xy=x (the red line).

Figure 1. The graphs of the function f(x)=log2xf(x)=log2x and its inverse function.
Notice that the inverse is also a function because it passes the vertical line test. The inverse is a one-to-one mapping. Therefore, the inverse is a function.
Example 1
Use Desmos to graph f(x)=2log2(x−3)+1f(x)=2log2(x−3)+1, then use reflection to graph its inverse function.
Solution
Copying and pasting the function into Desmos yields:
Now we draw in the line y=xy=x and reflect every point on the graph of y=f(x)y=f(x) across the line y=xy=x to get the inverse. Every point (x,y)(x,y) is reflected to (y,x)(y,x). The vertical asymptote x=3x=3 reflects to a horizontal asymptote y=3y=3.
Try It 1
Use Desmos to graph f(x)=log2(x+4)+3f(x)=log2(x+4)+3, then use reflection to graph its inverse function.
The Inverse Function Equation
We already know that to find the equation of an inverse function for a given function, we set y=f(x)y=f(x), switch xx and yy, then solve for yy. For example, given the logarithmic function f(x)=log2xf(x)=log2x, we first set y=f(x)y=f(x):
y=log2xy=log2x
Then we switch xx and yy to get the inverse:
x=log2yx=log2y
Now we solve for yy by writing this logarithmic equation as an equivalent exponential equation. Based on the definition of logarithm, the base of the logarithm, 2, becomes the base of the exponential:
y=2xy=2x
Therefore, the inverse function of the logarithmic function f(x)=log2xf(x)=log2x is:
f−1(x)=2x
Example 2
Determine the inverse function of g(x)=log5x.
Solution
First set y=g(x): y=log5x
Switch x and y to get the inverse: x=log5y
Use the definition of logarithm to solve for y: y=5x
Write in function notation: g−1(x)=5x
Try It 2
Determine the inverse function of h(x)=log7x.
Example 3
Determine the inverse function of the logarithmic function f(x)=log4(x+5).
Solution
First set y=f(x): y=log4(x+5)
Switch x and y to get the inverse: x=log4(y+5)
Use the definition of logarithm to solve for y: y+5=4x
Solve for y by subtracting 5 from both sides: y=4x−5
Write in function notation: f−1(x)=4x−5
Try It 3
Determine the inverse function of the logarithmic function g(x)=log3(x−6).
For a logarithmic function that is in the form f(x)=alogbx−h+k, we must first isolate the logarithm, before using the definition of a logarithm to solve for y.
Example 4
Determine the inverse function of the logarithmic function f(x)=4log3(x+2).
Solution
First set y=f(x):y=4log3(x+2)
Switch x and y to get the inverse: x=4log3(y+2)
Isolate the logarithm by dividing both sides by 4: 14x=log3(y+2)
Use the definition of logarithm to solve for y: y+2=3x4
Solve for y by subtracting 2 from both sides: y=3x4−2
Write in function notation: f−1(x)=3x4−2
Try It 4
Determine the inverse function of the logarithmic function f(x)=5log7(x−3).
Example 5
Determine the inverse function of the logarithmic function f(x)=log5(x−3)+2.
Solution
First set y=f(x): y=log5(x−3)+2
Switch x and y to get the inverse: x=log5(y−3)+2
Isolate the logarithm by subtracting 2 from both sides: x−2=log5(y−3)
Use the definition of logarithm to solve for y: y−3=5x−2
Solve for y by adding 3 to both sides: y=5x−2+3
Write in function notation: f−1(x)=5x−2+3
Example 6
Determine the inverse function of the logarithmic function f(x)=25log3(8x)−4.
Solution
First set y=f(x): y=25log3(8x)−4
Switch x and y to get the inverse: x=25log3(8y)−4
Isolate the logarithm by adding 4 to both sides: x+4=25log3(8y)
Isolate the logarithm by multiplying both sides by 52: 52(x+4)=log3(8y)
Use the definition of logarithm to solve for y: 8y=352(x+4)
Solve for y by dividing both sides by 8: y=18⋅352(x+4)
Write in function notation: f−1(x)=18⋅352(x+4)
Try It 5
Determine the inverse function of the logarithmic function:
- f(x)=log2(x−9)+1
- g(x)=34log5x−2
- h(x)=13log2(x+5)+8
- F(x)=6log10(x−3)+6
Composition of Inverse Functions
It is important to remember that an inverse function ‘undoes’ what was ‘done’ by the original function. Logarithmic functions and inverse functions are inverses of one another, so if we apply one function then apply its inverse, we should get back to where we started.
Consider the function f(x)=log4x and its inverse function f−1(x)=4x. Now let’s perform a composition of functions:
(f∘f−1)(x)=f(f−1(x))=f(4x)=log44x
To simplify log44x, let’s set a=log44x. Then using the definition of logarithms, we can write an equivalent exponential equation:
4a=4x
Since the bases are identical, the exponents must be equal:
a=x
Consequently, log44x=x and, therefore, (f∘f−1)(x)=x.
If we perform the composition in the opposite direction we get:
(f−1∘f)(x)=f−1(f(x))=f−1(log4x)=4log4x
To simplify 4log4x, let’s set a=4log4x. Then using the definition of logarithms, we can write an equivalent exponential equation:
log4a=log4x
Since logarithms are one-to-one functions, a=x.
Consequently, 4log4x=x and, therefore, (f−1∘f)(x)=x.
Example 7
Use composition of functions to show that f(x)=log2(x+1) and g(x)=2x−1 are inverse functions.
Solution
It doesn’t matter the order in which we compose the functions.
(f∘g)(x)=f(2x−1)=log2(2x−1+1)=log22x
To simplify log22x, let a=log22x, then using the definition of logarithms:
2a=2xa=x
Consequently, (f∘g)(x)=x
(g∘f)(x)=g(log2(x+1))=2log2(x+1)−1
To simplify 2log2(x+1), let a=2log2(x+1), then using the definition of logarithms:
log2a=log2(x+1)
a=x+1
Hence,
(g∘f)(x)=g(log2(x+1))=2log2(x+1)−1=(x+1)−1=x
Consequently, (g∘f)(x)=x
Therefore, f(x)=log2(x+1) and g(x)=2x−1 are inverse functions.
Try It 6
Use composition of functions to show that f(x)=log3(x+4) and g(x)=3x−4 are inverse functions.
Candela Citations
- The Inverse of a Logarithmic Function. Authored by: Leo Chang and Hazel McKenna. Provided by: Utah Valley University. License: CC BY: Attribution
- All graphs created using desmos graphing calculator. Authored by: Leo Chang and Hazel McKenna. Provided by: Utah Valley University. Located at: http://www.desmos.com/calculator. License: CC BY: Attribution
- All examples and Try Its: hjm417; hjm985; hjm926; hjm291; hjm118; hjm562. Authored by: Hazel McKenna. Provided by: Utah Valley University. License: CC BY: Attribution
- Composition of Inverse Functions. Authored by: Hazel McKenna. Provided by: Utah Vally University. License: CC BY: Attribution