Skip to content

1.4 — Powers, Roots and Logarithms

Fold a sheet of paper in half. Fold it again, and again. After each fold the thickness doubles. Paper is about 0.1\ \text{mm} thick, so after 10 folds it is about 10\ \text{cm}, after 20 folds about 100\ \text{m}, and after 42 folds it would reach the Moon. Nobody believes this the first time they hear it, and the disbelief is the point: human intuition is built for addition and fails completely at repeated multiplication.

This chapter is about repeated multiplication, its two inverses, and why one of those inverses — the logarithm — is the tool that lets us handle numbers spanning the whole range from an atom to a galaxy.

1. Powers: what the notation means

a^n = \underbrace{a \times a \times \cdots \times a}_{n \text{ times}}

a is the base, n is the exponent (also called the index or power). 2^5 = 2\times2\times2\times2\times2 = 32. Read aloud: "two to the fifth", or "two to the power five".

The two small cases have their own names for historical reasons: a^2 is "a squared" because it is the area of a square with side a, and a^3 is "a cubed" because it is the volume of a cube with side a. Those names come from geometry and are the reason powers above three had no name — the Greeks could not picture a fourth dimension and therefore had no word for it.

The three laws, and why they are true

Everything about exponents follows from counting how many factors you have.

Multiplying adds the exponents.

a^m \times a^n = a^{m+n}

Because a^3 \times a^2 = (a \cdot a \cdot a)(a \cdot a), which is five copies of a. You are just pooling two piles of factors.

Dividing subtracts the exponents.

\frac{a^m}{a^n} = a^{m-n}

Because \frac{a^5}{a^2} = \frac{a \cdot a \cdot a \cdot a \cdot a}{a \cdot a} and two factors cancel top and bottom, leaving three.

A power of a power multiplies the exponents.

(a^m)^n = a^{mn}

Because (a^3)^2 = a^3 \times a^3, which is six copies.

Extending to zero, negatives and fractions

Notice something about that division law: it forces our hand.

Why a^0 = 1. Take m = n. Then \frac{a^n}{a^n} = a^{n-n} = a^0. But any nonzero thing divided by itself is 1. So a^0 must be 1, for every a \neq 0. It is not a convention someone chose; it is the only value that keeps the division law true. (The expression 0^0 is left undefined for the same kind of reason 0 \div 0 was in Chapter 1.2 — different lines of argument demand different answers.)

Why a^{-n} = \frac{1}{a^n}. Take m = 0. Then \frac{a^0}{a^n} = a^{0-n} = a^{-n}, and the left side is \frac{1}{a^n}. So a negative exponent means "reciprocal", not "negative number". 2^{-3} = \frac{1}{8}, which is positive.

Why a^{1/2} = \sqrt{a}. Take the power-of-a-power law: (a^{1/2})^2 = a^{(1/2) \times 2} = a^1 = a. So a^{1/2} is the thing which, squared, gives a — and that is precisely the definition of a square root. Likewise a^{1/3} is the cube root, and in general:

a^{m/n} = \sqrt[n]{a^m}

This is the pattern to notice, and it recurs throughout mathematics. We defined a^n only for counting numbers, since "multiply a by itself n times" is meaningless when n is 0, or -3, or \frac{1}{2}. But the laws the definition obeys still make sense for those values, so we extend the definition by demanding that the laws keep holding. There is exactly one way to do it, and the result is forced, not chosen. You will see this move again with factorials, with matrix powers, and most spectacularly in Chapter 2.5 when i^2 = -1 leads to e^{i\pi} = -1.

2. Roots, and the two answers problem

The square root of a is the number whose square is a. But 3^2 = 9 and (-3)^2 = 9, so nine has two square roots.

The convention: the symbol \sqrt{\;} means the non-negative one, called the principal root. So \sqrt{9} = 3, always. If you want both, you write \pm\sqrt{9}.

This is why the quadratic formula in Chapter 2.3 carries a \pm — it is putting back the root the symbol suppressed. And it is why \sqrt{x^2} = |x| rather than x: if x = -5, then \sqrt{x^2} = \sqrt{25} = 5 = |-5|. Absolute value from Chapter 1.2, showing up where you did not expect it.

Cube roots have no such problem, because a negative cubed is negative: \sqrt[3]{-8} = -2, cleanly and uniquely.

What no real number can do is square to a negative, since positives and negatives both square to positives. \sqrt{-1} has no answer among the reals — which is the last unclosed hole in our number system, and Chapter 2.5 fills it.

3. Exponential growth: why it beats everything

Compare two functions as n grows:

nn^2 (polynomial)2^n (exponential)
52532
101001,024
204001,048,576
502,500about 1.1 \times 10^{15}
10010,000about 1.3 \times 10^{30}

At n = 5 they are comparable. At n = 100 the exponential is larger by a factor with twenty-six zeros in it.

Exponential growth always wins eventually, no matter how large the polynomial's power. 2^n overtakes n^{100} — it just takes longer to do it. This single fact is why Volume I, 1.7 treats problems requiring exponential time as effectively unsolvable at scale, why compound interest is called the eighth wonder, and why an epidemic that doubles weekly is an emergency in month three and not in week two.

The reverse is exponential decay, where the base is between 0 and 1: (\frac{1}{2})^n halves each step, and the time to halve is the half-life. Radioactive material, a drug clearing your bloodstream, a hot cup of tea, the charge leaking off a capacitor — all the same shape, and Chapter 6.1 shows they are all the same differential equation.

Graph of the exponential function, rising slowly then steeply
The exponential curve. Its defining feature is not steepness but self-similarity: every fixed step to the right multiplies the height by the same factor, so the curve looks the same shape at every scale. Image: Wikimedia Commons.

4. The logarithm: asking the exponent question

Powers ask "I have the base and the exponent, what is the result?" There are two ways to run that backwards.

  • Fix the exponent, ask for the base: x^3 = 8. That is a root. x = \sqrt[3]{8} = 2.
  • Fix the base, ask for the exponent: 2^x = 8. That is a logarithm. x = \log_2 8 = 3.

So:

\log_b a = c \quad\text{means exactly}\quad b^c = a

Read \log_2 8 = 3 aloud as "log base two of eight is three", and hear it as the sentence: "the power you must raise 2 to, in order to get 8, is 3." Say that sentence to yourself every time you see a logarithm for the next month and the mystery evaporates. A logarithm is not a strange operation. It is the answer to a "what power?" question.

A few by inspection:

\log_{10} 1000 = 3, \qquad \log_2 1024 = 10, \qquad \log_5 25 = 2, \qquad \log_b 1 = 0 \text{ for any } b

That last one is b^0 = 1 from Section 1, read backwards.

Logarithms of zero and of negatives do not exist (among the reals), because no power of a positive base ever produces zero or a negative. 2^x gets tiny as x goes very negative but never reaches zero.

The three logarithm laws, which are the three power laws in disguise

\log(xy) = \log x + \log y

\log\!\left(\frac{x}{y}\right) = \log x - \log y

\log(x^n) = n \log x

Every one of these is a power law read backwards. The first, for instance, is just b^m \times b^n = b^{m+n} with the exponents named.

And the first law is the reason logarithms were invented. John Napier published them in 1614 for one purpose: to turn multiplication into addition. Astronomers and navigators were multiplying seven-digit numbers by hand, a slow and error-prone job. With a table of logarithms you look up two numbers, add them, and look the answer back up. Laplace said logarithms, "by shortening the labours, doubled the life of the astronomer".

A pocket slide rule with several logarithmic scales
A slide rule: two logarithmic scales that slide past each other. Sliding adds lengths, and because position along the scale is the logarithm of the number printed there, adding lengths multiplies the numbers. Every engineer built every bridge and aircraft with one of these until pocket calculators arrived around 1974. Image: Wikimedia Commons.

The relationship between a power and a logarithm is easiest to believe as a picture, so here are both curves at once with the base under your control.

The blue curve raises b to the power x; the green curve is its logarithm. Fold the page along the dashed line and the two land exactly on top of each other, because each undoes the other. Raising the base makes the exponential shoot up sooner and flattens the logarithm, since a bigger base needs a smaller exponent to reach the same height.Drag the sliders; hover the curve to read exact values.

Notice what the green curve does near zero: it plunges without limit and never touches the vertical axis, which is the picture of the fact that no power of b can ever produce zero.

5. The three bases you will meet

Base 10, the common logarithm, written \log_{10} or often just \log in engineering. Natural when you care about digits and orders of magnitude, because \log_{10} of a number is roughly its number of digits minus one.

Base 2, the binary logarithm, written \log_2 or \lg. Natural whenever something halves or doubles — binary search, tree heights, bits of information. Volume I, 1.8 defines information in bits precisely because \log_2 counts yes/no questions.

Base e, the natural logarithm, written \ln. Here e \approx 2.71828\ldots, an irrational number like \pi. It looks like the least natural base of the three, and it is in fact the most important one, for a reason that only becomes visible in calculus: e^x is the one function that is its own rate of change. Chapter 5.3 proves that. Until then, take e as the number that makes continuous growth come out clean.

Where e comes from, concretely: put ₹1 in a bank at 100\% interest for a year. Paid once, you get ₹2. Paid twice at 50\% each, you get (1 + \frac{1}{2})^2 = 2.25 rupees. Paid monthly, (1 + \frac{1}{12})^{12} = 2.613 rupees. Daily, ₹2.7146. Continuously — compounded every instant — the amount converges to:

e = \lim_{n \to \infty}\left(1 + \frac{1}{n}\right)^n = 2.718281828\ldots

It converges rather than exploding, which is not obvious and is worth pausing on: compounding more often does help, but with rapidly diminishing returns.

Changing base

Any log can be converted to any other:

\log_b a = \frac{\log_c a}{\log_c b}

So \log_2 100 = \frac{\ln 100}{\ln 2} = \frac{4.605}{0.693} = 6.64. Since the conversion is multiplication by a constant, all logarithms have the same shape and differ only by a vertical stretch. This is why Volume I, 4.1 writes O(\log n) without naming a base — a constant factor is invisible to big-O notation.

Graphs of logarithms to base 2, e and 10 on the same axes
Logarithms to three bases. All pass through (1, 0), all rise forever but ever more slowly, and all are stretched copies of one another. The flatness on the right is the whole point: a logarithm turns huge ranges into small ones. Image: Wikimedia Commons.

6. Why logarithmic scales are everywhere

The human ear responds to sound over a range of about a trillion to one in intensity. A graph with a linear axis cannot show that; the quiet sounds would be an invisible smear at the bottom. So we plot the logarithm instead, and the trillion-to-one range becomes a comfortable 0 to 120.

That is the decibel. And once you know it is a logarithm, its odd behaviour becomes obvious:

  • +10\ \text{dB} is ten times the power, not ten more.
  • +3\ \text{dB} is roughly double the power, because \log_{10} 2 \approx 0.3.
  • Two sources of 60\ \text{dB} each do not make 120\ \text{dB}; they make about 63\ \text{dB}.

The same reasoning explains the other famous logarithmic scales.

The Richter and moment-magnitude scales for earthquakes: each whole number is ten times the amplitude and about thirty-two times the energy. A magnitude 7 is not "a bit worse" than a magnitude 6; it releases about thirty-two times more energy.

pH in chemistry is -\log_{10} of the hydrogen ion concentration. pH 4 is ten times more acidic than pH 5.

Stellar magnitude in astronomy, which is over two thousand years old and runs backwards (smaller is brighter) because Hipparchus ranked stars by eye into first through sixth class before anyone knew what brightness was.

Musical pitch. An octave is a doubling of frequency. Because we hear ratios rather than differences, the piano keyboard is a logarithmic instrument: equal steps in position are equal ratios in frequency.

The common thread: we perceive many things by ratio rather than by difference, and a logarithm is precisely the function that turns ratios into differences.

7. Worked examples

How many digits does 2^{100} have?

The number of digits of N is \lfloor \log_{10} N \rfloor + 1, where the floor brackets mean "round down". So:

\log_{10} 2^{100} = 100 \log_{10} 2 = 100 \times 0.30103 = 30.103

Round down to 30, add one: 31 digits. We now know its size without ever computing it.

Where the rule of 72 comes from. Money doubles when (1+r)^n = 2. Take natural logs of both sides:

n \ln(1+r) = \ln 2 \quad\Rightarrow\quad n = \frac{\ln 2}{\ln(1+r)}

For small r, \ln(1+r) \approx r — a fact Chapter 5.8 proves with Taylor series. So n \approx \frac{0.693}{r}. Writing r as a percentage p, that is n \approx \frac{69.3}{p}. The books say 72 because it is close enough and divides by far more numbers, making mental arithmetic easy.

How many times can you halve a million before reaching one? That is \log_2 1{,}000{,}000 = \frac{\ln 10^6}{\ln 2} \approx \frac{13.8}{0.693} \approx 20. Which is exactly why a binary search through a million sorted records takes about twenty comparisons (Volume I, 4.8), and why a balanced tree over a million rows is twenty levels deep.

8. Scientific notation, which is powers doing housekeeping

Writing the mass of an electron as 0.000000000000000000000000000000911\ \text{kg} is unreadable and unwriteable. Scientific notation fixes it: one digit before the point, times a power of ten.

9.11 \times 10^{-31}\ \text{kg}

The exponent is the order of magnitude, and comparing two quantities becomes comparing two exponents. The Sun's mass is 2 \times 10^{30}\ \text{kg}; an electron is 9.11 \times 10^{-31}\ \text{kg}; the ratio is about 10^{61}, computed by subtracting exponents and barely thinking.

This is why physicists and engineers talk in orders of magnitude. Volume I, 10.12 uses exactly this habit to estimate system capacity: get the power of ten right first, worry about the leading digit later.

Every formula above, built from scratch

None of the results in this chapter are worth memorising, because each one can be rebuilt in under a minute from something simpler. What follows is that rebuilding, one result at a time, so the formula and the reason for it sit on the same page as the explanation that needed them.

Powers

Everything about powers follows from one sentence: a^n means n copies of a multiplied together. Every law below is that sentence, counted carefully.

The product law

a^m \times a^n = a^{m+n}

Where it comes from. a^m is m copies of a. a^n is n copies. Write them side by side and you are looking at m+n copies:

\underbrace{a \cdot a \cdots a}_{m} \times \underbrace{a \cdot a \cdots a}_{n} = \underbrace{a \cdot a \cdots a}_{m+n}

That is the entire proof. Multiplying powers adds the exponents because you are pushing two piles of copies into one pile.

The quotient law

\frac{a^m}{a^n} = a^{m-n}

Where it comes from. Write out m copies on top and n underneath. Each copy below cancels one copy above:

\frac{a \cdot a \cdot a \cdot a \cdot a}{a \cdot a} = a \cdot a \cdot a = a^{5-2}

n cancellations leave m - n copies standing.

The power-of-a-power law

(a^m)^n = a^{mn}

Where it comes from. (a^m)^n means n copies of the block a^m. Each block holds m copies of a, so altogether there are n lots of m copies, which is mn copies.

Why a^0 = 1, and why it is not a choice

School often states this as a rule to accept. It is not a rule; it is forced. Put m = n into the quotient law:

a^0 = a^{m-m} = \frac{a^m}{a^m} = 1 \qquad (a \neq 0)

Any non-zero number divided by itself is 1. So if the quotient law is to keep working, a^0 has no choice but to be 1. Mathematics did not decide this; it discovered that any other value breaks arithmetic.

Why a negative exponent flips the number

a^{-n} = \frac{1}{a^n}

Where it comes from. Same move, one step further. By the quotient law with m = 0:

a^{-n} = a^{0-n} = \frac{a^0}{a^n} = \frac{1}{a^n}

So 2^{-3} = \frac{1}{8}. A negative exponent is not "a negative answer" — 2^{-3} is positive. It is a division instruction. Going up an exponent multiplies by a; going down divides by a; and the pattern 8, 4, 2, 1, \tfrac12, \tfrac14 simply keeps halving as the exponent passes through zero into the negatives.

Why a fractional exponent is a root

a^{1/n} = \sqrt[n]{a}, \qquad a^{m/n} = \sqrt[n]{a^m} = \left(\sqrt[n]{a}\right)^m

Where it comes from. Ask what a^{1/2} must be if the power-of-a-power law is to survive:

\left(a^{1/2}\right)^2 = a^{\frac12 \times 2} = a^1 = a

So a^{1/2} is the thing that gives a when squared, which is exactly the definition of \sqrt{a}. Same argument with n: \left(a^{1/n}\right)^n = a, so a^{1/n} is the n-th root. The mixed case a^{m/n} then follows by splitting \frac{m}{n} as m \times \frac{1}{n}.

A worked case. 8^{2/3}. Take the cube root first because the numbers stay small: \sqrt[3]{8} = 2, then square it: 4. Going the other way gives the same answer with more work: 8^2 = 64, and \sqrt[3]{64} = 4.

The two laws that spread a power across a product

(ab)^n = a^n b^n, \qquad \left(\frac{a}{b}\right)^n = \frac{a^n}{b^n}

Where it comes from. (ab)^n is n copies of ab. Multiplication does not care about order, so gather all the a's together and all the b's together: (ab)(ab)(ab) = (aaa)(bbb).

The trap. There is no such law for sums. (a+b)^2 is not a^2 + b^2. Test it: (3+4)^2 = 49, but 9 + 16 = 25. The real expansion, proved in 2.1 — what algebra is, is a^2 + 2ab + b^2, and the missing 2ab = 24 is exactly the gap.

Logarithms

A logarithm answers one question: what exponent do I need? Written out:

\log_b x = y \quad \text{means exactly} \quad b^y = x

Read it aloud. "Log base b of x equals y" means "b raised to the power y gives x."

Because a logarithm is an exponent, every law of logarithms is a law of exponents wearing different clothes. Here is the translation, done properly once.

The product law

\log_b(xy) = \log_b x + \log_b y

Where it comes from. Let m = \log_b x and n = \log_b y. By the definition, that means x = b^m and y = b^n. Multiply them:

xy = b^m \times b^n = b^{m+n}

Now read that last line back through the definition of a logarithm: the exponent that turns b into xy is m + n. That is precisely \log_b(xy) = m + n = \log_b x + \log_b y.

This one law is why logarithms were invented. John Napier published them in 1614 so that astronomers, who spent their lives multiplying six-digit numbers by hand, could add instead. A table of logarithms turned a day of multiplication into an hour of addition. Slide rules, which put the same idea on a stick, flew people to the Moon.

The quotient and power laws

\log_b\left(\frac{x}{y}\right) = \log_b x - \log_b y, \qquad \log_b(x^p) = p\log_b x

Where they come from. Same substitution. With x = b^m and y = b^n:

\frac{x}{y} = \frac{b^m}{b^n} = b^{m-n} \quad \Rightarrow \quad \log_b\left(\frac{x}{y}\right) = m - n

And for the power law, x^p = (b^m)^p = b^{mp}, so the exponent needed is mp, giving \log_b(x^p) = pm = p\log_b x.

The power law is the one that does real work. It is how you solve for an unknown sitting up in an exponent, which is where compound interest, radioactive decay and population growth all put it.

Change of base

\log_b x = \frac{\log_c x}{\log_c b}

Read it aloud. "Log base b of x is log base c of x, divided by log base c of b" — and c can be any base you happen to have, which in practice means base 10 or base e, because those are the buttons on the calculator.

Where it comes from. Let y = \log_b x, so b^y = x. Take \log_c of both sides — legal, because if two things are equal then their logarithms are equal:

\log_c(b^y) = \log_c x

Apply the power law to the left side:

y \log_c b = \log_c x

Divide by \log_c b:

y = \frac{\log_c x}{\log_c b}

A worked case. \log_2 1000, with only a base-10 button available: \frac{\log_{10} 1000}{\log_{10} 2} = \frac{3}{0.30103} = 9.966. Sanity check: 2^{10} = 1024, just above 1000, so the answer should be a shade under 10. It is.

Two consequences worth having ready

\log_b 1 = 0 \quad \text{(because } b^0 = 1\text{)}, \qquad \log_b b = 1 \quad \text{(because } b^1 = b\text{)}

b^{\log_b x} = x \quad \text{and} \quad \log_b(b^x) = x

The last pair says the two operations undo each other, which is the formal way of saying a logarithm is the inverse of an exponential. Everything in the picture below follows from that.

The blue curve is b to the power x; the green curve is its logarithm. Fold the page along the dashed line y = x and the two land exactly on top of each other, because each undoes the other. Notice what the slider does: raising the base makes the exponential shoot up sooner and flattens the logarithm, since a bigger base needs a smaller exponent to reach the same height.Drag the sliders; hover the curve to read exact values.

The rule of 72, derived rather than quoted

Money at r percent a year doubles in roughly \frac{72}{r} years. Where does 72 come from?

Start with what "doubles" means. After t years, a sum multiplied by (1 + r/100) each year has grown by the factor (1 + r/100)^t, and doubling means:

\left(1 + \frac{r}{100}\right)^t = 2

Take the natural logarithm of both sides and use the power law:

t \ln\left(1 + \frac{r}{100}\right) = \ln 2 \quad \Rightarrow \quad t = \frac{\ln 2}{\ln(1 + r/100)}

Now the approximation. For small x, \ln(1+x) \approx x — a fact proved properly in 5.8, and visible here in the fact that \ln(1.05) = 0.0488, which is within 3% of 0.05. Using it:

t \approx \frac{0.693}{r/100} = \frac{69.3}{r}

So the honest constant is 69.3. It becomes 72 for two reasons, one mathematical and one human. Mathematically, \ln(1+x) is a little smaller than x, so the true t is a little larger than 69.3/r, and 72 corrects for that in the range of interest rates people actually meet. Humanly, 72 divides evenly by 2, 3, 4, 6, 8, 9 and 12, so you can do it in your head. At 8%, money doubles in 9 years; the exact answer is 9.006 years.

9. Where this shows up in your life

Your savings and your loans. Compound interest is P(1+r)^n; the rule of 72 tells you the doubling time in your head.

Your volume knob. It is logarithmic, because your hearing is. A linear knob would do nothing for the first three quarters of its travel and then blast you.

Your camera. Each f-stop is a factor of \sqrt{2} in aperture, so a factor of 2 in light. Each ISO doubling is one stop. Photography's entire exposure system is base-2 logarithms with a different vocabulary.

Every performance conversation about software. "This is O(\log n)" means doubling the data adds one step. "This is O(2^n)" means adding one item doubles the time — the paper-folding disaster.

Every earthquake, pandemic or viral-spread headline. Doubling times and log scales, and the reason the graphs looked so strange in 2020 is that news outlets started plotting on log axes so that both the early and late phases could be seen at once.


We now have powers and their inverse. What we do not yet have is any grip on the structure of the integers themselves — which numbers divide which, and why 7 feels different from 8. That structure turns out to be the deepest thing in this part, and it starts with the primes.