# Logarithm

A logarithm is the inverse function of exponentiation. A logarithm tells us the power, y, that a base, b, needs to be raised to in order to equal x. This is written as:

log_{b}(x) = y

Example

Write the equivalent of 10^{3} = 1000 using logarithms.

Two of the most commonly used bases are base 10 (common logarithm) and base e (natural logarithm). Generally, when someone says (or writes) "log" without specifying the base, the convention is to assume base 10. However, there are those who refer to the natural log (ln), as "log." As such, it is important to know what context the term is being used in. To avoid ambiguity, it is safest to use "log" to refer to base 10 logarithms and "ln" or "natural log" to refer to base e logarithms. In other words, "log(x)" typically indicates log_{10}(x) and ln(x) indicates log_{e}(x).

The intent of logarithms is to help simplify calculations in areas such as science, engineering, physics, and mathematics. Base 10 is used more in science and engineering while base e is used more in physics and mathematics. Logarithms can also involve decimals, not just integers, but computing these is more difficult and involves use of more complicated mathematical concepts, like power series. The use of pre-calculated logarithm tables is also relatively common, though the advent of electronic calculators has decreased the need for these.

## Logarithm function

Below is a graph of both f(x) = log(x) and f(x) = ln(x).

As can be seen from the graph, a logarithmic function cannot have a negative x-value, and has a zero at x = 1 because any value raised to the 0^{th} power is equal to 1 (log_{b}(1) = 0). As x approaches 0, a logarithmic function approaches -∞. As x approaches ∞, the function approaches ∞. Also, the smaller the magnitude of the base, the faster a logarithmic function increases.

## Why can't logarithms be negative?

While the value of a logarithm can be a negative number, the argument (x-value) of any logarithm cannot be negative. This is because the base of a logarithm can only be a positive number greater than 1, and a positive number raised to anything will be a positive number:

### base > 1

The base of a logarithm cannot be negative because a negative base raised to a fraction only has an imaginary solution. A base of 0 would always result in 0, since 0 raised to anything is 0, and a base of 1 will always result in 1. Therefore, the base of a logarithm has to be a positive number other than 1, mostly larger than 1.

### Exponents of positive numbers

Since the base of a logarithm must be positive, we know that the argument must also be positive, since the argument of a logarithm is the result of raising the base to some number, and regardless what that number is, the result will be positive because:

- A positive number raised to a positive exponent results in a positive number.
- A positive number raised to the 0
^{th}power is 1, a positive number. - A positive number raised to a negative power is just the reciprocal of that number raised to the positive power.