Logarithms
Quick answer
A logarithm answers “what exponent gives this number?” log_b(x) = y means bʸ = x. For example log₂ 8 = 3 because 2³ = 8. The natural log ln x uses base e, and log x usually means base 10. Logarithms are only defined for positive inputs.
y=ln(x)y=log(x)y=log_2(x)
Log rules
| Product | log(xy) = log x + log y |
|---|---|
| Quotient | log(x/y) = log x − log y |
| Power | log(xⁿ) = n log x |
| Change of base | log_b x = ln x / ln b |
| Inverse | b^(log_b x) = x and log_b(bˣ) = x |
Typing logs
Use ln(x), log(x) for base 10, and log_2(x) for other bases. All three curves above pass through (1, 0) because b⁰ = 1 for every base.
Frequently asked questions
Why is log(0) undefined?
No power of a positive base equals 0, so there is no exponent to return. The graph has a vertical asymptote at x = 0.