# Logarithms

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

# Relationship with exponential functions

A logarithm tells what exponent (or power) is needed to make a certain number. Thus, logarithms are the inverse (the opposite) of exponentiation[1]. That is, what an exponent does, the logarithm “undoes.”

Exponential functions have three parts, and logarithms have basically the same three parts. The three parts of an exponential function are:

the base
the number that we are multiplying by itself.
the argument
the number of times that we multiply the base. The argument is often called the power or the exponent.
the number we get when we multiply the base by itself the argument number of times. So, you know, the answer.

The three parts of a logarithm are:

the base
the number that we are multiplying by itself. This is the same as the base of the exponential function.
the argument
the number we get when we multiply the base by itself the answer number of times. This is the the answer from the exponential function.
the number of times that we multiply the base to get the argument. This is the argument from the exponential function.

Here is an example of an exponential function:

$2^{3}=8$

In this function, the base is $2$, the argument is $3$ and the answer is $8$. This is easier to see when you remember that $2^{3}=8$ can also be written as $2\cdot{}2\cdot{}2=8$.

The logarithm of the above exponential function is just the “opposite”, or inverse:

$\log_2(8)=3$

In this logarithm, the base is still $2$, the argument this time is $8$, and the answer is $3$. Notice that the base did not change, but the argument and answer switched. This is because the exponential function and logarithm are inverse—they “undo” each other. The answer of an exponential function is the argument of the logarithmic function.

So, you might understand the above equation as saying “To get $8$, I need to multiply $2$ by itself $3$ times.”

Here is another example:

$\log_{10}(400) \approx 2.6021$

This is saying, “To get $400$, we need to multiply $10$ by itself approximately $2.6021$ times.[2] We can show this exponentially as $10^{2.6021} \approx{} 400$.

Notice that you can have non-whole number answers to logarithms. Also, as the above example shows, any whole number can be written as a base raised to a real-number exponent.

## Converting to and from logarithmic functions

Because exponential and logarithmic functions include the same information (the base, the argument, and the answer), they can easily be converted from one to the other. We saw this in the earlier example: $2^{3}=8$ can be converted into $\log_2(8)=3$. This is useful when one of the three parts is a variable.

For example:

$\log_2(x)=3$

We can find $x$ by converting the logarithm into exponential form:

$2^{3}=x$

We can easily solve this to find that $x=8$.

## Isolating logarithms

When a variable appears as the base, the argument, or the answer, you may need to isolate the logarithm. This means that you get the equation into proper logarithmic form so that you can convert it to exponential form.

Basically, isolating the logarithm is similar to what you do when you solve for $y$ in a simple algebraic equation. The difference is just that you are getting the logarithm by itself (thus, isolating it) on one side of the equation.

For example, if you have this equation:

$\log_{10}(x-3)+4=3$

you would have to $-4$ from both sides to isolate the $\log_{10}(x-3)$ before you could solve the logarithm part.

[[File:./john_napier.jpg|frame|none|alt=|caption The spiral of a shell is logarithmic.]]

[[File:./NautilusCutawayLogarithmicSpiral.jpg|frame|none|alt=|caption The spiral of a shell is logarithmic.]]

# Common Logarithms

Logarithms to base 10 are called common logarithms. They are usually written without the base. For example: $\log(100)=2$, which means $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 $\log_{e}(x)$ or $\ln(x)$.

# Common bases for logarithms

r|c|l Base&Abbreviation&Comment
2&$\operatorname {ld}$&Very common in Computer Science (binary)
$e$&$\ln{}$&The base of this is the Eulerian constant $e$.
10&$\lg{}$ often $\log{}$&Most people use base 10.
any number, $n$&$\log_n$&This is the general way to write logarithms

# Properties of logarithms

Logarithms have many properties.

This property is straight from the definition of a logarithm:

$\log_n(n^{a})=a$

Examples:

$\log_2(2^{3})=3$.

$\log_2\frac{1}{2}=-1$ because $\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,

$\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:

$\log_2(6)=\frac{\log(6)}{\log(2)}$.

$\log_2(6) \approx 2.584962$.

$2.584962 \approx \frac{0.778151}{0.301029} \approx 2.584970$

The result has a small error, but this was due to the rounding of numbers.

The important thing to notice is the switch from log base $2$ to log base $10$. What that example says is that the log of $6$ in base $2$ is equal to the log of $6$ in base $10$ divided by the log of $2$ in base $10$. This property of logarithms—changing bases—can be very useful.

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

$\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:

$\log(ab)=\log(a)+\log(b)$

For example,

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

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

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

# Logarithms and Roots

Addition has one inverse operation: subtraction. Multiplication has one inverse operation: division. But, exponentiation has two inverse operations! This is because exponentiation is not commutative.[3]

The following examples show 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$.

$x+y=y+x$. Addition is commutative.

If you have $x\cdot{}2=3$,
then you can use division to find out that $x=\frac{3}{2}$. This is the same if you have $2\cdot{}x=3$: you also get $x=\frac{3}{2}$. This is because $x\cdot{}2$ is the same as $2\cdot{}x$.

$x\cdot{}y=y\cdot{}x$. Multiplication is commutative.

If you have $x^{2}=3$,
then you use the square root to find out $x$: you get the result $x=\sqrt{3}$. But, if you have $2^{x}=3$, then you cannot use the root to find out $x$. Instead, you have to use the logarithm to find out $x$: you get the result $x=log_{2}(3)$. This is because $2^{x}$ is not the same as $x^{2}$ (except in the special case that $x=2$).

$y^{x}\neq{}x^{y}$ (unless $x=y$).
Using exponents is (usually) not commutative.

# Uses

There are many, many uses for logarithms. Here are a few from nature and a few from human activities:

• Logarithmic spirals are common in nature. Examples include the shell of a nautilus or the arrangement of seeds on a sunflower.
• Musical intervals are measured logarithmically.
• The Richter scale measures earthquake intensity on a base-10 logarithmic scale.
• In astronomy, the apparent magnitude of stars (how bright they appear) is measured logarithmically. This is because the human eye responds logarithmically to brightness.
• 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.

[[File:./slide_rule.jpg|frame|none|alt=|caption A slide rule with cursor]]

[[File:./slide_rule_cursor.jpg|frame|none|alt=|caption A slide rule with cursor]]

# Sources

Modified from the content available at the following pages:

2. The “$\approx$” symbol means “about” or “approximately.” The accurate answer is $2.60205999133$.