What is a logarithm?

A logarithm answers one question: what power? We already know how to raise a number to a power — a logarithm runs that backwards. Asked for \log_2(8), we are really asking: to what power must we raise 2 to get 8? Since 2^3 = 8, the answer is 3.

The two statements say exactly the same thing — read off the base, the answer, and the power:

\log_b(x) = y \quad\Longleftrightarrow\quad b^{\,y} = x

The base b stays the base on both sides; the logarithm simply pulls out the exponent. Press play to watch 2^3 = 8 turn into \log_2(8) = 3.

So a logarithm is the inverse of raising to a power, the way subtraction undoes addition. Whenever you can write a number as a power of the base, you can read off its logarithm:

\log_2(8) = 3,\qquad \log_3(9) = 2,\qquad \log_{10}(1000) = 3

Two patterns fall straight out of the definition. Since b^1 = b, the log of the base itself is 1; and since b^0 = 1, the log of 1 is 0:

\log_b(b) = 1,\qquad \log_b(1) = 0

Logarithms turn into a handy ruler for things that grow by multiplying — they tame numbers that race off the top of the page, which is why they show up on exponential and real-life graphs.

Khan Academy introduces logarithms here: