What Is a Logarithm? The Scale That Turns Multiplication Into Addition
By the BrainSnail editorial team. How these articles are written and checked, and how to tell us when one is wrong.
Before calculators, a navigator who had to multiply two seven-digit numbers to fix a ship's position faced an hour of arithmetic and a real chance of error, and the invention that cut it to a minute was a table. Logarithms, published by a Scottish laird in 1614, replace multiplication with addition by recording, for every number, the power to which a fixed base must be raised to produce it. Laplace said they doubled the life of the astronomer. They are built into the scales for sound, earthquakes, acidity and the brightness of stars, and into the way the human senses work, and they are the inverse of the most important growth process in nature.
The definition
Ten to the power three is a thousand, so the logarithm of a thousand, to base ten, is three. That is the whole idea: the logarithm of a number is the exponent that the base needs to reach it. The log of a hundred is two, of ten is one, of one is zero, and of a tenth is minus one; the logs of the numbers in between are fractions, and log of 2 is about 0.301 because ten to the power 0.301 is 2. Any base works. Base two is used in computing, where the log of a number is roughly the number of bits needed to write it; base ten is used for scales of measurement; and the mathematicians' base is the number e, 2.71828, whose logarithm is called natural because it arises on its own in the calculus of growth.
Why multiplication becomes addition
Multiplying powers of the same base means adding the exponents: ten squared times ten cubed is ten to the fifth. Since every positive number is ten to some power, the same rule holds for any two numbers: the log of a product is the sum of the logs. To multiply 347 by 29, look up their logarithms, 2.540 and 1.462, add them to get 4.002, and look up which number has that logarithm, which is 10,050, near enough. Division becomes subtraction, and raising to a power becomes multiplying by the exponent, so a square root is half a logarithm. The slide rule, invented within a decade of the tables, is two rulers marked in logarithmic scale that add lengths, and engineers designed bridges, aircraft and the Saturn V with them until the pocket calculator arrived in the 1970s. The rules in brief:
- •log of a times b equals log a plus log b
- •log of a divided by b equals log a minus log b
- •log of a to the power n equals n times log a
- •log of the base itself is 1, and log of 1 is 0
- •Logs of numbers less than 1 are negative, and the log of zero does not exist
Napier and Briggs
John Napier, laird of Merchiston near Edinburgh, spent twenty years computing his tables by hand and published them in 1614 under a title that promised a wonderful canon of logarithms. His version used an awkward base, and Henry Briggs, professor of geometry in London, travelled to Scotland the following year, was so struck by the idea that he stood in silent admiration for a quarter of an hour according to an account later recorded by the astrologer William Lilly, and proposed base ten. Briggs then calculated the logarithms of the numbers from 1 to 20,000 and 90,000 to 100,000 to fourteen decimal places, a labour that took years, and the gap was filled by a Dutch publisher. Kepler used the tables for his laws of planetary motion; navigators used them for three centuries; and the word itself is Napier's, from the Greek for ratio and number.
The scales
Many things people measure vary over such enormous ranges that a linear scale is useless, and a logarithmic one compresses them: each step on the scale is a multiplication rather than an addition. The decibel scale for sound rises by ten for every tenfold increase in intensity, so a 100-decibel concert is ten thousand million times the faintest audible sound. The Richter and moment magnitude scales for earthquakes step by a factor of about 32 in energy per unit. The pH scale steps by a factor of ten in hydrogen ion concentration, so lemon juice at pH 2 is a hundred thousand times as acidic as water at pH 7. Stellar magnitudes, the loudness of music, the sizes of computer files and the growth of an epidemic on a chart with a log axis, where a straight line means steady exponential growth, all use the same trick. The human senses are logarithmic too: perceived brightness and loudness rise with the log of the physical stimulus, which is why the scales feel natural.
The natural logarithm
The base that mathematics prefers has nothing to do with fingers. When a quantity grows at a rate proportional to its size, money at compound interest, bacteria in a dish, a population without limits, it follows the exponential function, e to the power of the growth rate times time, and the natural logarithm is what undoes it: it gives the time needed to reach a given size. Doubling time is the log of 2 over the rate, which is where the rule of 70 in finance comes from, since log 2 is about 0.69. In calculus the natural log is the function whose slope at every point is one over the point, which no other function manages, and it turns up in the entropy of physics, the information of a message, and the distribution of prime numbers, whose density near a large number n is about one over the natural log of n. A tool invented to save navigators arithmetic turned out to describe how growth itself is shaped.
Worn pages and Benford's law
In 1881 the astronomer Simon Newcomb noticed something odd about the books of logarithm tables he and his colleagues used: the early pages, covering numbers beginning with 1, were far grubbier than the later ones covering numbers beginning with 9. People were looking up numbers starting with small digits much more often. Decades later the physicist Frank Benford rediscovered the pattern and tested it on thousands of figures, from river areas to street addresses, and it now carries his name. In many real collections of data, about 30 percent of numbers begin with 1, and fewer than 5 percent begin with 9.
Logarithms explain it. Data that spread across several orders of magnitude, such as populations, prices or invoice totals, tend to be evenly spread on a logarithmic scale rather than an ordinary one. On a log scale, the stretch from 1 to 2 is as wide as the stretch from 2 to 4, and far wider than the stretch from 9 to 10. The share of numbers starting with 1 is the log of 2, about 0.301, which is where the 30 percent comes from. Auditors use the pattern to flag suspicious accounts, because people inventing figures tend to spread first digits too evenly.
Two problems logs make easy
The old story of the chessboard asks for one grain of rice on the first square, two on the second, four on the third, doubling each time. How many on the last square? That is 2 to the power 63, a number nobody wants to multiply out. Logarithms reduce it to one step. The log of 2 is about 0.30103, so the log of the answer is 63 times that, about 18.965. The whole-number part says the answer has nineteen digits; ten to the power 0.965 is about 9.2, so the last square holds around 9.2 billion billion grains.
The same tool answers questions about time. Suppose bacteria double every 20 minutes and you want to know how long one cell takes to become a million cells. You need the number of doublings n where 2 to the n equals 1,000,000. Take logs of both sides: n times 0.301 equals 6, so n is about 19.9, call it 20 doublings, or six hours and forty minutes. The usual slip is to treat the log of a sum like the log of a product. The log of a plus b is not log a plus log b; there is no simple rule for sums at all.
How Briggs built his tables from square roots
Briggs had no calculus and no calculating machine, so how did he find that the logarithm of 2 is 0.30103? He used repeated square roots. The square root of 10 is about 3.1623, so its logarithm to base ten must be exactly 0.5. The square root of that, about 1.7783, has a logarithm of 0.25, and the next, about 1.3335, has 0.125. Each new root creeps closer to 1 while its logarithm halves. Briggs carried the process on more than fifty times, working by hand to a huge number of decimal places, until the result differed from 1 only far out in its decimals.
Close to 1, the logarithm of 1 plus a tiny amount is very nearly proportional to that tiny amount, so Briggs could compare. He took the square root of 2 the same number of times and noted how far the result sat above 1. The ratio between that excess and the one left over from 10 is the logarithm of 2, because both shrink in step. In modern terms it is the natural log of 2 divided by the natural log of 10, which is 0.30103. With a few primes done, the product rules gave the rest: log 4 is twice log 2, log 5 is 1 minus log 2.
The takeaway
A logarithm is the exponent to which a base must be raised to give a number, so that the log of a product is the sum of the logs, and multiplication, division and roots become addition, subtraction and division of tabulated values, which is what Napier and Briggs gave navigators and astronomers in the 1610s. Logarithmic scales compress vast ranges into manageable steps in decibels, earthquake magnitudes and pH, the senses work the same way, and the natural logarithm, to base e, is the inverse of exponential growth.