# Logarithm

An opened nautilus shell. Its chambers make a logarithmic spiral

Logarithms or logs are a part of mathematics. They are related to exponential functions, and are useful in multiplying or dividing large numbers.

## History

Logarithms were first used in India in the 2nd century BC. The first to use logarithms in modern times was the German mathematician Michael Stifel (around 1487-1567). In 1544, he wrote down the following equations: ${\displaystyle q^{m}q^{n}=q^{m+n}}$ and ${\displaystyle {\tfrac {q^{m}}{q^{n}}}=q^{m-n}}$ This is the basis for understanding logarithms. For Stifel, ${\displaystyle m}$ and ${\displaystyle n}$ had to be whole numbers. John Napier (1550–1617) did not want this restriction, and wanted a range for the exponents.

John Napier worked on logarithms

According to Napier, logarithms express ratios: ${\displaystyle a}$ has the same ratio to ${\displaystyle b}$ , as ${\displaystyle c}$ to ${\displaystyle d}$ if the difference of their logarithms matches. Mathematically: ${\displaystyle \log(a)-\log(b)=\log(c)-\log(d)}$. At first, base e was used (even though the number had not been named yet). Henry Briggs proposed to use 10 as a base for logarithms, such logarithms are very useful in astronomy.

## Relationship with exponential functions

A logarithm tells what exponent (or power) is needed to make a certain number, so logarithms are the inverse (opposite) of exponentiation

Just as an exponential function has three parts, a logarithm has three parts. The three parts of a logarithm are a base, an argument (also called power) and an answer.

This is an exponential function:

${\displaystyle 2^{3}=8\ }$

In this function, the base is 2, the argument is 3 and the answer is 8.

This exponential function has an inverse, its logarithm:

${\displaystyle \log _{2}(8)=3\ }$

In this logarithm, the base is 2, the argument is 8 and the answer is 3.

## Difference to roots

Addition has one inverse operation: the subtraction. Also, multiplication has one inverse operation: the division. Therefore, it may be hard to understand why exponentiation has actually two inverse operations: Why do we need the logarithm if there already is the root? This is the case because the exponentiation is not commutative.

The following example illustrates this:

• If you have x+2=3, then you can use subtraction to find out that x=3−2. This is the same if you have 2+x=3: You also get x=3−2. This is because x+2 is the same as 2+x.
• If you have x · 2=3, then you can use division to find out that x=${\textstyle {\frac {3}{2}}}$. This is the same if you have 2 · x=3: You also get x=${\textstyle {\frac {3}{2}}}$. This is because x · 2 is the same as 2 · x.
• If you have x²=3, then you use the (square) root to find out x: You get the result x = ${\textstyle {\sqrt {3}}}$. However, if you have 2x=3, then you can not use the root to find out x. Rather, you have to use the (binary) logarithm to find out x: You get the result x=log2(3).
This is because 2x usually is not the same as x2 (for example, 25=32 but 5²=25).

## Uses

Logarithms can make multiplication and division of large numbers easier because adding logarithms is the same as multiplying, and subtracting logarithms is the same as dividing.

Before calculators became cheap and common, people used logarithm tables in books to multiply and divide. The same information in a logarithm table was available on a slide rule, a tool with logarithms written on it.

• In chemistry, the negative of the base-10 logarithm of the activity of hydronium ions (H3O+, the form H+ takes in water) is the measure known as pH. The activity of hydronium ions in neutral water is 10−7 mol/L at 25 °C, hence a pH of 7. (This is a result of the equilibrium constant, the product of the concentration of hydronium ions and hydroxyl ions, in water solutions being 10−14 M2.)
• Musical intervals are measured logarithmically as semitones. The interval between two notes in semitones is the base-21/12 logarithm of the frequency ratio (or equivalently, 12 times the base-2 logarithm). Fractional semitones are used for non-equal temperaments. Especially to measure deviations from the equal tempered scale, intervals are also expressed in cents (hundredths of an equally-tempered semitone). The interval between two notes in cents is the base-21/1200 logarithm of the frequency ratio (or 1200 times the base-2 logarithm). In MIDI, notes are numbered on the semitone scale (logarithmic absolute nominal pitch with middle C at 60). For microtuning to other tuning systems, a logarithmic scale is defined filling in the ranges between the semitones of the equal tempered scale in a compatible way. This scale corresponds to the note numbers for whole semitones. (see microtuning in MIDI).

## Common logarithms

Logarithms to base 10 are called common logarithms. They are usually written without the base. For example:

${\displaystyle \log(100)=2\ }$

Some authors prefer the use of natural logarithms as ${\displaystyle \log(x)}$ but usually mention this on preface pages.

This means:

${\displaystyle 10^{2}=100\ }$

## Natural logarithms

Logarithms to base e are called natural logarithms. The number e is nearly 2.71828, and is also called the Eulerian constant after the mathematician Leonhard Euler.

The natural logarithms can take the symbols ${\displaystyle \log _{e}(x)\,}$ or ${\displaystyle \ln(x)\,}$

## Common bases for logarithms

2 ${\displaystyle \operatorname {ld} }$ Very common in Computer Science (binary)
e ${\displaystyle \ln }$ The base of this is the Eulerian constant e.
10 ${\displaystyle \lg }$ often ${\displaystyle \log }$ Most people use base 10
any number, n ${\displaystyle \log _{n}}$ This is the general way to write logarithms

## Properties of logarithms

Logarithms have many properties. For example:

### Properties from the definition of a logarithm

This property is straight from the definition of a logarithm:

${\displaystyle \log _{n}(n^{a})=a}$ For example
${\displaystyle \log _{2}(2^{3})=3}$, and
${\displaystyle \log _{2}{\bigg (}{\frac {1}{2}}{\bigg )}=-1}$ because ${\displaystyle {\frac {1}{2}}=2^{-1}}$.

The logarithm to base b of a number a is the same as the logarithm of a divided by the logarithm of b. That is,

${\displaystyle \log _{b}(a)={\frac {\log(a)}{\log(b)}}}$

For example, let a be 6 and b be 2. With calculators we can show that this is true or at least very close:

${\displaystyle \log _{2}(6)={\frac {\log(6)}{\log(2)}}}$
${\displaystyle \log _{2}(6)\approx 2.584962}$
${\displaystyle 2.584962\approx {\frac {0.778151}{0.301029}}\approx 2.584970}$

Our results had a small error, but this was due to the rounding of numbers.

Since it is hard to picture the natural logarithm, we find that, in terms of a base-ten logarithm:

${\displaystyle \ln(x)={\frac {\log(x)}{\log(e)}}\approx {\frac {\log(x)}{0.434294}}}$ Where 0.434294 is an approximation for the logarithm of e.

### Operations within logarithm arguments

Logarithms which multiply inside their argument can be changed as follows:

${\displaystyle \log(ab)=\log(a)+\log(b)}$

For example,

${\displaystyle \log(1000)=\log(10\cdot 10\cdot 10)=\log(10)+\log(10)+\log(10)=1+1+1=3}$

The same works for dividing but subtraction instead of addition, because it is the inverse operation of multiplication:

${\displaystyle \log {\bigg (}{\frac {a}{b}}{\bigg )}=\log(a)-\log(b)}$

### Logarithm tables, slide rules, and historical applications

Before electronic computers, logarithms were used every day by scientists. Logarithms helped scientists and engineers in many fields such as astronomy.

Before computers, the table of logarithms was an important tool.[1] In 1617, Henry Briggs printed the first logarithm table. This was soon after Napier's basic invention. Later, people made tables with better scope and precision. These tables listed the values of logb(x) and bx for any number x in a certain range, at a certain precision, for a certain base b (usually b = 10). For example, Briggs' first table contained the common logarithms of all integers in the range 1–1000, with a precision of 8 digits. As the function f(x) = bx is the inverse function of logb(x), it has been called the antilogarithm.[2] People used these tables to multiply and divide numbers. For example, a user looked up the logarithm in the table for each of two positive numbers. Adding the numbers from the table would give the logarithm of the product. The antilogarithm feature of the table would then find the product based on its logarithm.

For manual calculations that need precision, performing the lookups of the two logarithms, calculating their sum or difference, and looking up the antilogarithm is much faster than performing the multiplication by earlier ways.

Many logarithm tables give logarithms by separately providing the characteristic and mantissa of x, that is to say, the integer part and the fractional part of log10(x).[3] The characteristic of 10 · x is one plus the characteristic of x, and their significands are the same. This extends the scope of logarithm tables: given a table listing log10(x) for all integers x ranging from 1 to 1000, the logarithm of 3542 is approximated by

${\displaystyle \log _{10}(3542)=\log _{10}(10\cdot 354.2)=1+\log _{10}(354.2)\approx 1+\log _{10}(354).\,}$

Another critical application was the slide rule, a pair of logarithmically divided scales used for calculation, as illustrated here:

Schematic depiction of a slide rule. Starting from 2 on the lower scale, add the distance to 3 on the upper scale to reach the product 6. The slide rule works because it is marked such that the distance from 1 to x is proportional to the logarithm of x.

Numbers are marked on sliding scales at distances proportional to the differences between their logarithms. Sliding the upper scale appropriately amounts to mechanically adding logarithms. For example, adding the distance from 1 to 2 on the lower scale to the distance from 1 to 3 on the upper scale yields a product of 6, which is read off at the lower part. Many engineers and scientists used slide rules until the 1970s. Scientists can work faster using a slide rule than using a logarithm table.[4]

## References

1. Campbell-Kelly, Martin (2003), The history of mathematical tables: from Sumer to spreadsheets, Oxford scholarship online, Oxford University Press, ISBN 978-0-19-850841-0, section 2
2. , section 4.7., p. 89
3. Spiegel, Murray R.; Moyer, R.E. (2006), Schaum's outline of college algebra, Schaum's outline series, New York: McGraw-Hill, ISBN 978-0-07-145227-4, p. 264
4. Maor, Eli (2009), E: The Story of a Number, Princeton University Press, ISBN 978-0-691-14134-3, sections 1, 13