Math Core

Lesson 5.3 · Exponential and Logarithmic Functions

Logarithms

You can answer "what is 252^5?" by multiplying. But how do you answer "22 to what power is 3232?" or, harder, "22 to what power is 5050?" Questions like these come up whenever you solve for a time in a growth model. A logarithm is the tool that answers them: it undoes an exponential the way a square root undoes a square.

What a logarithm is

A logarithm is an exponent. The expression log⁡232\log_2 32 asks, "What power of 22 gives 3232?" Since 25=322^5 = 32, the answer is 55.

Definition

Logarithm

For b>0b > 0, b≠1b \ne 1 and x>0x > 0,

log⁡bx=ymeansby=x.\log_b x = y \quad\text{means}\quad b^y = x.

Read log⁡bx\log_b x as "log base bb of xx." The base of the logarithm is the base of the power, and the logarithm itself is the exponent.

Every logarithmic statement is an exponential statement in disguise. Being able to switch between the two forms is the single most useful skill in this unit.

Worked example: Switching forms

Rewrite each equation in the other form.

  1. 25=322^5 = 32
  2. log⁡319=−2\log_3 \dfrac{1}{9} = -2
  3. 10−3=0.00110^{-3} = 0.001
  4. log⁡b7=x\log_b 7 = x

Solution. The base stays the base, and the exponent is what the log equals.

  1. log⁡232=5\log_2 32 = 5
  2. 3−2=193^{-2} = \dfrac{1}{9}
  3. log⁡100.001=−3\log_{10} 0.001 = -3
  4. bx=7b^x = 7

Evaluating logarithms

To evaluate log⁡bx\log_b x by hand, write xx as a power of bb. It often helps to set the log equal to yy and solve by=xb^y = x.

Worked example: Evaluate without a calculator

  1. log⁡464\log_4 64
  2. log⁡5125\log_5 \dfrac{1}{25}
  3. log⁡93\log_9 3
  4. log⁡84\log_8 4

Solution.

  1. 43=644^3 = 64, so log⁡464=3\log_4 64 = 3.
  2. 125=5−2\dfrac{1}{25} = 5^{-2}, so log⁡5125=−2\log_5 \dfrac{1}{25} = -2.
  3. 3=9=91/23 = \sqrt{9} = 9^{1/2}, so log⁡93=12\log_9 3 = \dfrac{1}{2}.
  4. Let log⁡84=y\log_8 4 = y, so 8y=48^y = 4. Write both sides as powers of 22: 23y=222^{3y} = 2^2. Then 3y=23y = 2 and y=23y = \dfrac{2}{3}.

A few values follow straight from the definition and are worth memorizing. For any valid base bb:

log⁡b1=0log⁡bb=1log⁡bbx=xblog⁡bx=x\log_b 1 = 0 \qquad \log_b b = 1 \qquad \log_b b^x = x \qquad b^{\log_b x} = x

The first holds because b0=1b^0 = 1 and the second because b1=bb^1 = b. The last two say that "raise bb to a power" and "take log⁡b\log_b" cancel each other.

Common and natural logarithms

Two bases get special notation because they are used so often.

  • The common logarithm has base 1010 and is written log⁡x\log x with no base shown. So log⁡1000=3\log 1000 = 3.
  • The natural logarithm has base ee and is written ln⁡x\ln x. So ln⁡e4=4\ln e^4 = 4 and ln⁡1=0\ln 1 = 0.

Your calculator has keys for both. For example, log⁡50≈1.699\log 50 \approx 1.699 (because 101.699≈5010^{1.699} \approx 50) and ln⁡20≈2.996\ln 20 \approx 2.996 (because e2.996≈20e^{2.996} \approx 20). You'll learn in the next lesson how to use these keys to find logs in any base.

Logarithmic functions and their graphs

Since log⁡bx\log_b x undoes bxb^x, the function g(x)=log⁡bxg(x) = \log_b x is the inverse of f(x)=bxf(x) = b^x. Its graph is the reflection of the exponential graph across the line y=xy = x: every point (a,c)(a, c) on y=2xy = 2^x becomes (c,a)(c, a) on y=log⁡2xy = \log_2 x.

y = 2^x and y = log₂ x are reflections of each other across the dashed line y = x.Open in grapher →

Swapping xx and yy swaps all the features:

y=bxy = b^xy=log⁡bxy = \log_b x
Domainall real numbersx>0x > 0
Rangey>0y > 0all real numbers
Key point(0,1)(0, 1)(1,0)(1, 0)
Asymptotehorizontal, y=0y = 0vertical, x=0x = 0

You can't take the log of zero or a negative number

Because byb^y is always positive, log⁡bx\log_b x is defined only for x>0x > 0. For a transformed log like y=log⁡b(x−h)+ky = \log_b(x - h) + k, the domain is x>hx > h and the vertical asymptote is x=hx = h.

Worked example: A transformed logarithm

Describe y=log⁡2(x−3)+1y = \log_2(x - 3) + 1: its domain, asymptote, and one exact point.

Solution. The argument must be positive: x−3>0x - 3 > 0, so the domain is x>3x > 3 and the vertical asymptote is x=3x = 3. The parent graph passes through (1,0)(1, 0) and (2,1)(2, 1); shifting right 33 and up 11 gives (4,1)(4, 1) and (5,2)(5, 2).

Check (5,2)(5, 2): log⁡2(5−3)+1=log⁡22+1=1+1=2\log_2(5 - 3) + 1 = \log_2 2 + 1 = 1 + 1 = 2. ✓

y = log₂(x − 3) + 1 with its vertical asymptote x = 3.Open in grapher →

Common mistake

log⁡28\log_2 8 is not 82\dfrac{8}{2} or 828^2. It's the exponent that turns 22 into 88, which is 33. When in doubt, rewrite the log as an exponential equation.

Practice

Practice 1

Evaluate log⁡264\log_2 64.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Which is the logarithmic form of 53=1255^3 = 125?

Practice 3

Evaluate log⁡3181\log_3 \dfrac{1}{81}.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Evaluate log⁡279\log_{27} 9.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Solve log⁡x49=2\log_x 49 = 2 for xx.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Use a calculator to evaluate ln⁡50\ln 50. Round to 33 decimal places.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

Find the domain of f(x)=log⁡(x+4)−2f(x) = \log(x + 4) - 2.

Enter an inequality, e.g. x >= 4, -2 < x <= 3, or x < 1 or x > 5

Practice 8

Let f(x)=log⁡2(x−1)+3f(x) = \log_2(x - 1) + 3. Find f(9)f(9).

Enter a number. Fractions like 3/4 and sqrt(2) are OK.