AP Precalculus · Topic 2.10 · Reading guide, about 4 min

Logarithms as inverses of exponentials

See why log base b undoes exponential base b, and how tables, domains and asymptotes swap between them.

In one minute

The exponential function f(x)=bxf(x)=b^x and the logarithmic function g(x)=log⁡b(x)g(x)=\log_b(x) are inverses. Whatever one does, the other undoes. Their inputs and outputs trade places, and so do their graph features.

Seeing logs as inverses makes the rest of the unit predictable: you can build a log graph from an exponential graph, and you can solve equations by applying the inverse to both sides.

Key terms

Inverse pair
Two functions that undo each other. For the same base bb, bxb^x and log⁡b(x)\log_b(x) are an inverse pair.
Cancellation
The identities log⁡b(bx)=x\log_b(b^x)=x for all xx, and blog⁡b(x)=xb^{\log_b(x)}=x for x>0x>0.
Swapped table
A table for the inverse made by exchanging the input and output columns of the original.
Horizontal asymptote
A horizontal line the graph approaches. The exponential bxb^x has y=0y=0.
Vertical asymptote
A vertical line the graph approaches. The log log⁡b(x)\log_b(x) has x=0x=0.
Domain and range swap
The exponential has domain all reals and range y>0y>0. The log has domain x>0x>0 and range all reals.
Reflection over y = x
The graph of the log is the graph of the exponential flipped across the line y=xy=x.

Swapping inputs and outputs

Start with f(x)=2xf(x)=2^x. Each input gives an output, and the inverse reads that pairing in reverse. Swap the columns of the table and you have the log table.

Because outputs of 2x2^x are always positive, the inputs of log⁡2\log_2 must be positive. Because 2x2^x accepts every real input, log⁡2\log_2 can output every real number. The roles of domain and range switch exactly as with any inverse.

Cancellation gives a fast way to check. For base 2, log⁡2(25)=5\log_2(2^5)=5 and 2log⁡2(8)=82^{\log_2(8)}=8. In each case the second function takes the result of the first and returns the starting value. Using composition (topic 2.7), these two identities say that composing the pair in either order gives the identity function, which is the definition of inverse functions from 2.8.

Graphs show the same thing. The point (3,8)(3,8) on the graph of 2x2^x corresponds to the point (8,3)(8,3) on the graph of log⁡2(x)\log_2(x). The exponential climbs ever faster, so its inverse climbs ever more slowly: reaching an output of 3 takes an input of 8, but reaching an output of 6 takes an input of 64. That contrast is typical of this pair: the faster an exponential grows, the more slowly its log grows.

Because the exponential never outputs zero or a negative number, the log has no inputs at or to the left of x=0x=0. The whole log graph lives to the right of x=0x=0; for b>1b>1 it hugs that line, dropping toward −∞-\infty, as xx shrinks toward 0.

f(x) = 2^x on the left, and its inverse log base 2 on the right
x2^xxlog_2(x)
-21/41/4-2
-11/21/2-1
0110
1221
3883

Features that swap

Every feature of the exponential has a partner on the log. The horizontal asymptote y=0y=0 becomes the vertical asymptote x=0x=0. The yy-intercept (0,1)(0,1) becomes the xx-intercept (1,0)(1,0). The domain of all reals becomes the range of all reals. An increasing exponential (b>1b>1) gives an increasing log.

Shifts carry over too. For f(x)=2x+1f(x)=2^x+1, the asymptote is y=1y=1 and the range is y>1y>1. Its inverse: y=2x+1y=2^x+1, swap to x=2y+1x=2^y+1, so 2y=x−12^y=x-1 and y=log⁡2(x−1)y=\log_2(x-1). The log has asymptote x=1x=1 and domain x>1x>1, matching the swap. The vertical shift of the exponential became a horizontal shift of the log.

Here is a list of the swaps to keep in mind: the exponential's domain (all reals) becomes the log's range; the exponential's range (positive numbers) becomes the log's domain; the exponential's horizontal asymptote becomes the log's vertical asymptote; and a point (a,b)(a,b) on the exponential becomes the point (b,a)(b,a) on the log. When a problem gives you one function and asks about the other, move through this list one item at a time.

Worked example with a stretch

Find the inverse of f(x)=3⋅2xf(x)=3\cdot 2^x. Write y=3⋅2xy=3\cdot 2^x and swap: x=3⋅2yx=3\cdot 2^y. Divide by 3: 2y=x32^y=\dfrac{x}{3}. Convert to log form: y=log⁡2 ⁣(x3)y=\log_2\!\left(\dfrac{x}{3}\right). So f−1(x)=log⁡2 ⁣(x3)f^{-1}(x)=\log_2\!\left(\dfrac{x}{3}\right).

Check with numbers. f(2)=3⋅4=12f(2)=3\cdot 4=12. Then f−1(12)=log⁡2(4)=2f^{-1}(12)=\log_2(4)=2, which returns the input. Also f(0)=3f(0)=3, and f−1(3)=log⁡2(1)=0f^{-1}(3)=\log_2(1)=0.

A useful summary of the relationship: an exponential turns adding to the input into multiplying the output (since bx+1=b⋅bxb^{x+1}=b\cdot b^x), and a log turns multiplying the input into adding to the output. That reversal is the core idea of the whole topic.

How it connects

  • Back to 2.8: this is the general inverse idea applied to a specific pair of functions.
  • Back to 2.3: the asymptote, domain and range of the exponential are what swap.
  • Forward to 2.11: graphing log functions uses these swapped features.
  • Forward to 2.13: solving equations applies the inverse to both sides.

Common mistakes

  • Mixing bases. log⁡3\log_3 undoes 3x3^x, not 2x2^x. The bases must match.
  • Copying the asymptote unchanged. The exponential's horizontal asymptote becomes a vertical line, with the same number but on the other axis.
  • Swapping only one column of a table. Both the inputs and the outputs exchange places.
  • Forgetting the log's domain. The input must stay positive, so a function like log⁡2(x−1)\log_2(x-1) requires x>1x>1.

How it shows up on the exam

  • Building a table for the inverse of an exponential and reading a value from it.
  • Stating the domain, range or asymptote of a log function from its exponential partner, or the reverse.
  • Describing in words how the exponential and logarithm reverse addition and multiplication.

Check yourself

  1. If f(x)=5xf(x)=5^x, what is f−1(x)f^{-1}(x), and what is f−1(25)f^{-1}(25)?
  2. An exponential has horizontal asymptote y=−2y=-2. What is the vertical asymptote of its inverse?
  3. Why does log⁡b(bx)=x\log_b(b^x)=x hold for every real xx while blog⁡b(x)=xb^{\log_b(x)}=x needs x>0x>0?
  4. What happens to a log's output when its input is multiplied by the base?

Practice this topic. AP Practice questions on exactly what this lesson covers, with an explanation for every answer.