Sub topic 2
What a logarithm is
Assume you know integer, negative, and fractional exponents, the basic laws of exponents, function notation, and how inverse functions work. A logarithm reverses an exponential operation.
The definition
A logarithm answers this question:
> What exponent on the base produces the given number?
The statement
\[ \log_b(x)=y \]
means exactly the same thing as
\[ b^y=x. \]
Here:
- \(b\) is the base.
- \(x\) is the argument, or input, of the logarithm.
- \(y\) is the logarithm's value.
For example,
\[ \log_2(8)=3 \]
because
\[ 2^3=8. \]
The base must satisfy \(b>0\) and \(b\ne1\). The argument must satisfy \(x>0\) when working with real logarithms. These restrictions matter because a positive base cannot produce a negative result through real-number exponentiation, and base \(1\) always produces \(1\), so it cannot distinguish between exponents.
Switching between the two forms
To convert exponential form to logarithmic form, use the exponent as the logarithm's value:
\[ 5^3=125 \quad\Longleftrightarrow\quad \log_5(125)=3. \]
To convert logarithmic form to exponential form, make the logarithm's value the exponent:
\[ \log_3(81)=4 \quad\Longleftrightarrow\quad 3^4=81. \]
This conversion is often the easiest way to evaluate a logarithm. For instance, \(\log_{10}(0.01)=-2\) because \(10^{-2}=0.01\).
| Exponential form | Logarithmic form |
|---|---|
| \(2^5=32\) | \(\log_2(32)=5\) |
| \(10^{-3}=0.001\) | \(\log_{10}(0.001)=-3\) |
| \(7^1=7\) | \(\log_7(7)=1\) |
import math
values = [
math.log2(32),
math.log10(0.001),
math.log(81, 3),
]
for value in values:
print(value)The output is approximately 5.0, -3.0, and 4.0.
Logarithms and inverse functions
The functions \(f(x)=b^x\) and \(g(x)=\log_b(x)\) are inverses. Applying one after the other returns the original value:
\[ \log_b(b^x)=x \]
and
\[ b^{\log_b(x)}=x. \]
For example,
\[ \log_2(2^7)=7 \]
and
\[ 2^{\log_2(13)}=13. \]
A logarithmic function has input values greater than zero, but its output can be any real number. This is why logarithms can return negative values, zero, or positive values.
A useful mental model
Think of exponentiation as a machine that takes an exponent and produces a number. A logarithm runs that machine backward:
The shared values \(1\) and the base are immediate:
\[ \log_b(1)=0 \]
because \(b^0=1\), and
\[ \log_b(b)=1 \]
because \(b^1=b\).
Exercise
Rewrite log_4(1/16) in exponential form and evaluate it.
Show answer
The equivalent equation is 4^y = 1/16. Since 4^-2 = 1/16, y = -2. Therefore, log_4(1/16) = -2.