Unit 5, lesson 39

Logarithms as Inverse Functions

What a logarithm means as the exponent that produces a given number, why that number must be positive, and how its graph comes from the exponential with the same base by swapping inputs and outputs.

  • Theory part 77
  • Practice part 78
  • Logarithms

If money doubles every year, how many years until it is eight times as large? You know the output of the power and want the exponent. A logarithm answers exactly that question, and it does so as a function in its own right, the inverse of an exponential function.

Key terms

Logarithm, base and argument

Definition Let a>0a > 0 with a≠1a \ne 1, and let x>0x > 0. The logarithm of xx with base aa, written log⁡ax\log_a x, is the unique real number yy such that ay=xa^y = x. In symbols,

log⁡ax=yexactly whenay=x.\begin{gathered} \log_a x = y \\[0.4em] \text{exactly when} \quad a^y = x. \end{gathered}

The number aa is the base and the number xx is the argument. Uniqueness holds because aya^y is strictly increasing or strictly decreasing in yy, and existence holds because aya^y takes every positive value.

In plain words The logarithm log⁡ax\log_a x asks which power of aa gives xx. The base is the number being raised to a power and the argument is the result you want to reach.

Example Since 23=82^3 = 8, we have log⁡28=3\log_2 8 = 3, so money that doubles yearly becomes eight times as large in 33 years. Also log⁡101000=3\log_{10} 1000 = 3 and log⁡319=−2\log_3 \frac{1}{9} = -2 because 3−2=193^{-2} = \frac{1}{9}.

Exponent as output

Definition The equations log⁡ax=y\log_a x = y and ay=xa^y = x are two forms of the same statement, the logarithmic form and the exponential form. In the logarithmic form the exponent yy is the output of the function and the power xx is the input.

In plain words An exponential function takes an exponent and returns a power. A logarithm takes the power and returns the exponent.

Example Each fact can be written both ways.

exponential formlogarithmic form
52=255^2 = 25log⁡525=2\log_5 25 = 2
41/2=24^{1/2} = 2log⁡42=12\log_4 2 = \frac{1}{2}
10−3=0.00110^{-3} = 0.001log⁡100.001=−3\log_{10} 0.001 = -3
(12)−3=8\left(\frac{1}{2}\right)^{-3} = 8log⁡1/28=−3\log_{1/2} 8 = -3

Inverse relationship

Definition For a>0a > 0 with a≠1a \ne 1, the function f(x)=axf(x) = a^x is one-to-one from R\mathbb{R} onto (0,∞)(0, \infty), and its inverse is f−1(x)=log⁡axf^{-1}(x) = \log_a x from (0,∞)(0, \infty) onto R\mathbb{R}. The two cancellation identities are

log⁡a ⁣(ay)=y  for every real y,alog⁡ax=x  for every x>0.\begin{gathered} \log_a\!\left(a^y\right) = y \ \text{ for every real } y, \\[0.4em] a^{\log_a x} = x \ \text{ for every } x > 0. \end{gathered}

In particular log⁡a1=0\log_a 1 = 0 and log⁡aa=1\log_a a = 1.

In plain words Raising aa to a power and taking the base aa logarithm undo each other, as long as you stay inside their domains.

Example The identities give log⁡7 ⁣(74.2)=4.2\log_7\!\left(7^{4.2}\right) = 4.2 and 3log⁡320=203^{\log_3 20} = 20. The expression 2log⁡2(−5)2^{\log_2(-5)} has no real value, because log⁡2(−5)\log_2(-5) does not exist.

Positive argument, domain and range

Definition The real function log⁡ax\log_a x has domain (0,∞)(0, \infty) and range R\mathbb{R}. Every real output yy is attained, at the positive input x=ayx = a^y. Zero and negative arguments have no real logarithm, because ay>0a^y > 0 for every real yy. For a composite such as log⁡a(g(x))\log_a(g(x)) the domain is the set of xx in the domain of gg with g(x)>0g(x) > 0.

In plain words A positive base raised to any power is positive, so only positive numbers can be reached. In return, every exponent, large, small or negative, is the logarithm of some positive number.

Example The value log⁡2(−8)\log_2(-8) is undefined, since no real yy gives 2y=−82^y = -8. The function log⁡2(6−2x)\log_2(6 - 2x) needs 6−2x>06 - 2x > 0, which means x<3x < 3, so its domain is (−∞,3)(-\infty, 3).

Logarithmic graph

Definition The graph of y=log⁡axy = \log_a x is the reflection of the graph of y=axy = a^x across the line y=xy = x. A point (p,q)(p, q) lies on the graph of axa^x exactly when (q,p)(q, p) lies on the graph of log⁡ax\log_a x. Every logarithmic graph passes through (1,0)(1, 0) and (a,1)(a, 1).

In plain words Take a table of powers, swap the two rows, and plot. The new points trace the logarithm.

Example For base 22, swapping the rows of a power table gives

xx14\frac{1}{4}12\frac{1}{2}11224488
log⁡2x\log_2 x−2-2−1-100112233

The graph rises slowly to the right, crosses the xx-axis at (1,0)(1, 0) and drops steeply as xx approaches 00.

Vertical asymptote

Definition For a>1a > 1, log⁡ax→−∞\log_a x \to -\infty as x→0+x \to 0^+, and for 0<a<10 < a < 1, log⁡ax→∞\log_a x \to \infty as x→0+x \to 0^+. In both cases the line x=0x = 0 is a vertical asymptote of the graph. The graph lies entirely to the right of it and never touches it, since 00 is not in the domain. This is the horizontal asymptote y=0y = 0 of axa^x reflected across y=xy = x.

In plain words As the argument gets close to 00, you need a huge negative exponent (or a huge positive one when the base is below 11) to reach it, so the graph runs off along the yy-axis.

Example For base 22, the input 2−20≈0.000000952^{-20} \approx 0.00000095 has logarithm log⁡2 ⁣(2−20)=−20\log_2\!\left(2^{-20}\right) = -20. Inputs extremely close to 00 give outputs far down, but the graph never reaches x=0x = 0.

Increasing and decreasing logarithms

Definition If a>1a > 1, then log⁡ax\log_a x is strictly increasing on (0,∞)(0, \infty). If 0<a<10 < a < 1, then log⁡ax\log_a x is strictly decreasing on (0,∞)(0, \infty). The logarithm has the same direction of change as the exponential with the same base. For 0<a<10 < a < 1,

log⁡ax=−log⁡1/ax,x>0,\log_a x = -\log_{1/a} x, \qquad x > 0,

so the graph of log⁡ax\log_a x is the reflection of the graph of log⁡1/ax\log_{1/a} x across the xx-axis.

In plain words A base above 11 makes both the power and the logarithm go up. A base between 00 and 11 makes both go down.

Example Compare base 22 with base 12\frac{1}{2}.

xx14\frac{1}{4}12\frac{1}{2}11224488
log⁡2x\log_2 x−2-2−1-100112233
log⁡1/2x\log_{1/2} x221100−1-1−2-2−3-3

Each value in the last row is the negative of the one above it. Both graphs pass through (1,0)(1, 0), but the second one falls as xx grows and climbs toward ∞\infty as x→0+x \to 0^+.

Check yourself

  1. Evaluate log⁡5125\log_5 125, log⁡42\log_4 2, log⁡100.001\log_{10} 0.001 and log⁡1/39\log_{1/3} 9.
Show the answer

The values are 33, 12\frac{1}{2}, −3-3 and −2-2, because 53=1255^3 = 125, 41/2=24^{1/2} = 2, 10−3=0.00110^{-3} = 0.001 and (13)−2=9\left(\frac{1}{3}\right)^{-2} = 9.

  1. Find the domain and the vertical asymptote of f(x)=log⁡2(6−2x)f(x) = \log_2(6 - 2x).
Show the answer

The argument must be positive, so 6−2x>06 - 2x > 0, which gives x<3x < 3. The domain is (−∞,3)(-\infty, 3). As x→3−x \to 3^- the argument approaches 00 from above, so the line x=3x = 3 is the vertical asymptote.

  1. Without a calculator, decide whether log⁡0.53\log_{0.5} 3 is positive or negative.
Show the answer

It is negative. The base 0.50.5 is less than 11, so the logarithm is decreasing and equals 00 at x=1x = 1. Since 3>13 > 1, its value is below 00. Indeed log⁡0.53=−log⁡23≈−1.585\log_{0.5} 3 = -\log_2 3 \approx -1.585.

How this lesson connects