The question a logarithm answers
An exponent builds a number by repeated multiplication: . A logarithm is the inverse operation. Given the result, it reports the count of multiplications:
The small number is the base, the factor being repeated. The input (here 8) is the number reached, and the output (here 3) is the count of multiplications by the base, starting from 1. Base 2 counts doublings, and base 10 counts tenfold steps: . A logarithm and its exponential undo each other; the two equations above state the same fact in opposite directions.
The count need not be a whole number. Since and , the number 10 lies between three and four doublings, and : three doublings plus about a third of the next one. The count can also be negative: numbers below 1 are reached from 1 by halving, so records three halvings. Between these two cases, , because reaching 1 from 1 takes zero steps in any base.
Multiplication becomes addition
The property on which every use of logarithms rests is that multiplying inputs adds their counts. Reaching 8 takes three doublings and reaching 4 takes two, so reaching takes the first three doublings followed by the next two, five in all. The same rule holds for any two positive inputs:
Here a and b are any two positive numbers, and the law holds in every base. With the numbers above, . This law is the reason logarithms appear wherever quantities combine by multiplication: chained probabilities, cascaded gains, and compound growth all multiply, and taking logarithms turns each chain of factors into a sum of counts, which can be tallied term by term. Division subtracts counts: .
The widget below demonstrates the law. The ruler is a log-scale ruler: each doubling of the input moves the marker the same distance to the right, because the marker's position is the logarithm. Press ×2 and the doublings readout rises by exactly 1; press ×10 and it rises by exactly , regardless of the starting value. Equal ratios of the input produce equal steps of the marker.
The ruler runs from 1/8 to 1024 with the powers of 2 marked. They are evenly spaced, because each is one more doubling than the last. Log-scaled chart axes work the same way: 10, 100, and 1,000 sit at equal distances because each is one tenfold step from its neighbor.
Changing the base
Logarithms in different bases measure the same quantity in different units, so any two of them differ only by a constant factor: , where x is any positive number. The choice of base is therefore a unit convention: base 2 suits counting bits and halvings, and base 10 suits counting orders of magnitude. The two readouts in the widget above stay in this fixed ratio of 3.32 at every value of x.
Practice
A quick drill: each prompt shows a power of two; pick its exponent, the count of doublings from 1. Your best streak is saved between visits.
Check your understanding
In the web
Builds on the assumed floor only — a foundation.
- Decibels (dB) — builds on this
- Logarithms and log scales — builds on this (coming soon)
- Bits & Surprise §1 — Information is surprise
- Bits & Surprise §4 — A bit is a yes/no question