Logarithms
A logarithm runs an exponent backwards — it asks how many times you must multiply the base to reach a number, and so it measures explosive growth on a calm scale.
An exponent answers “multiply 2 by itself 3 times — what do you get?” Answer: 8. A logarithm asks the very same fact from the other end: “how many times must I multiply 2 to reach 8?” Answer: 3. Same relationship, reversed.
In ten minutes you will be able to read and evaluate a logarithm, and you will understand why this “slow” function is the go-to tool for taming exponential numbers — from algorithm complexity to decibels to the Richter scale.
After this lesson you can say what a logarithm is, see why it reverses an exponent, compute a simple logarithm, and explain why logarithms grow so slowly.
A logarithm is the reverse of an exponent. You know 2³ = 8: multiply three 2s
and get 8. A logarithm undoes that — it starts from 8 and recovers the exponent,
3. Just as the square root reverses squaring, the logarithm reverses raising to a
power.
A logarithm asks: what exponent reaches this number? We write it log₂(8), read
“log, base 2, of 8”. The small 2 is the base — the number being multiplied. The
answer is the exponent that gets you there: log₂(8) = 3, because 2³ = 8. The base
of the logarithm must match the base of the exponent.
A logarithm grows very slowly — the exact opposite of exponential growth. The curve
above is log₂. As the input runs all the way from 1 to 64, the output only climbs
from 0 to 6. Exponential growth multiplied to explode; the logarithm divides that
explosion back down. Each doubling of the input adds just 1 to the logarithm.
That slowness makes logarithms a measuring tool for huge numbers. Because
log₂ adds 1 every time its input doubles, the logarithm of a number is roughly “how
many doublings it took to get here”. It turns a runaway exponential quantity into a
small, calm number you can compare and reason about — which is why logarithms appear
wherever growth explodes. When you see O(log n) in a complexity table or a decibel figure in an audio spec, you are seeing this exact idea at work: someone folded an explosive range back down to a human scale.
Find log₂(16).
The logarithm asks: how many times must you multiply 2 to reach 16?
Count the multiplications. One 2 is 2. Times 2 again is 4. Again is 8. Again is
16. That took four 2s multiplied together: 2 × 2 × 2 × 2 = 16, which is 2⁴.
So the exponent is 4, and log₂(16) = 4. Check by running it forward: 2⁴ = 16. The
logarithm and the exponent are the same fact read in opposite directions.
▸Why this works
Why does the base matter so much? Because “how many times you multiply” only has a
clear answer once you say multiply by what. log₂(8) is 3, but log₂ of a number
and a log with a different base ask different questions. The base names the step size
of the multiplication; change the base and you change the question, so the base is
always written right there with the log.
▸Common mistake
A common mistake is reading log₂(8) as 8 divided by 2, or as 2 × 8. It is neither.
A logarithm is not an ordinary operation on the two numbers — it is the exponent
that connects them. log₂(8) asks “2 to what power is 8?” and the answer is 3, not 4
and not 16.
Find log₂(8): how many 2s multiply to 8? Type the value.
Find log₂(2). Type the value.
Find log₁₀(100): how many 10s multiply to 100? Type the value.
Find log₂(16). Type the value.
Find log₁₀(1000). Type the value.
What does log₂(8) = 3 mean?
A logarithm is the reverse of an exponent: it asks how many times you must multiply
the base to reach a given number, and the answer is that exponent. It is written
log₂(8) = 3, because 2³ = 8; the base of the log must match the base of the power.
Logarithms grow very slowly — adding only 1 each time the input doubles — which makes
them a calm scale for measuring explosive growth. Now when you see log₂(n) in an algorithm analysis or log₁₀ on a chart axis, you will read it as “count the doublings” or “count the decimal digits” — and immediately know the number is far bigger than its logarithm suggests.
Practice
Start at the top. Tasks go easiest → hardest: recall a fact, apply it to a case, then a senior-level stretch. Open one, attempt it, then reveal.
Something unclear?
Ask a question about this lesson. Questions are anonymous and go straight to the author to make the lesson better.