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.

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 = 10$$, the logarithms are sometimes called Briggsian Logarithms. Before the advent of cheap means of electronic calculation, they used to be important.

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".

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


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

The first of these is the most common and generally preferred. The second is ambiguous (it doesn't tell you which base it is the logarithm of) and the third is verbose.