What is a logarithm?
A logarithm answers the question "what exponent do I need?" If b raised to the power y equals x, then the logarithm of x to the base b is y. Written as an equation, logb(x) = y means exactly the same as b^y = x. Since 10^2 = 100, log10(100) = 2. Since 2^6 = 64, log2(64) = 6.
Common bases
| Name | Base | Notation | Typical use |
|---|---|---|---|
| Common log | 10 | log(x) or log10(x) | Decibels, pH, Richter scale |
| Natural log | e (about 2.71828) | ln(x) or loge(x) | Calculus, continuous growth |
| Binary log | 2 | log2(x) or lb(x) | Computer science, information |
Logarithm rules
- Product: log(a × b) = log(a) + log(b). For example log(1 × 10) = 0 + 1 = 1.
- Quotient: log(a / b) = log(a) - log(b). For example log(10 / 2) = 1 - 0.301 = 0.699.
- Power: log(a^n) = n × log(a). For example log(2^6) = 6 × 0.301 = 1.806.
- Base case: logb(1) = 0 and logb(b) = 1.
- Reciprocal base: logb(a) = 1 / loga(b).
Change of base
Most calculators only have keys for log base 10 and the natural log. To find a logarithm in another base, divide two logs of the same kind: logb(x) = ln(x) / ln(b). To find log5(2), compute ln(2) / ln(5) = 0.6931 / 1.6094 = 0.4307. The identity also shows log5(2) = 1 / log2(5).
Solving for each unknown
Find y
With b and x known, compute y = ln(x) / ln(b). For b = e and x = 100, y = ln(100) = 4.6051701859881.
Find x
With b and y known, raise the base to the answer: x = b^y. For b = 2 and y = 10, x = 1,024.
Find b
With x and y known, take a root: b = x^(1/y). If logb(81) = 4, then b = 81^(1/4) = 3.
Domain restrictions
Logarithms are only defined for positive numbers. The base must also be positive and cannot be 1, because 1 raised to any power is 1. The log of zero or a negative number does not exist among the real numbers, which is why the calculator rejects them.
Where logarithms are used
Logarithms turn multiplication into addition, which is why they compress huge ranges into manageable scales. Earthquake magnitude, sound level in decibels and acidity (pH) all grow by factors of ten for each step on a log scale. They also appear in compound interest, half-life decay, algorithm analysis and the calculation of information in bits.