BETA
This is a BETA experience. You may opt-out by clicking here

More From Forbes

Edit Story

The Humble Logarithm

This article is more than 7 years old.

Every semester I teach calculus I ask my students if they know why we care about logarithms. And every semester I am met with a sea of blank faces and shoulder shrugs. "What is the most important property logs have?" I ask. Nervous glances around and then back down to their phones. "What is the logarithm of a product?" Finally a sheepish mumble from somewhere: "The sum of the logs?"

Yes, the sum of the logs. Logarithms turn products into sums. Big deal, you say, and these days I suppose you're right. After all, your smartphone has a built-in scientific calculator with about a dozen decimal places of accuracy so you can do all the error-free multiplying you want.

But imagine being the navigator on a merchant ship in the 1600s. You only have a few tools at your disposal: a sextant, an astronomical almanac containing the positions of the stars each night and your knowledge of spherical trigonometry. Every night you gaze into the heavens, seeking the position of familiar stars (Polaris in the northern hemisphere, lesser-known bodies in the southern), then retreat to your cabin to consult your almanac and make some calculations. Here's the problem, though. Spherical trig requires various multiplications of sines of angles. You would certainly have a table of sines at your disposal as those had been calculated centuries before and you would dutifully sit down to your figuring.

So there you are, multiplying several 8- or 9-digit numbers in an effort to find your current location on the planet. The crew is counting on you to deliver them safely and swiftly to your destination. Accuracy is important; an error in your calculations could cause you to incorrectly find your spot on the map or point the ship in a slightly wrong direction. It's high pressure work, and there's a lot of it. Multiplying two 8-digit numbers requires a lot of calculation--64 individual multiplications followed by another 8 or so multi-number additions--nearly 100 operations in all. So many chances to make errors.

Addition of two 8-digit numbers takes only 8 operations, though (not counting carries, but those aren't a big deal). Certainly fewer opportunities for error. Wouldn't it be nice if you could just add numbers instead of having to multiply all the time?

Enter John Napier, the eighth Laird of Merchiston. A Scottish landowner and merchant, Napier was naturally interested in helping ships navigate more accurately and quickly. His discovery of logarithms revolutionized computational mathematics. No longer would anyone have to spend long periods multiplying multi-digit numbers by hand. How?

Logarithms are inverse to exponential functions. Since multiplying two exponentials ax and ay yields ax+y (note how the exponents add), taking the logarithm of a product undoes this; that is, products turn into sums. So if you pick your favorite value for a and then take the time to figure out the table of values of x-values solving the equation ax = r for r in the range of values from 0 to a, then you can get really accurate estimates for multiplication.

Let's get more specific. Take a = 10 for simplicity. Take two numbers r and s and write them in scientific notation r = u × 10ns = v ×10m. Then using logarithms in base 10 we have log(rs) = log(u) + log(v) + nm. Since u and v are less than 10, we can look up their logarithms in our table and add those together. We then know the logarithm of the product rs, which we can then look up in our table of values to discover which number it is the logarithm of. Et voila, we've multiplied r and s with an accuracy bounded only by the accuracy of our table.

I'm old enough that I learned how to do this in high school. Even though it was the mid-80s and handheld scientific calculators were cheap and ubiquitous, learning how to use log tables had not yet exited the standard Algebra II curriculum. Let's do an example to see how it really works: multiply 4120 by 639. Writing this in scientific notation we have 4.120 × 103 and 6.39 × 102. Now consult the table to find the logarithms: log(4.120) = 0.6149 and log(6.39) = 0.8055. Adding these we get 1.4204. This number is larger than 1, but that's no problem. The logarithm of our product is then 1.4204 + 2 + 3 = 6.4204. Now we look for 0.4204 in the log table, to no avail. It's not there. We can discover that log(2.63) = 0.4200 and log(2.64) = 0.4216. There's a process called interpolation that tells us how to find the correct thousandth for our logarithm, but in the interest of saving time and space let's just agree to split the difference and say log(2.635) ≈ 0.4204. So we then estimate our product: 4120 × 639 ≈ 2.635 × 106 = 2,635,000. The actual value is 2,632,680, an error of 0.09%. That's remarkably good for hardly doing any work.

This simple example just hints at the utility of logarithms. I was using crude tables. In the 17th Century, men spent months calculating accurate logarithm tables to 8 or 10 decimal places, way more precision than necessary, but certainly useful.

So now you know why we care about logarithms. Like many things, it was about money, but the long-range impact was enormous.

Update (1/22/17, 3:17 p.m.): Observant reader Greg Dresden noted that I misread the log table in my initial calculation. The post has been corrected.