Sub topic 1
Quick review: exponents and their laws
Prerequisites
This chapter assumes you understand integer, negative and fractional exponents, the laws of exponents, and basic algebra. You should also be able to use a scientific calculator or run simple Python code.
Exponents and their laws
An exponent tells you how many times to multiply a base by itself. For example, 2^3 = 2 × 2 × 2 = 8. The laws you will need later are:
- Product law: a^m × a^n = a^(m+n)
- Quotient law: a^m / a^n = a^(m−n), for a ≠ 0
- Power law: (a^m)^n = a^(mn)
- Zero exponent: a^0 = 1, for a ≠ 0
What a logarithm is
A logarithm is the exponent you raise a base to in order to get a given number. The expression logb(x) asks: "b to what power gives x?" So log2(8) = 3, because 2^3 = 8.
Switching between exponential and logarithmic form
The statement b^y = x and the statement log_b(x) = y say the same thing. Converting between them is a routine skill:
| Exponential form | Logarithmic form |
|---|---|
| 10^2 = 100 | log_10(100) = 2 |
| 2^5 = 32 | log_2(32) = 5 |
| 3^(−2) = 1/9 | log_3(1/9) = −2 |
Special values every logarithm shares
For any valid base b:
- log_b(1) = 0, because b^0 = 1.
- log_b(b) = 1, because b^1 = b.
Common logarithms, natural logarithms and base 2
Three bases appear most often:
- Common logarithm: base 10, written log10(x).
- Natural logarithm: base e ≈ 2.71828, written ln(x).
- Binary logarithm: base 2, written log2(x), common in computing.
In Python, math.log(x) returns the natural logarithm.
import math
print(math.log10(1000)) # 3.0
print(math.log(math.e)) # 1.0
print(math.log2(8)) # 3.0
print(math.log(1)) # 0.0Exercise
What is log_3(81)?
Show answer
4, because 3^4 = 81.