Part II · Algebra Chapter 12 of 60
Powers and logarithms
A quantity that is multiplied at every step sooner or later outgrows any quantity that is added to, and usually sooner than you'd think. Let's hold a race of growth rates, then find a tool that turns multiplication into addition and tames astronomical numbers.
Builds on: 11 · Systems of equations and inequalities
You will learn
- understand why powers with zero, negative and fractional exponents are defined exactly as they are, and calculate with the rules for powers
- tell exponential growth from polynomial growth and predict who overtakes whom
- find logarithms, use their properties and read logarithmic scales
The last chapter ended with a legend. The inventor of chess asked the ruler for a reward in grain: one grain on the first square of the board, two on the second, four on the third, and so on, each square twice as many as the one before. The ruler laughed at such a modest request, and he was wrong to: when the treasurers finished counting, it turned out there wasn't that much wheat in the whole kingdom. In the last chapter all the dependencies were linear, each step adding the same amount. Here each square doesn't add, it multiplies.
The legend is told in many ways; one of the earliest known records belongs to the historian Ibn Khallikan (1256). The arithmetic is the same in every version. The last, sixty-fourth square gets $2^{63}$ grains, and the whole board holds
$$1 + 2 + 4 + \dots + 2^{63} = 2^{64} - 1 = 18{,}446{,}744{,}073{,}709{,}551{,}615.$$If a grain weighs about $0.05$ g, that's roughly $900$ billion tonnes of wheat. The whole world now harvests about $800$ million tonnes a year, so the ruler would have had to hand over the planet's crop for more than a thousand years.
The legend hides two questions. The direct one: what do you get if you multiply by two sixty-three times in a row? And the reverse one: how many times do you have to double one to get, say, a million? The first is answered by a power, the second by a logarithm. The answer to the second, by the way, is surprisingly small: twenty doublings give $1{,}048{,}576$. A million grains are already on the twenty-first square, in the first third of the board.
The chapter is built as a race. The contestants are different ways of growing: adding, multiplying, squaring, raising to the tenth power. We'll find out who overtakes whom and when, learn to write numbers for which no amount of paper would be enough, and find the tool with which people multiplied by adding for more than three hundred years.
The start: multiplying instead of adding
Let's write down the rule of the legend. The square numbered $n$ holds $2 \cdot 2 \cdot \ldots \cdot 2$ grains, with $n - 1$ twos. Writing out the factors takes a long time, so we don't write them, we count them.
The power of a number $a$ with natural exponent $n$ is the product of $n$ factors, each equal to $a$: $a^n = a \cdot a \cdot \ldots \cdot a$. The number $a$ is called the base, and $n$ the exponent. The power with exponent $1$ is the number itself: $a^1 = a$.
Following the Greeks, the second and third powers are called the square and the cube: for them these were an area and a volume. The familiar notation with a small raised number took hold after Descartes' Geometry (1637), although Descartes himself often still wrote $xx$ in the old way instead of $x^2$. The word "exponent" was introduced by the German Michael Stifel in 1544, from the Latin for "to set out". We'll picture the powers of a number as the steps of a ladder; the ladder will come in handy.
At first sight a power is just shorthand for multiplication. But it has a breathtaking property: at each step the quantity doesn't grow by the same amount, it is multiplied by the same number. At first this goes unnoticed.
You're offered a job for $30$ days. Option one: $1000$ a day. Option two: one cent on the first day, two on the second, four on the third, and every day twice as much as the day before. Which is better?
In $30$ days the cents add up to $2^{30} - 1 = 1{,}073{,}741{,}823$ cents, that is, $10{,}737{,}418.23$, which is $358$ times $30{,}000$. The last day alone brings $2^{29}$ cents, more than five million. But for three weeks doubling loses: even after day $21$ it has $20{,}971.51$ against $21{,}000$. The overtake happens on day $22$, and after that the gap snowballs. Why the sum is exactly $2^{30} - 1$, check on the first days: $1 = 2 - 1$, $1 + 2 = 4 - 1$, $1 + 2 + 4 = 8 - 1$.
Doubling can be tested by hand. Take a sheet of paper $0.1$ mm thick and fold it in half: it becomes $0.2$ mm thick. Again: $0.4$ mm, then $0.8$ mm. After $n$ folds the stack has $2^n$ layers and is $0.1 \cdot 2^n$ mm thick. Ten folds give $102.4$ mm, a fat encyclopedia volume. And if we go on?
After $42$ folds the thickness is $0.1 \cdot 2^{42}$ mm, about $440{,}000$ km, more than the distance from the Earth to the Moon ($384{,}400$ km on average). Fifty-one folds carry the stack beyond the Sun, sixty-nine beyond the nearest star, a hundred and two beyond the edge of the observable universe. Each fold only doubles, but the doublings pile up.
The rules of calculation
Powers are convenient to calculate with without expanding them. What is $2^3 \cdot 2^4$? First three twos, then four more, seven in all: $2^3 \cdot 2^4 = 2^7 = 128$. The exponents add because the numbers of factors add.
The same counting gives the other rules.
For any numbers $a$, $b$ and natural $m$, $n$
$$\begin{gathered} a^m \cdot a^n = a^{m+n}, \\ (a^m)^n = a^{mn}, \\ (ab)^n = a^n b^n, \end{gathered}$$and if $a \ne 0$ and $m > n$, then $\dfrac{a^m}{a^n} = a^{m-n}$.
One trick serves all four rules: a power with a natural exponent is a chain of equal factors, and each rule comes from counting the factors. Multiplication can be done in any order and with any placement of brackets (the commutative and associative laws), so chains can be glued together and tiles rearranged within them.
Product. $a^m$ has $m$ factors $a$, and $a^n$ has $n$ more. Attach the second chain to the first: we get one chain of $m + n$ factors, that is, $a^{m+n}$.
Power of a power. $(a^m)^n$ is the product of $n$ equal factors $a^m$, each with $m$ factors $a$. Lay them out in rows one under another: we get a rectangle of $n$ rows of $m$ tiles, $mn$ factors in all, that is, $a^{mn}$.
Power of a product. $(ab)^n$ is $n$ pairs $ab$ in a row. Rearrange the factors so that all the $a$'s come first and then all the $b$'s; rearranging factors doesn't change a product. We get $n$ factors $a$ and $n$ factors $b$, that is, $a^n b^n$.
Quotient. The numerator has $m$ factors $a$, the denominator $n$, and $n < m$. Each pair "an $a$ on top, an $a$ below" cancels, because $\frac aa = 1$ when $a \ne 0$. After $n$ cancellations the numerator has $m - n$ factors left and the denominator is one: that's $a^{m-n}$.
There's no rule for addition. A sum of powers doesn't gather into one power, and this is where people trip up most often.
What is $2^{10} + 2^{10}$?
Two equal terms make a doubling: $2^{10} + 2^{10} = 2 \cdot 2^{10} = 2^{11} = 2048$. Check: $1024 + 1024 = 2048$.
One more convention concerns "towers". The notation $2^{3^2}$ is read from the top down: $2^{(3^2)} = 2^9 = 512$, not $(2^3)^2 = 2^6 = 64$. The second case has the rule $(a^m)^n = a^{mn}$, and the tower notation is saved for the first.
Calculate $\dfrac{3^{7} \cdot 3^{5}}{(3^{5})^{2}}$ without multiplying out long numbers.
The numerator is $3^{7 + 5} = 3^{12}$, the denominator $3^{5 \cdot 2} = 3^{10}$. The quotient is $3^{12 - 10} = 3^2 = 9$.
Back from the start: zero and minus in the exponent
We derived the rule $a^m a^n = a^{m+n}$ by counting factors, so for now it's proved only for natural $m$ and $n$. What is $2^0$, a product of zero twos? Or $2^{-3}$, a product of minus three twos? It sounds like nonsense, and strictly speaking these expressions could be defined any way we like. But only one choice keeps the rules true.
Let's walk down the ladder of powers of two: $2^4 = 16$, $2^3 = 8$, $2^2 = 4$, $2^1 = 2$. Each step down divides by two. If the ladder goes on, the next steps are $1$, $\frac12$, $\frac14$, $\frac18$.
The ladder suggested the answer, and the rule for adding exponents proves it.
Let $a \ne 0$. If the rule $a^m a^n = a^{m+n}$ is to hold for all integers $m$ and $n$, then necessarily $a^0 = 1$ and $a^{-n} = \frac{1}{a^n}$. Conversely, with this definition all the rules for powers hold for any integer exponents.
First we show there's no choice. The rule with $m = 0$ gives $a^0 \cdot a^n = a^{0 + n} = a^n$. The number $a^n$ isn't zero; divide both sides by it and get $a^0 = 1$. The rule with $m = -n$ gives $a^{-n} \cdot a^n = a^0 = 1$, and the number that gives one when multiplied by $a^n$ is $\frac{1}{a^n}$. For $a = 2$, $n = 3$: $2^0 \cdot 8 = 8$ forces $2^0 = 1$, and $2^{-3} \cdot 8 = 1$ forces $2^{-3} = \frac18$.
Now let's check that nothing breaks with this definition. Take the product rule and go through the signs of the exponents. If both are non-negative, it's the property proved above (the factor $a^0 = 1$ changes nothing). If both are negative, $m = -p$, $n = -q$, then $a^{-p}a^{-q} = \frac{1}{a^p} \cdot \frac{1}{a^q} = \frac{1}{a^{p+q}} = a^{-(p+q)}$. If the signs differ, $m = p \ge 0$, $n = -q$, then $a^p a^{-q} = \frac{a^p}{a^q}$. When $p > q$ this is $a^{p-q}$ by the quotient rule; when $p < q$, cancelling $p$ pairs leaves $\frac{1}{a^{q-p}} = a^{p-q}$; when $p = q$ we get $1 = a^0$. In every case we get $a^{p-q}$, that is, $a^{m+n}$. The power of a power is checked the same way: $\left(a^{-p}\right)^q = \frac{1}{(a^p)^q} = a^{-pq}$, $\left(a^{p}\right)^{-q} = \frac{1}{a^{pq}} = a^{-pq}$ and $\left(a^{-p}\right)^{-q} = \frac{1}{1/a^{pq}} = a^{pq}$: each time the exponent is the product of the exponents. The rule $(ab)^{-n} = \frac{1}{a^n b^n} = a^{-n}b^{-n}$ follows from the rule for natural $n$.
An exponent is a number of steps along the ladder: plus leads up, minus down, zero stays put, and each step multiplies by the base. Nobody pulled the zero and negative powers out of thin air: there's simply no other way to extend the ladder that keeps the rules.
Negative powers of ten do for small numbers what positive ones do for large. Physicists and astronomers write numbers like this:
Writing a number as $a \cdot 10^n$, where $1 \le a < 10$ and $n$ is an integer, is called scientific notation (or standard form). The exponent $n$ tells you the size of the number at once: when $n \ge 0$ the number has exactly $n + 1$ digits before the decimal point.
There are about $1.8 \cdot 10^{19}$ grains on the chessboard. The mass of the Earth is $5.97 \cdot 10^{24}$ kg, and the diameter of a hydrogen atom is about $10^{-10}$ m. Such numbers can be compared at a glance at the exponents, and multiplied by the rule for adding exponents: $(2 \cdot 10^{5}) \cdot (3 \cdot 10^{-8}) = 6 \cdot 10^{-3}$. Calculators write the same thing with the letter E: 1.8E19.
Half a step: fractional exponents
So far the ladder has only whole steps. Can we stand between them, say at $2^{1/2}$? Let's demand the same as before: the rule for adding exponents must work. Two half-steps make a whole step, so
$$2^{1/2} \cdot 2^{1/2} = 2^{\frac12 + \frac12} = 2^1 = 2.$$So $2^{1/2}$ is a positive number whose square is two, that is, $\sqrt2 \approx 1.414$. Each half-step along the ladder of two multiplies by $\sqrt2$. In the same way three third-steps make a whole step, and $2^{1/3} = \sqrt[3]{2} \approx 1.26$. You can take several small steps too: $2^{3/2}$ is three half-steps, $\left(\sqrt2\right)^3 = 2\sqrt2 \approx 2.83$.
Let $a > 0$, $m$ an integer and $n$ a natural number. If the rules for powers are to be kept and a power of a positive number is to stay positive, then $a^{1/n} = \sqrt[n]{a}$ and $a^{m/n} = \sqrt[n]{a^m} = \left(\sqrt[n]{a}\right)^m$. The value doesn't depend on how the fraction is written: $a^{mk/(nk)} = a^{m/n}$ for any natural $k$.
Everything rests on one fact: a positive number has exactly one positive $n$th root. Two different positive numbers can't have the same $n$th power: if $0 < u < v$, multiplying $n$ inequalities $u < v$ term by term (all sides are positive) gives $u^n < v^n$. The number $\sqrt[n]{a}$ is that one positive root.
By the power-of-a-power rule $\left(a^{1/n}\right)^n = a^{\frac1n \cdot n} = a^1 = a$. So $a^{1/n}$ is a positive number whose $n$th power is $a$, that is, $\sqrt[n]{a}$. Next, $a^{m/n} = \left(a^{1/n}\right)^m = \left(\sqrt[n]{a}\right)^m$ by the same rule. This number is positive, and its $n$th power is $\left(\left(\sqrt[n]{a}\right)^n\right)^m = a^m$, so it coincides with $\sqrt[n]{a^m}$. Finally, $a^{mk/(nk)} = \sqrt[nk]{a^{mk}}$ is the only positive number whose $nk$th power is $a^{mk}$. But the number $\sqrt[n]{a^m}$ is positive and $\left(\sqrt[n]{a^m}\right)^{nk} = \left(a^m\right)^k = a^{mk}$, so they are the same number.
Calculate $27^{-2/3}$.
The cube root of $27$ is $3$, two such steps give $3^2 = 9$, and the minus in the exponent turns it over: $27^{-2/3} = \frac{1}{\left(\sqrt[3]{27}\right)^2} = \frac19$.
It remains to fill the gaps between fractions. What is $2^{\sqrt2}$? The exponent $\sqrt2 = 1.41421\ldots$ is approximated by the fractions $1.4$, $1.41$, $1.414$, and the powers $2^{1.4} \approx 2.639$, $2^{1.41} \approx 2.657$, $2^{1.414} \approx 2.6647$ close in on one number, $2.66514\ldots$ That number is called $2^{\sqrt2}$. What "close in on a number" means precisely is explained in the chapter on limits; for now it's enough that between neighbouring fractional exponents the power changes smoothly, without jumps.
The function $y = a^x$, where $a > 0$ and $a \ne 1$, is called an exponential function. It's defined for all $x$, takes only positive values, increases when $a > 1$ and decreases when $0 < a < 1$.
When $a = 1$ the function is dull: $1^x = 1$ for every $x$, so this case is excluded. The graph of $y = 2^x$ passes through the point $(0, 1)$, hugs the $x$-axis on the left without ever touching it, and climbs ever more steeply on the right. Choose the "any" step on the ladder: the curve passes through all the steps at once. The base $\frac12$ has the same ladder, only turned round: $\left(\frac12\right)^x = 2^{-x}$.
The main heat
Now let's send the contestants out on the track. Take three: $x^2$, $x^{10}$ and $2^x$. The first two are power functions: the variable is in the base, and the exponent is fixed. The third is exponential: the variable has moved into the exponent. The difference is in one spot of the notation, but on the track these are different sports.
At $x = 1$ the score is $1 : 1 : 2$ in favour of the two. At $x = 10$ it's already $100$, $10^{10}$ and a miserable $1024$. At $x = 30$ the exponential function has passed a billion, $2^{30} \approx 1.07 \cdot 10^9$, but $x^{10}$ has gone off to $30^{10} \approx 5.9 \cdot 10^{14}$, half a million times further. The outcome seems clear.
The overtake happens at $x \approx 58.77$, when both functions reach about $5 \cdot 10^{17}$. After that $x^{10}$ can only watch it go: at $x = 70$ the two is ahead by a factor of four hundred, and at $x = 100$ by more than $10^{10}$.
The reason becomes clear if you watch not the values but by how much they're multiplied in one step. When $x$ increases by one, $2^x$ doubles, always, on any stretch of the track. And $x^{10}$ is multiplied by $\left(\frac{x+1}{x}\right)^{10}$. At $x = 1$ that's $2^{10} = 1024$, a huge spurt, but the factor melts away: at $x = 15$ it's about $1.907$, already less than two, and at $x = 30$ about $1.388$. The power function starts with spurts and runs out of breath; the exponential one runs at a steady pace, and that pace wins in the end.
For any $a > 1$ and any natural $k$ there is an $N$ such that $a^n > n^k$ for all natural $n \ge N$. Moreover, the ratio $\frac{a^n}{n^k}$ eventually exceeds any number chosen in advance.
The trick is to get rid of the power $k$. Take $b = \sqrt[k]{a}$; since $a > 1$, also $b > 1$ (otherwise $b^k = a$ wouldn't exceed one). By the rules for powers $\left(b^n\right)^k = \left(b^k\right)^n = a^n$, and positive numbers are ordered the same way as their $k$th powers (we saw this in the proof about roots). So $a^n > n^k$ if and only if $b^n > n$, and it's enough to prove that $b^n$ overtakes $n$.
Watch the ratio $s_n = \frac{b^n}{n}$. Going from $n$ to $n + 1$ multiplies it by $b \cdot \frac{n}{n+1}$. The second factor is less than one, but almost equal to it for large $n$. Take $c = \sqrt{b}$, also greater than one. When $n \ge \frac{1}{c - 1}$, we have $\frac{n+1}{n} = 1 + \frac1n \le c$, that is, $\frac{n}{n+1} \ge \frac1c$, and in one step the ratio grows by a factor of at least $b \cdot \frac1c = c$. Let $M$ be the first natural number from which this holds. Then $s_{M+j} \ge s_M \cdot c^j$.
It remains to make sure that $c^j$ grows without bound. Write $c = 1 + h$, where $h > 0$. Each multiplication by $1 + h$ adds $h(1 + h)^j$ to the number $(1+h)^j$, and that's at least $h$, because $(1+h)^j \ge 1$. Starting from $c^0 = 1$, after $j$ steps we get $c^j \ge 1 + jh$ (such step-by-step arguments are made rigorous by induction). For large $j$ the number $1 + jh$ is larger than any number chosen in advance, so $s_{M+j} \ge s_M(1 + jh)$ overtakes it too. From $M$ on, the ratio only grows, so once it exceeds one it stays above one: $b^n > n$, and with it $a^n > n^k$.
For non-integer $x$ the conclusion is the same. If $n \le x < n + 1$, then $a^x \ge a^n$ and $x^k < (n + 1)^k$, so $\frac{a^x}{x^k} > \frac{a^n}{(n+1)^k} = \frac1a \cdot \frac{a^{n+1}}{(n+1)^k}$, and this too grows without bound.
Any exponential function $a^x$ with $a > 1$ sooner or later overtakes any power function $x^k$ and never gives up the lead. What decides is not the spurt at the start but the pace: in each step the exponential function is multiplied by the same number, while the power function's factor melts down to one.
That's why "exponential" (the exponential function $e^x$ has a chapter of its own) in precise speech doesn't mean "very fast" but "growing by the same factor in equal times". The bacterium E. coli in ideal conditions divides about once every twenty minutes; in a day that's $72$ doublings, and one cell would produce $2^{72} \approx 4.7 \cdot 10^{21}$ descendants if growth didn't run into food and crowding. In 1975 Gordon Moore predicted that the number of transistors on a chip would double roughly every two years. The Intel 4004 processor (1971) had $2300$; half a century is $25$ doublings, $2300 \cdot 2^{25} \approx 7.7 \cdot 10^{10}$, and today's processors in computers and phones really do have tens of billions.
Duckweed on a pond doubles its area every day and covers the whole pond in $30$ days. How many days did it take to cover half the pond?
A day after "half", the duckweed doubles and covers the whole pond, so half was on day $29$. A quarter of the pond on day $28$, an eighth on day $27$. Five days before the end the duckweed covers only $\frac{1}{32}$ of the pond, about three per cent, and looks completely harmless.
The reverse question: the logarithm
Back to the legend's second question. How many times do you have to double one to get a million? We know that $2^{19} = 524{,}288$ is a bit short and $2^{20} = 1{,}048{,}576$ is already more. The exact answer, the number $x$ for which $2^x = 1{,}000{,}000$, lies between $19$ and $20$. This number has a name.
The logarithm of a number $b$ to the base $a$ is the exponent to which $a$ must be raised to get $b$. It's written $\log_a b$. Here $a > 0$, $a \ne 1$ and $b > 0$.
The definition quietly assumes that such an exponent exists, and only one.
If $a > 0$, $a \ne 1$ and $b > 0$, there is exactly one number $c$ for which $a^c = b$.
Uniqueness. Let $a > 1$ and $c < d$. Then $a^d = a^c \cdot a^{d-c}$, and $a^{d-c} > 1$ because the base is greater than one and the exponent positive. So $a^d > a^c$: different exponents give different values, and the equation $a^c = b$ can't have two solutions. When $0 < a < 1$ the argument is the same, only the function decreases.
We'll show existence with the example $a = 2$, $b = 10^6$; the general case is the same. The whole powers of two go up as far as you like (we proved this in the race), and down as close to zero as you like, so there's an integer $k$ with $2^k \le b < 2^{k+1}$: here $2^{19} \le 10^6 < 2^{20}$, and $c$ starts with $19$. Testing $2^{19.1}, 2^{19.2}, \ldots$, we find the tenths: $2^{19.9} \le 10^6 < 2^{20.0}$. Then the hundredths, the thousandths and so on. The digits make up an infinite decimal $c = 19.93\ldots$, and the powers of its approximations squeeze $b$ ever more tightly. That $2^c$ is then exactly equal to $b$ follows from the fact that the number line has no "holes"; this property of the real numbers is treated rigorously in the chapter on limits.
The logarithm and the power undo each other, as subtraction undoes addition: $a^{\log_a b} = b$ and $\log_a a^c = c$. Two values are easy to remember: $\log_a 1 = 0$ (zero steps) and $\log_a a = 1$ (one step).
Now it's clear what the paper was computing. For the stack to reach the Moon we need $0.1 \cdot 2^n \text{ mm} \ge 3.844 \cdot 10^{8}$ m, that is, $2^n \ge 3.844 \cdot 10^{12}$, and this means $n \ge \log_2 \left(3.844 \cdot 10^{12}\right) \approx 41.8$. Forty-one folds aren't enough, forty-two are. Tap any landmark in the folding widget and it will compute such a logarithm.
Find $\log_4 32$.
Write both numbers as powers of two: $4 = 2^2$, $32 = 2^5$. We're looking for $x$ with $4^x = 32$, that is, $2^{2x} = 2^5$. Hence $2x = 5$ and $x = \frac52$. Check: $4^{5/2} = \left(\sqrt4\right)^5 = 2^5 = 32$.
Two bases come up so often that they've got their own symbols.
The common logarithm is the logarithm to base $10$. Many books write it as $\log b$; in this course we write $\lg b$, as recommended by the international standard ISO 80000. For numbers of the form $10^k$ it equals $k$ and simply counts the zeros: $\lg 1000 = 3$, $\lg 0.001 = -3$. For other numbers it tells you how many digits they have: for all numbers from $100$ to $999$ the common logarithm lies between $2$ and $3$.
The natural logarithm is the logarithm to base $e = 2.71828\ldots$, written $\ln b$. Why such a strange number is chosen as the base and what makes this logarithm more natural than the others is explained in the chapter on the number $e$. In short: with base $e$ the formulas of calculus look simplest, much as the radian does among units of angle.
In the chapter on primes we used the fact that $\ln x \approx 2.3k$ for $x = 10^k$. Now this can be explained: $\ln 10^k = k \ln 10$, and $\ln 10 \approx 2.303$.
The function $y = \log_2 x$ answers the question reverse to $y = 2^x$, so its graph is the reflection of the graph of $2^x$ in the line $y = x$, as with any inverse function. It passes through the points $(1, 0)$, $(2, 1)$, $(4, 2)$, $(1024, 10)$ and grows astonishingly slowly: for the logarithm to go up by one, the argument has to double. The binary logarithm of a million is less than twenty, of a billion less than thirty. The exponential function was the fastest in the race; the logarithm is the slowest of all the runners we know, although it too eventually reaches any height.
How to multiply by adding
A logarithm is an exponent, and when powers are multiplied the exponents add. So the logarithm must turn multiplication into addition.
Together with two related rules this is the main theorem about logarithms.
Let $a > 0$, $a \ne 1$, let $x$ and $y$ be positive, and let $k$ be any number. Then
$$\begin{gathered} \log_a (xy) = \log_a x + \log_a y, \\ \log_a \frac xy = \log_a x - \log_a y, \\ \log_a x^k = k \log_a x. \end{gathered}$$The trick is to give the logarithms letters and go back to powers, for which the rules are already proved. Let $m = \log_a x$ and $n = \log_a y$. By the definition of the logarithm this means $x = a^m$ and $y = a^n$.
Then $xy = a^m a^n = a^{m+n}$ by the product rule for powers. So $m + n$ is the exponent to which $a$ must be raised to get $xy$, that is, $\log_a(xy) = m + n$. Likewise $\frac xy = \frac{a^m}{a^n} = a^{m-n}$, and $\log_a \frac xy = m - n$. Finally, $x^k = (a^m)^k = a^{mk}$ by the power-of-a-power rule, and $\log_a x^k = km$.
We're using the rules for powers with arbitrary exponents, but we proved them for rational ones. They carry over to the rest because $a^x$ for irrational $x$ is defined through rational approximations and changes smoothly; this is done carefully in the chapter on the number $e$.
For example, $\lg 2^{100} = 100 \lg 2$, and $\log_2 \frac{1}{32} = \log_2 1 - \log_2 32 = -5$.
What is $\lg 2 + \lg 5$?
$\lg 2 + \lg 5 = \lg (2 \cdot 5) = \lg 10 = 1$. Check with a table: $\lg 2 \approx 0.301$, $\lg 5 \approx 0.699$, adding up to $1.000$.
In 1614 the Scottish laird John Napier turned this idea into a tool. His book A Description of the Wonderful Table of Logarithms contained numbers that reduced multiplying long numbers to addition: look up the logarithms of the factors in the table, add them, and find the number whose logarithm is the sum. Napier made up the word itself from the Greek logos (ratio) and arithmos (number). His logarithms weren't quite like today's: for Napier it was the logarithm of $10{,}000{,}000$ that equalled zero.
Henry Briggs, a professor of geometry in London, read the book and in 1615 travelled to see Napier in Edinburgh. They agreed on the main thing: let the logarithm of one be zero and the logarithm of ten be one. That's how common logarithms appeared. Napier died in 1617, and in the same year Briggs published the common logarithms of the numbers from $1$ to $1000$, and in 1624, in his Arithmetica Logarithmica, of the numbers from $1$ to $20{,}000$ and from $90{,}000$ to $100{,}000$, to fourteen decimal places. The Swiss clockmaker Jost Bürgi invented logarithms independently of Napier, but published his tables only in 1620.
The tables gave common logarithms. What if you need a binary one, like $\log_2 10^6$ from the legend? Another theorem comes to the rescue.
If $a$ and $c$ are positive and not equal to one, and $x > 0$, then $\log_a x = \dfrac{\log_c x}{\log_c a}$.
The idea: write $x$ as a power of $a$ and look at this through the logarithm to base $c$. By the definition of the logarithm $x = a^{\log_a x}$. Take the logarithm to base $c$ of both sides and apply the third rule for logarithms (the exponent comes out as a factor): $\log_c x = \log_a x \cdot \log_c a$. The number $\log_c a$ isn't zero: only the logarithm of one is zero, and $a \ne 1$. Dividing by it gives the formula.
Most often $c$ is taken to be the natural or the common base, because those are the ones on a calculator.
Logarithms can be not only added on paper but laid off as lengths. In 1620 the Englishman Edmund Gunter marked a rule with a scale on which the number $x$ stands at a distance proportional to $\lg x$; lengths were added with dividers. Soon William Oughtred thought of putting two such scales side by side and sliding one along the other. So the slide rule appeared in the 1620s. Engineers calculated with it for more than three hundred years, until the pocket calculators of the 1970s; one slide rule flew to the Moon with Buzz Aldrin.
The rule adds segments of length $\lg a$ and $\lg b$ and gets a segment of length $\lg a + \lg b = \lg ab$, at the end of which stands the number $ab$. It gives three significant figures easily; the fourth has to be guessed. The rule doesn't know where the decimal point goes: $2 \times 3$ and $200 \times 0.03$ look the same on it, and the engineer kept the size of the answer in their head. That's the exponent of scientific notation; the rule computed only the first factor $a$.
Scales that squeeze billions
The ear hears both a whisper and the roar of a jet engine, and the power of these sounds differs by more than a billion times. The eye works both at noon and under the stars. The senses respond to ratios rather than differences: doubling feels about the same for a quiet sound as for a loud one. That's why scales for such quantities are built on logarithms.
A logarithmic scale is a scale on which each quantity stands at a distance proportional to its logarithm. Equal distances on it mean not equal differences but equal ratios.
The folding widget had such a scale: each fold raised the stack by the same height, $\lg 2 \approx 0.3$ of a division. And in the race, on the logarithmic scale the graph of $2^x$ became a straight line: $\lg 2^x = x \lg 2$, and that's a linear function of $x$.
The best-known logarithmic scale is the scale of loudness.
Other scales work in a similar way. The magnitude of earthquakes was proposed in 1935 by Charles Richter: one unit of magnitude means a swing on the seismogram, recorded at the same distance, $10$ times larger, and roughly $10^{1.5} \approx 31.6$ times more energy released. Today the refined moment magnitude is used, but the unit means the same. Stellar magnitudes go back to the ancient Greeks, who divided stars into six classes by brightness; in 1856 Norman Pogson proposed that five magnitudes should be exactly $100$ times in brightness, so that one magnitude is a factor of $\sqrt[5]{100} \approx 2.512$; the larger the magnitude, the dimmer the star. The pH value, introduced by the Danish chemist Søren Sørensen in 1909, is minus the common logarithm of the concentration of hydrogen ions. Pure water has $\text{pH} = 7$, lemon juice about $2$: it has roughly $10^5$ times more hydrogen ions.
Compared with a magnitude $6$ earthquake, a magnitude $8$ earthquake releases roughly how many times more energy?
Each unit of magnitude is about $10^{1.5}$ times in energy. Two units are $10^{1.5 \cdot 2} = 10^3 = 1000$ times.
Taming giants
Logarithms are still needed where numbers are too large to write out. How many digits does $2^{64}$ have? The common logarithm tells you at once.
The decimal representation of a natural number $N$ has exactly $\lfloor \lg N \rfloor + 1$ digits, where $\lfloor t \rfloor$ is the integer part of $t$, the largest integer not exceeding $t$.
Let $N$ have exactly $d$ digits. The smallest $d$-digit number is $10^{d-1}$ (a one and $d - 1$ zeros), the largest is $10^d - 1$ (all nines). So $10^{d-1} \le N < 10^d$. The common logarithm is increasing, so $d - 1 \le \lg N < d$. So $d - 1$ is the integer part of $\lg N$, and $d = \lfloor \lg N \rfloor + 1$.
For $2^{64}$ we find $\lg 2^{64} = 64 \lg 2 \approx 19.27$: the integer part is $19$, so there are $20$ digits. And so there are: $2^{64} = 18{,}446{,}744{,}073{,}709{,}551{,}616$.
The same calculation works for numbers that can never be written out. The largest known prime, found in 2024, is $2^{136{,}279{,}841} - 1$ (the chapter on primes told its story). Its common logarithm is about $136{,}279{,}841 \cdot 0.30103 \approx 41{,}024{,}319.9$. So it has $41{,}024{,}320$ digits: printing it in an ordinary font would take about ten thousand pages. The logarithm even hints at how the number begins: the fractional part $0.103$ of the logarithm of $2^{100}$ means that $2^{100} = 10^{0.103} \cdot 10^{30} \approx 1.27 \cdot 10^{30}$.
How many digits does the decimal representation of $2^{100}$ have? Take $\lg 2 \approx 0.30103$.
$\lg 2^{100} = 100 \lg 2 \approx 30.103$. So $10^{30} < 2^{100} < 10^{31}$: the number is larger than a one followed by thirty zeros, which has $31$ digits, but smaller than the next power of ten. It has $31$ digits: $2^{100} = 1{,}267{,}650{,}600{,}228{,}229{,}401{,}496{,}703{,}205{,}376$.
The reverse question "how many times" comes up with money too. A deposit at $7\%$ a year is multiplied by $1.07$ every year. When will it double? We need to solve $1.07^n = 2$, that is, find $n = \log_{1.07} 2 = \frac{\ln 2}{\ln 1.07} \approx 10.2$ years. Financiers estimate this with the "rule of 70": $70 : 7 = 10$ years. It works because $\ln 2 \approx 0.693$, and $\ln(1 + p) \approx p$ for small $p$.
Equations where the unknown is in the exponent or under a logarithm are solved with the same two moves. If both sides can be written as powers of the same base, compare the exponents: $4^x = 32$ becomes $2^{2x} = 2^5$, and $x = \frac52$. If not, take a logarithm: from $3^x = 20$ we get $x = \log_3 20 = \frac{\ln 20}{\ln 3} \approx 2.727$. In logarithmic equations the logarithm is removed, but then the roots must be checked: what's under a logarithm must be positive.
An example with a trap
Let's solve $\lg x + \lg(x - 3) = 1$. A sum of logarithms is the logarithm of a product: $\lg\bigl(x(x - 3)\bigr) = 1$, so $x(x - 3) = 10$, that is, $x^2 - 3x - 10 = 0$. The roots of this quadratic equation are $5$ and $-2$. But at $x = -2$ the original equation contains $\lg(-2)$, which doesn't exist. The root $-2$ appeared when we replaced $\lg x + \lg(x - 3)$ with $\lg\bigl(x(x-3)\bigr)$: the product is positive also when both factors are negative. Answer: $x = 5$. Check: $\lg 5 + \lg 2 = \lg 10 = 1$.
The trainer has three levels: powers with any exponents, values of logarithms and, finally, the rules for logarithms together with simple equations.
The solver will take apart an exponential or logarithmic equation of your own step by step, and all the course's trainers are collected on the practice page.
Where next
We never explained the number the chapter began with. The board holds $1 + 2 + 4 + \dots + 2^{63}$ grains, and we took it on trust that this is $2^{64} - 1$. The first squares are easy to check: $1 = 2 - 1$, $1 + 2 = 4 - 1$, $1 + 2 + 4 = 8 - 1$. But chapter 0 taught us not to trust a pattern checked in a few cases. In the pay problem there were thirty terms, on the board sixty-four, and there can be a million. A sum of a hundred terms that follow a rule takes a second to compute if you find a rule for the sum. How do you add $1 + 2 + 3 + \dots + 100$ without adding? And how can you be sure a formula is true for all $n$ at once, not just the ones we had time to check? That's the job of the chapter on sequences and induction.