Logarithms are as a good place to start as any to start a maths blog.

Before everyone calculated using one of these…

As they progress in mathematics, everyone eventually encounters logarithms. Nowadays these are introduced as a purely algebraic tool, useful for bringing variables down from powers and for solving index equations. But not so long ago logarithms were primarily an *arithmetical* tool, indispensable in basic calculation. Via tables or slide rules, they were used daily by millions to multiply and divide, and to take powers and roots. You don’t even have to be that old to actually remember doing this.

However, logarithms in basic arithmetic were made obsolete by the arrival of affordable electronic calculators in the late 1970’s. The world collectively put away its slide rules and log tables, and nowadays most people — myself included — will study the complete algebra of logs without ever learning about their original purpose and function. A little sad when you think about it.

So, this post is intended as an introduction to the basic arithmetic of logs for those still unaware of it; and as a refresher for older/enlightened readers. However, I’ll also show how logs live on as alternative to direct calculation. Even today, when the chips are down, the power of logs can still trump direct calculation by even the most powerful computers.

## The log rules *and* the log tables

Most learn the algebra of logs from their definition as an inverse of exponentiation. If $b^m=x$, then $\log_b x = m$, and from this definition the basic rules of logs follow. Lists vary, but these rules usually include the following.

\begin{align}

\bullet&\ \text{I} &\log_b(xy)&= \log_b(x) + \log_b(y)\\

\bullet&\ \text{II} &\log_b(x/y)&= \log_b(x) – \log_b(y)\\

\bullet&\ \text{III}&\log_b(x^p)&= p\log_b(x)\\

\bullet&\ \text{IV} &\log_b(a)&= \frac{\log_c(a)}{\log_b(c)}

\end{align}

This is essentially as much as modern students learn (probably wondering all the while what on earth they’re doing). But originally, these rules were always paired with a set of log and anti-log tables. It was the combination of the rules and the tables which made logs so useful in the first place.

…they multiplied and divided using one of these.

Two sets of tables were needed: A log table, listing out values of $\log_b(x)$ for a given base $b$; and also an anti-log table, which listed out values of $b^m$ in the same base. For practical purposes, the base was almost always 10. Logs were given for values of $x$ from 1.0 up to 10, while anti-logs were given for values of $m$ from 0.0 to 1. Real log tables had far more elaborate designs which I’ll discuss in a later post, but for now, we’ll consider them to be simple lists of values like so

\[

\begin{array}{c|c}

x & \log_{10}(x)\\

\hline

1.0 & 0.0000\\

1.1 & 0.0414\\

1.2 & 0.0792\\

1.3 & 0.1139\\

1.4 & 0.1461\\

1.5 & 0.1761\\

1.6 & 0.2041\\

1.7 & 0.2304\\

1.8 & 0.2553\\

1.9 & 0.2788\\

2.0 & 0.3010\\

2.1 & 0.3222\\

\vdots & \vdots\\

10.0 &1.0000

\end{array}

\qquad

\begin{array}{c|c}

m & 10^m\\

\hline

0.00 & 1.000\\

0.01 & 1.023\\

0.02 & 1.047\\

0.03 & 1.072\\

0.04 & 1.096\\

0.05 & 1.122\\

0.06 & 1.148\\

0.07 & 1.175\\

0.08 & 1.202\\

0.09 & 1.230\\

0.10 & 1.259\\

0.11 & 1.288\\

\vdots & \vdots\\

1.00 &10.000

\end{array}

\]

Depending on how large you were prepared to make your tables (read. how much time and money you were prepared to spend), your tables could have finer increments for $x$ and $m$, give more decimal places for the logs and anti-logs, and supply extra corrections for additional accuracy. You could also dispense with tables altogether and use slide rules — devices which became an art in and of themselves.

We’ll just consider tables for now, and how they were used with each of the rules above. In what follows below, it will be assumed that we have access to a more finely graded set of tables such as

\[

\begin{array}{c|c}

x & \log_{10}(x)\\

\hline

1.000 & 0.0000\\

1.001 & 0.0004\\

1.002 & 0.0009\\

1.003 & 0.0013\\

\vdots & \vdots

\end{array}

\qquad

\begin{array}{c|c}

m & 10^m\\

\hline

0.0000 & 1.0000\\

0.0001 & 1.0002\\

0.0002 & 1.0005\\

0.0003 & 1.0007\\

\vdots & \vdots

\end{array}

\]

## I: Logs turn multiplication into addition (plus lookups)

Now comes the power of logs. First we must cast our mind back to the days before calculators (There will be a payoff for the modern age later on). Suppose you needed to calculate the product of $4.89 \times 3.37$ to a relatively good approximation. You could just multiply things out, but that would take a bit and you’d need to be quick and accurate with your times tables.

Log tables offered a faster option. A quick lookup in the log table reveals that $\log_{10}(4.89)=0.6893$ and $\log_{10}(3.37)=0.5276$. Now, consider taking the log of the unknown product to the base ten, and applying rule I.

\begin{align*}

\log_{10}\brkt{4.89 \times 3.37} &= \log_{10}(4.89)+\log_{10}(3.37)\\

&\cong 0.6893+0.5276

\end{align*}

So it follows that approximately,

\[ \log_{10}\brkt{4.89 \times 3.37} \cong 1.2169\]

We still don’t know what the product is, but taking the exponent of both sides and manipulating indices gives.

\[ 4.89 \times 3.37 \cong 10^{1.2169} = 10^{0.2169} \times 10^1 \]

So the product is an integer power of $10$, times the mantissa $10^{0.2169}$. Looking up $10^m$ in the anti-log tables gives $10^{0.2169} \cong 1.647$ and so

\[ 4.89 \times 3.37 \cong 1.647 \times 10^1= 16.47 \]

The true answer is

\[ 4.89 \times 3.37 = 16.4793\]

So we’ve obtained more or less the four most significant digits of the product without have to multiply anything at all. All we needed was three lookups, one addition, and a little index shifting. Since addition is much easier than multiplication, we can save ourselves a lot of effort and avoid many pitfalls, albeit at the cost of a little accuracy. Next comes division.

Continue reading →