Logarithms
A logarithm tells you which exponent turns the base into a given number. Learn the definition, common and natural logs, the log rules, the change of base formula, the graph and how to solve logarithmic and exponential equations step by step.
A logarithm is the exponent you must raise a base to in order to get a given number: logb x = y means bʸ = x. For example, log₂ 8 = 3 because 2³ = 8, and log 1,000 = 3 because 10³ = 1,000. Logarithms undo exponential functions, turn multiplication into addition and let you solve equations in which the unknown is an exponent.
What is a logarithm?
A logarithm answers the question: to what power must I raise b to get x? In symbols:
Here b is the base, x is the argument and y is the logarithm. Every logarithm statement can be rewritten as an exponential statement and back. This switch is the key skill for everything that follows.
| Exponential form | Logarithmic form |
|---|---|
| 2³ = 8 | log₂ 8 = 3 |
| 10² = 100 | log 100 = 2 |
| 5⁰ = 1 | log₅ 1 = 0 |
| 3⁻² = 1/9 | log₃ (1/9) = −2 |
| 41/2 = 2 | log₄ 2 = 1/2 |
| e¹ = e | ln e = 1 |
Common log and natural log (ln)
Two bases are so common that they have their own notation and their own calculator keys:
- Common logarithm: log x = log₁₀ x (key LOG). log 2 ≈ 0.301, log 3 ≈ 0.477, log 5 ≈ 0.699.
- Natural logarithm: ln x = loge x (key LN), with e ≈ 2.71828 from exponential functions. ln 2 ≈ 0.693, ln 10 ≈ 2.303.
In computer science, log₂ (the binary logarithm) is common, because it counts how many times you can halve something. The common log tells you how many digits a number has: log 5,000 ≈ 3.699 lies between 3 and 4, and 5,000 has 4 digits.
Four facts follow directly from the definition, for every valid base b:
- logb 1 = 0, because b⁰ = 1.
- logb b = 1, because b¹ = b.
- logb (bˣ) = x and blogb x = x: logarithm and exponential undo each other.
- logb 0 and logb of a negative number are undefined, because bʸ is always positive.
Log rules (properties of logarithms)
The log rules come from the exponent rules: multiplying powers adds exponents, so the log of a product is the sum of the logs. They hold for every base; the examples use log 2 ≈ 0.301 and log 3 ≈ 0.477.
| Rule | Formula | Example |
|---|---|---|
| Product rule | logb(MN) = logb M + logb N | log 6 = log 2 + log 3 ≈ 0.778 |
| Quotient rule | logb(M/N) = logb M − logb N | log 1.5 = log 3 − log 2 ≈ 0.176 |
| Power rule | logb(Mᵖ) = p · logb M | log 8 = 3 · log 2 ≈ 0.903 |
| Change of base | logb x = log x / log b = ln x / ln b | log₂ 10 = ln 10 / ln 2 ≈ 3.322 |
A root is a power with a fractional exponent, so log √x = (1/2) log x.
The change of base formula
Calculators usually have only LOG and LN. For any other base, divide:
Graph of a logarithmic function
The logarithmic function y = logb x is the inverse of the exponential function y = bˣ. Its graph is the mirror image of the exponential graph across the line y = x: every point (p, q) on one graph becomes (q, p) on the other.
- Domain: x > 0. Range: all real numbers.
- x-intercept: (1, 0), for every base. The graph also passes through (b, 1).
- Vertical asymptote: x = 0. Near 0 the values drop toward −∞.
- For b > 1 the function increases, but more and more slowly: log₂ 1,024 is only 10.
How to solve logarithmic equations
- Use the log rules to combine everything into a single logarithm on each side.
- Either rewrite logb A = c as A = bᶜ, or, if both sides are logs with the same base, set the arguments equal.
- Solve the resulting equation.
- Check every solution: each argument in the original equation must be positive.
Solving exponential equations with logarithms
When the unknown is in the exponent, isolate the power and take the logarithm of both sides. The power rule brings the exponent down.
Logarithms in real life: pH and decibels
Logarithmic scales squeeze huge ranges into small numbers. Each step of 1 means a factor of 10.
- pH: pH = −log [H⁺], where [H⁺] is the hydrogen ion concentration in moles per liter. If [H⁺] = 10⁻³, the pH is 3. If [H⁺] = 3.2 × 10⁻⁵, the pH is −log(3.2 × 10⁻⁵) ≈ 4.49. A solution with pH 3 is 10 times as acidic as one with pH 4.
- Decibels: the sound level is L = 10 · log(I/I₀) decibels. Ten times the intensity adds 10 dB; doubling the intensity adds 10 · log 2 ≈ 3 dB.
- Earthquakes: on the Richter scale, each whole step means ten times the amplitude of the recorded shaking.
Common mistakes
- Splitting a sum: log(a + b) is not log a + log b. The product rule is about log(a · b).
- Dividing logs wrongly: log a / log b is not log(a/b). It is the change of base formula, logb a.
- Moving the wrong exponent: (log x)² is not 2 log x. Only log(x²) = 2 log x.
- Taking the log of a negative number: ln(−5) is undefined in the real numbers.
- Skipping the check: solutions that make an argument zero or negative must be rejected.
- Dividing instead of finding the power: log₂ 8 is 3 (2³ = 8), not 8/2 = 4.
Practice problems
Frequently asked questions
What is a logarithm in simple terms?
A logarithm is an exponent. logb x asks how many times you multiply b by itself to get x. log₁₀ 1,000 = 3 because 10 · 10 · 10 = 1,000.
What are the rules of logarithms?
Product rule log(MN) = log M + log N, quotient rule log(M/N) = log M − log N, power rule log(Mᵖ) = p log M, and the change of base formula logb x = ln x / ln b. See the table of log rules.
What is the difference between log and ln?
log usually means the common logarithm with base 10, and ln means the natural logarithm with base e ≈ 2.718. In some college texts and programming languages, log without a base means ln, so check the convention.
How do you solve logarithmic equations?
Combine the logs into one, rewrite in exponential form (logb A = c becomes A = bᶜ), solve, and check that every argument stays positive.
Why can't you take the log of a negative number?
Because a positive base raised to any real power is positive. No real exponent y makes 10ʸ equal to −5, so log(−5) is undefined in the real numbers.
Keep learning
- Previous topic: exponential functions, the inverse of logarithms.
- Next topic: trigonometry.
- In German: Logarithmen.
Spotted a mistake or have a request? Send us a short message and we will take care of it.