Sub topic 11
Changing the Base of a Logarithm
Prerequisites and the main formula
Assume you know exponent laws, function notation, and how logarithms and exponentials are inverse operations. Recall that
\[ \log_b(x)=y \quad\text{means}\quad b^y=x. \]
A calculator usually provides only common logarithms, written \(\log(x)\), and natural logarithms, written \(\ln(x)\). The change-of-base formula lets you evaluate a logarithm with any valid base:
\[ \boxed{\logb(x)=\frac{\logk(x)}{\log_k(b)}} \]
Here, \(k\) can be any valid base, commonly \(10\) or \(e\).
The conditions still apply:
- \(b>0\) and \(b\ne1\)
- \(x>0\)
- \(k>0\) and \(k\ne1\)
Why the formula works
Let
\[ y=\log_b(x). \]
The definition of a logarithm gives
\[ b^y=x. \]
Take the logarithm of both sides using base \(k\):
\[ \logk(b^y)=\logk(x). \]
Using the power law, \(\logk(b^y)=y\logk(b)\), so
\[ y\logk(b)=\logk(x). \]
Divide by \(\log_k(b)\):
\[ y=\frac{\logk(x)}{\logk(b)}. \]
Since \(y=\log_b(x)\), the change-of-base formula follows.
Using a calculator
For example, evaluate \(\log_3(20)\) with common logarithms:
\[ \log_3(20)=\frac{\log(20)}{\log(3)} \approx\frac{1.3010}{0.4771} \approx2.727. \]
This result makes sense because \(3^2=9\) and \(3^3=27\), so the needed exponent lies between 2 and 3.
You can use natural logarithms instead. The result is unchanged:
\[ \log_3(20)=\frac{\ln(20)}{\ln(3)}. \]
| Desired logarithm | Calculator expression |
|---|---|
| \(\log_3(20)\) | \(\log(20)/\log(3)\) |
| \(\log_5(125)\) | \(\ln(125)/\ln(5)\) |
| \(\log_2(40)\) | \(\log(40)/\log(2)\) |
import math
value = math.log(20) / math.log(3)
print(round(value, 3)) # 2.727
print(math.isclose(3**value, 20.0)) # TrueThe final check uses the inverse relationship. Raising the base \(3\) to the calculated logarithm returns approximately \(20\).
Choosing a useful base
Mathematically, any valid \(k\) works. In practice, choose a base available on your calculator or in your programming language.
- Use base \(10\) with
log10when working with decimal measurements. - Use base \(e\) with
lnorlogwhen working with continuous growth, calculus, or natural processes. - Use base \(2\) when working with binary data or algorithm complexity.
The base changes the numerical value of a logarithm, but the change-of-base ratio preserves the same underlying exponent.
Exercise
Use the change-of-base formula to evaluate log_4(50) to three decimal places, then explain why the answer is between 2 and 3.
Show answer
log_4(50) = ln(50) / ln(4) ≈ 2.822. The answer is between 2 and 3 because 4^2 = 16 and 4^3 = 64, and 50 lies between those values.