Math paradoxes

Glossary / Logarithm

Glossary · logarithm

How many folds would take a sheet of paper to the Moon?

An ordinary sheet of paper is 0.1 mm thick. Fold it in half, then again, and again. The Moon is 384,400 km away, so it seems you would need thousands or even millions of folds. Intuition is badly wrong here. A logarithm is exactly the answer to this kind of question: how many times do you have to double to get from one number to another.

In plain wordspictures, analogies, small numbers

“In plain words” is hidden on all puzzles.

The folded paper paradox

Move the slider. Each fold lays the sheet on top of itself, so the thickness doubles: the lower part of the column is what you had before the fold, the upper part is an identical copy on top. Next to it, in the same scale, are familiar things. How many folds will you need to reach the Moon?

Thickness–
Layers of paper–

How many folds it takes to outgrow each thing:

    In reality a sheet can only be folded about twelve times: after that it is too thick and stiff. But the arithmetic of doubling stays the same.

    A logarithm is the number of folds

    Look at the steps under the chart. The things differ by factors of thousands and millions, yet the fold numbers go up calmly: 9, 15, 27, 32, 42. That is exactly what a logarithm does: it turns "how many times bigger" into "how many doubling steps". From a book to Everest the ratio is almost three hundred thousand, yet it takes only 18 folds.

    Rigoroustables, charts, formulas

    “Rigorous” is hidden on all puzzles.

    How many times to multiply

    The logarithm of x to base b is how many times you have to multiply b by itself to get x. It is written logb x. The most common bases are 2 (doubling) and 10 (counting zeros).

    Base 2

    2 · 2 · 2 = 8 → log2 8 = 3

    210 = 1024 → log2 1024 = 10

    For numbers between powers the logarithm is a fraction: log2 10 ≈ 3.32, because 10 lies between 8 and 16.

    Base 10

    10 · 10 · 10 = 1000 → log10 1000 = 3

    The base-10 logarithm is almost the number of digits: for a number with d digits it lies between d − 1 and d. A million has 7 digits, and log10 1,000,000 = 6.

    Worked example: the sheet and the Moon

    How many sheet thicknesses fit between us and the Moon? 384,400 km = 384,400,000,000 mm = 3,844,000,000,000 times 0.1 mm. Now ask: how many times do you double 1 to get this number?

    log2 3,844,000,000,000 ≈ 41.8 → it takes 42 folds

    After 41 folds the sheet still falls short; after 42 it is already thicker than the distance to the Moon: 439,805 km.

    Ten doublings are about a thousand

    The most useful fact about logarithms for mental arithmetic: 210 = 1024, almost 1000. So every ten doublings add roughly three zeros to a number. This is also why a kilobyte is 1024 bytes.

    FoldsFactorThickness
    10≈ a thousand10.2 cm
    20≈ a million105 m
    30≈ a billion107 km
    40≈ a trillion109,951 km

    The factor is a little bigger than the round number: 1024 instead of 1000, so the thickness always gets a bit ahead of the round figure.

    A log scale straightens an explosion

    Here is the thickness of the folded sheet after each fold, and next to it an ordinary stack where one more sheet is added each time. On an ordinary scale almost all the folds stick to zero, then the curve shoots up. Switch to the logarithmic one: each mark there is ten times the previous one, and doubling becomes a straight line.

    Folds stuck at zero on the ordinary scale–
    Stack after adding 42 sheets–

    Log scales around us

    Many familiar units are really logarithms: one step on the scale means not "plus this much" but "this many times".

    • Decibels+10 dB is ten times the sound intensity, +20 dB a hundred times. +3 dB is about double. To the ear, +10 dB sounds roughly twice as loud.
    • Earthquake magnitudeOne more unit means ten times bigger swings on a seismograph and about 32 times more energy. A magnitude 7 quake releases a thousand times the energy of a magnitude 5.
    • pHOne unit down means ten times more hydrogen ions. Black coffee has a pH of about 5, pure water 7: coffee is a hundred times more acidic, not "a bit".
    • The musical octaveA note an octave higher has twice the frequency: concert A is 440 Hz, the A above it 880 Hz. The ear hears equal steps where the frequency multiplies.

    When to use a log scale

    • Values differ by factors of thousandsPopulations of villages and megacities, wealth, earthquake strength. On an ordinary scale everything but the largest merges into one line near zero.
    • Percentages matter, not incrementsPrices, savings, case counts. The same slope on a log scale means the same percentage growth over the same time.
    • A straight line is no comfortA straight line on a log scale is an exponential, an explosion. The chart looks calm while the numbers keep doubling.
    • There is no zero on itThe logarithm of zero or of negative numbers doesn't exist. If the data has zeros, a log scale simply can't show them.
    • Read the axis labelsMarks 1, 10, 100, 1000 instead of 1, 2, 3, 4 give away a log scale. Miss them and you will misjudge the difference many times over.
    Deepergeneralisations, theory, history

    “Deeper” is hidden on all puzzles.

    Multiplying by adding: the slide rule

    bm · bn = bm + n ⇒ log (a · c) = log a + log c

    Multiplying powers means adding exponents. So the logarithm of a product is the sum of the logarithms. John Napier published tables of logarithms in 1614, and astronomers began adding numbers from tables instead of doing long multiplication. Soon the slide rule appeared: if numbers are marked at distance log x from the start, laying one segment after another multiplies the numbers. Engineers used it for centuries, right up to pocket calculators.

    –

    The natural logarithm ln is used here, but the base doesn't matter: any base stretches all lengths by the same factor, and the two segments still add up to the product.

    Change of base

    logb x = loga x / loga b

    Logarithms to different bases differ only by a constant factor. For example, log2 x ≈ 3.32 · log10 x. A million has 6 zeros, so it takes 6 · 3.32 ≈ 19.9, that is 20 doublings to reach it. That is why a chart on a log scale looks the same for any base: only the labels on the marks change.

    The natural logarithm and the number e

    Put one dollar in at 100% a year. Compounded once a year, you get 2 dollars. Twice at 50%, 2.25. Monthly, 2.61; daily, 2.71. The more often, the closer to a limit that stops growing: e ≈ 2.71828. It is the natural base of continuous growth, and the logarithm to it, ln, is called natural.

    (1 + 1/n)n → e as n → ∞ · ln 2 ≈ 0,693

    From ln 2 ≈ 0.693 comes the "rule of 70": at r% growth a year, an amount doubles in about 70 / r years. Check how accurate it is.

    Exact: ln 2 / ln(1 + r)–
    Rule of 70: 70 / r–

    Why halving is so fast

    A logarithm also works the other way round. Think of a number from 1 to N. Each answer to "is it at most ...?", asked about the middle of the range, throws away half the options. After k questions N / 2k remain, so it takes about log2 N questions. This is how you find a word in a dictionary or a row in a sorted table.

    Questions this time–
    Never more than–

    Each row is one question. The bar length is the logarithm of how many numbers are still left. That is why the bars shrink in equal steps: halving on a log scale is a straight line again.

    Where it shows up

    Other terms