Definition:Logarithm

Positive Real Numbers
Let $$x \in \R$$ be a real number such that $$x > 0$$.

The (natural) logarithm of $$x$$ is defined as:


 * $$\ln x \ \stackrel {\mathbf {def}} {=\!=} \ \int_1^x \frac {dt} t$$

Complex Numbers
The complex natural logarithm of a complex value $$z \in \C \ $$ is written $$\log \left({z}\right) \ $$ (no base value) and is defined:


 * $$\log \left({z}\right) \ \stackrel {\mathbf {def}} {=\!=} \ \ln \left|{z}\right| + i \arg \left({z}\right) \ $$.

The principal branch of the complex logarithm is written and defined:


 * $$\text{Log} \left({z}\right) \ \stackrel {\mathbf {def}} {=\!=} \ \ln \left|{z}\right| + i \text{ Arg} \left({z}\right) \ $$.

where $$\arg \left({z}\right) \ $$ is the continuous argument of $$z \ $$ and $$\text{ Arg}\left({z}\right) = \arg \left({z}\right) \ \left({\bmod \left({2 \pi}\right)}\right)$$.

General Logarithm
The natural logarithm function gives rise to the exponential function as follows:


 * $$x = \ln y \iff y = \exp x = e^x$$.

Thus the logarithm is the inverse of the exponential. It can also be independently shown that the logarithm function always exists without taking recourse to the fact that it is the inverse. For a proof see Existence of Logarithm.

Consider the general exponential function: $$y = a^x = e^{x \ln a}$$, where $$a \in \R$$, as defined in Powers of Real Numbers.

As $$\forall x \in \R: x \ln a \in \R$$, and the nature of the exponential function (strictly increasing), we can define the function $$\log_a y$$:


 * $$x = \log_a y \iff y = a^x$$.

This is called the logarithm to the base $$a$$, or log base $$a$$.

When $$a = e$$, they are of course natural logarithms, and are sometimes called Napierian logarithms although this name too is dying out.

When $$a = 2$$, the notation which is starting to be used for $$\log_2 x$$ is $$\lg x$$. This concept is becoming increasingly important in computer science.

The act of performing the $$\log_a$$ function is colloquially known as "taking logs".

Common Logarithms
When $$a = 10$$, the logarithms are common logarithms, sometimes called Briggsian Logarithms. Before the advent of cheap means of electronic calculation, they used to be important.

Notation
The natural logarithm of $$x$$ is written variously as:


 * $$\ln x$$
 * $$\log x$$
 * $$\log_e x$$

The first of these is fairly commonly encountered, and frequently preferred. The second is ambiguous (it doesn't tell you which base it is the logarithm of) and the third is verbose.

However, notation is misleadingly inconsistent throughout the literature, and if there is any confusion about exactly what is meant, the full (verbose) format can be argued for.