In mathematics, the **logarithm** functions are the inverses of the exponential functions. If *y* is *x* to the power *p*, *y* = *x*^{p}, we also say that *p* is the logarithm of *y* in the base *x* (meaning *p* is the power we have to raise *x* to, in order to get y), and we write *p* = log_{x}*y*. For instance, log_{10}100 = 2 and log_{2}8 = 3. See /Identities for several rules governing the logarithm functions.

/Talk

Logarithms were invented by John Napier in the early 1600s. Before the widespread availability of electronic computers, logarithms were widely used as a calculating aid, both with [tables of logarithms]? and slide rules. The basic idea here is that the logarithm of a product is the sum of the logarithms, and adding is much easier than multiplication. Nowadays, the main use for logarithms is in solving equations in which the unknown(s) occur in the exponent.

There is a special base *e* (approximately 2.718) which has useful properties. The logarithm to this base is called the natural logarithm.
When dealing with the logarithms to the base *e*, it is common especially to denote log_{e} by ln, especially if there is any likelihood that the reader might think that base 10 or base 2 logarithms might be meant. In most pure mathematical work, log is used to denote log_{e}, in most engineering work, it means log_{10}, while in information theory, it often means log_{2}. Whenever a possibility for ambiguity exists, this ambiguity should be resolved by explicitly writing out the base.

In the theory of finite groups (see Mathematical Group) there is a notion of the [discrete logarithm]?. For some finite groups, it is believed that the discrete logarithm is very hard to calculate, whereas discrete exponentials are quite easy. This assymetry has applications in cryptography.

The logarithms of imaginary numbers are closely connected with the trigonometric functions (see trigonometry). This can be seen by starting with Euler's formula:

*r e*=^{ i θ}*r*cos*θ*+*i r*sin*θ*

If *θ* = π/2, then

*r e*=^{ i π/2}*i r*

Taking the log of both sides gives

- log
_{e}*r*+*i*π/2 = log_{e}*i r*

A similar derivation allows the calculation of the log of any complex number *a* + *i b*. The result is

- log
_{e}(*a*+*i b*) = log_{e}*r e*= log^{i θ}_{e}*r*+*i θ*

where *r* = (*a*^{2} + *b*^{2})^{1/2} and

- tan
*θ*=*b*/*a*

See the most remarkable formula in the world for some editorial on this sort of relationship.

/Talk