In mathematics, the logarithm of a number is the exponent by which another fixed value, the base, must be raised to produce that number. For example, the logarithm of to base is , because is to the rd power: . More generally, if , then is the logarithm of to base , written , so . As a single-variable function, the logarithm to base is the inverse function of exponentiation with base .
The logarithm base is called the decimal or common logarithm and is commonly used in science and engineering. The natural logarithm has the number as its base; its use is widespread in mathematics and physics because of its very simple derivative. The binary logarithm uses base and is widely used in computer science, information theory, music theory, and photography. When the base is unambiguous from the context or irrelevant it is often omitted, and the logarithm is written .
Logarithms were introduced by John Napier in 1614 as a means of simplifying calculations. They were rapidly adopted by , scientists, engineers, surveying, and others to perform high-accuracy computations more easily. Using , tedious multi-digit multiplication steps can be replaced by table look-ups and simpler addition. This is possible because the logarithm of a product is the summation of the logarithms of the factors:
provided that , and are all positive and . The slide rule, also based on logarithms, allows quick calculations without tables, but at lower precision. The present-day notion of logarithms comes from Leonhard Euler, who connected them to the exponential function in the 18th century, and who also introduced the letter as the base of natural logarithms.
Logarithmic scales reduce wide-ranging quantities to smaller scopes. For example, the decibel (dB) is a unit used to express ratio as logarithms, mostly for signal power and amplitude (of which sound pressure is a common example). In chemistry, pH is a logarithmic measure for the of an aqueous solution. Logarithms are commonplace in scientific , and in measurements of the complexity of algorithms and of geometric objects called . They help to describe frequency ratios of musical intervals, appear in formulas counting or approximating , inform some models in psychophysics, and can aid in forensic accounting.
The concept of logarithm as the inverse of exponentiation extends to other mathematical structures as well. However, in general settings, the logarithm tends to be a multi-valued function. For example, the complex logarithm is the multi-valued inverse function of the complex exponential function. Similarly, the discrete logarithm is the multi-valued inverse of the exponential function in finite groups; it has uses in public-key cryptography.
For example, raising to the power of gives :
The logarithm of base is the inverse operation, that provides the output from the input . That is, is equivalent to if is a positive real number. (If is not a positive real number, both exponentiation and logarithm can be defined but may take several values, which makes definitions much more complicated.)
One of the main historical motivations of introducing logarithms is the formula
by which logarithm table allow multiplication and division to be reduced to addition and subtraction, a great aid to calculations before the invention of computers.
The logarithm is denoted "" (pronounced as "the logarithm of to base ", "the logarithm of ", or most commonly "the log, base , of ").
An equivalent and more succinct definition is that the function is the inverse function to the function .
+ Product, quotient, power, and root identities of logarithms |
Typical scientific calculators calculate the logarithms to bases 10 and ., p. 21 Logarithms with respect to any base can be determined using either of these two logarithms by the previous formula:
Given a number and its logarithm to an unknown base , the base is given by:
which can be seen from taking the defining equation to the power of
Thus, is related to the number of of a positive integer : The number of digits is the smallest integer strictly bigger than
For example, is approximately 3.78 . The next integer above it is 4, which is the number of digits of 5986. Both the natural logarithm and the binary logarithm are used in information theory, corresponding to the use of nats or as the fundamental units of information, respectively.
Binary logarithms are also used in computer science, where the binary system is ubiquitous; in music theory, where a pitch ratio of two (the octave) is ubiquitous and the number of cents between any two pitches is a scaled version of the binary logarithm, or log 2 times 1200, of the pitch ratio (that is, 100 cents per semitone in conventional equal temperament), or equivalently the log base and in photography rescaled base 2 logarithms are used to measure , luminance, , lens , and in "stops".
The abbreviation is often used when the intended base can be inferred based on the context or discipline, or when the base is indeterminate or immaterial. Common logarithms (base 10), historically used in logarithm tables and slide rules, are a basic tool for measurement and computation in many areas of science and engineering; in these contexts still often means the base ten logarithm.
In mathematics usually refers to the natural logarithm (base ).
In computer science and information theory, often refers to binary logarithms (base 2).
See also ISO 80000-2 .
The common logarithm of a number is the index of that power of ten which equals the number.William Gardner (1742) Tables of Logarithms Speaking of a number as requiring so many figures is a rough allusion to common logarithm, and was referred to by Archimedes as the "order of a number". The first real logarithms were heuristic methods to turn multiplication into addition, thus facilitating rapid computation. Some of these methods used tables derived from trigonometric identities.Enrique Gonzales-Velasco (2011) Journey through Mathematics – Creative Episodes in its History, §2.4 Hyperbolic logarithms, p. 117, Springer Such methods are called prosthaphaeresis.
Invention of the function now known as the natural logarithm began as an attempt to perform a quadrature of a rectangular hyperbola by Grégoire de Saint-Vincent, a Belgian Jesuit residing in Prague. Archimedes had written The Quadrature of the Parabola in the third century BC, but a quadrature for the hyperbola eluded all efforts until Saint-Vincent published his results in 1647. The relation that the logarithm provides between a geometric progression in its argument and an arithmetic progression of values, prompted A. A. de Sarasa to make the connection of Saint-Vincent's quadrature and the tradition of logarithms in prosthaphaeresis, leading to the term "hyperbolic logarithm", a synonym for natural logarithm. Soon the new function was appreciated by Christiaan Huygens, and James Gregory. The notation was adopted by Gottfried Wilhelm Leibniz in 1675,Florian Cajori (1913) "History of the exponential and logarithm concepts", American Mathematical Monthly 20: 5, 35, 75, 107, 148, 173, 205 and the next year he connected it to the integral
Before Euler developed his modern conception of complex natural logarithms, Roger Cotes had a nearly equivalent result when he showed in 1714 that
... an admirable artifice which, by reducing to a few days the labour of many months, doubles the life of the astronomer, and spares him the errors and disgust inseparable from long calculations., p. 44
As the function is the inverse function of , it has been called an antilogarithm., section 4.7., p. 89 Nowadays, this function is more commonly called an exponential function.
Greater accuracy can be obtained by interpolation:
The value of can be determined by reverse look up in the same table, since the logarithm is a monotonic function.
and
For manual calculations that demand any appreciable precision, performing the lookups of the two logarithms, calculating their sum or difference, and looking up the antilogarithm is much faster than performing the multiplication by earlier methods such as prosthaphaeresis, which relies on trigonometric identities.
Calculations of powers and nth root are reduced to multiplications or divisions and lookups by
and
Trigonometric calculations were facilitated by tables that contained the common logarithms of trigonometric functions.
For example, adding the distance from 1 to 2 on the lower scale to the distance from 1 to 3 on the upper scale yields a product of 6, which is read off at the lower part. The slide rule was an essential calculating tool for engineers and scientists until the 1970s, because it allows, at the expense of precision, much faster computation than techniques based on tables.
It is a standard result in real analysis that any continuous strictly monotonic function is bijective between its domain and range. This fact follows from the intermediate value theorem., section III.3 Now, is strictly increasing (for ), or strictly decreasing (for ), is continuous, has domain , and has range . Therefore, is a bijection from to . In other words, for each positive real number , there is exactly one real number such that .
We let denote the inverse of . That is, is the unique real number such that . This function is called the base- logarithm function or logarithmic function (or just logarithm).
More precisely, the logarithm to any base is the only increasing function f from the positive reals to the reals satisfying and item (4.3.1)
That is, the slope of the tangent touching the graph of the logarithm at the point equals .
The derivative of is ; this implies that is the unique antiderivative of that has the value 0 for . It is this very simple formula that motivated to qualify as "natural" the natural logarithm; this is also one of the main reasons of the importance of the constant .
The derivative with a generalized functional argument is
The quotient at the right hand side is called the logarithmic derivative of . Computing by means of the derivative of is known as logarithmic differentiation., p. 386 The antiderivative of the natural logarithm is:
Related formulas, such as antiderivatives of logarithms to other bases can be derived from this equation using the change of bases.
This definition has the advantage that it does not rely on the exponential function or any trigonometric functions; the definition is in terms of an integral of a simple reciprocal. As an integral, equals the area between the -axis and the graph of the function , ranging from to . This is a consequence of the fundamental theorem of calculus and the fact that the derivative of is . Product and power logarithm formulas can be derived from this definition., section III.6 For example, the product formula is deduced as:
The equality (1) splits the integral into two parts, while the equality (2) is a change of variable (). In the illustration below, the splitting corresponds to dividing the area into the yellow and blue parts. Rescaling the left hand blue area vertically by the factor and shrinking it by the same factor horizontally does not change its size. Moving it appropriately, the area fits the graph of the function again. Therefore, the left hand blue area, which is the integral of from to is the same as the integral from 1 to . This justifies the equality (2) with a more geometric proof.
The power formula may be derived in a similar way:
The second equality uses a change of variables (integration by substitution), .
The sum over the reciprocals of natural numbers,
is called the harmonic series. It is closely tied to the natural logarithm: as tends to infinity, the difference,
converges (i.e. gets arbitrarily close) to a number known as the Euler–Mascheroni constant . This relation aids in analyzing the performance of algorithms such as quicksort., sections 11.5 and 13.8
Equating the function to this infinite sum (series) is shorthand for saying that the function can be approximated to a more and more accurate value by the following expressions (known as ):
For example, with the third approximation yields , which is about greater than , and the ninth approximation yields , which is only about greater. The th partial sum can approximate with arbitrary precision, provided the number of summands is large enough.
In elementary calculus, the series is said to converge to the function , and the function is the limit of the series. It is the Taylor series of the natural logarithm at . The Taylor series of provides a particularly useful approximation to when is small, , since then
For example, with the first-order approximation gives , which is less than off the correct value .
for any real number . Using sigma notation, this is also written as
This series can be derived from the above Taylor series. It converges quicker than the Taylor series, especially if is close to 1. For example, for , the first three terms of the second series approximate with an error of about . The quick convergence for close to 1 can be taken advantage of in the following way: given a low-accuracy approximation and putting
the logarithm of is:
The better the initial approximation is, the closer is to 1, so its logarithm can be calculated efficiently. can be calculated using the exponential series, which converges quickly provided is not too large. Calculating the logarithm of larger can be reduced to smaller values of by writing , so that .
A closely related method can be used to compute the logarithm of integers. Putting in the above series, it follows that:
If the logarithm of a large integer is known, then this series yields a fast converging series for , with a rate of convergence of .
Here denotes the arithmetic–geometric mean of and . It is obtained by repeatedly calculating the average (arithmetic mean) and (geometric mean) of and then let those two numbers become the next and . The two numbers quickly converge to a common limit which is the value of . is chosen such that
to ensure the required precision. A larger makes the calculation take more steps (the initial and are farther apart so it takes more steps to converge) but gives more precision. The constants and can be calculated with quickly converging series.
The strength of an earthquake is measured by taking the common logarithm of the energy emitted at the quake. This is used in the moment magnitude scale or the Richter magnitude scale. For example, a 5.0 earthquake releases 32 times and a 6.0 releases 1000 times the energy of a 4.0., section 4.4. Apparent magnitude measures the brightness of stars logarithmically., section 8.3, p. 231 In chemistry the negative of the decimal logarithm, the decimal , is indicated by the letter p. For instance, pH is the decimal cologarithm of the activity of hydronium ions (the form hydrogen take in water). The activity of hydronium ions in neutral water is 10−7 mol·L−1, hence a pH of 7. Vinegar typically has a pH of about 3. The difference of 4 corresponds to a ratio of 104 of the activity, that is, vinegar's hydronium ion activity is about .
Semi-log plot (log–linear) graphs use the logarithmic scale concept for visualization: one axis, typically the vertical one, is scaled logarithmically. For example, the chart at the right compresses the steep increase from 1 million to 1 trillion to the same space (on the vertical axis) as the increase from 1 to 1 million. In such graphs, exponential functions of the form appear as straight lines with slope equal to the logarithm of . Log-log plot graphs scale both axes logarithmically, which causes functions of the form to be depicted as straight lines with slope equal to the exponent . This is applied in visualizing and analyzing ., section 34
Psychological studies found that individuals with little mathematics education tend to estimate quantities logarithmically, that is, they position a number on an unmarked line according to its logarithm, so that 10 is positioned as close to 100 as 100 is to 1000. Increasing education shifts this to a linear estimate (positioning 1000 10 times as far away) in some circumstances, while logarithms are used when the numbers to be plotted are difficult to plot linearly.
Logarithms also occur in log-normal distributions. When the logarithm of a random variable has a normal distribution, the variable is said to have a log-normal distribution. Log-normal distributions are encountered in many fields, wherever a variable is formed as the product of many independent positive random variables, for example in the study of turbulence.
Logarithms are used for maximum-likelihood estimation of parametric statistical models. For such a model, the likelihood function depends on at least one parametric model that must be estimated. A maximum of the likelihood function occurs at the same parameter-value as a maximum of the logarithm of the likelihood (the " log likelihood"), because the logarithm is an increasing function. The log-likelihood is easier to maximize, especially for the multiplied likelihoods for independent random variables., section 11.3
Benford's law describes the occurrence of digits in many , such as heights of buildings. According to Benford's law, the probability that the first decimal-digit of an item in the data sample is (from 1 to 9) equals , regardless of the unit of measurement., section 2.1 Thus, about 30% of the data can be expected to have 1 as first digit, 18% start with 2, etc. Auditors examine deviations from Benford's law to detect fraudulent accounting.
The logarithm transformation is a type of data transformation used to bring the empirical distribution closer to the assumed one.
For example, to find a number in a sorted list, the binary search algorithm checks the middle entry and proceeds with the half before or after the middle entry if the number is still not found. This algorithm requires, on average, comparisons, where is the list's length., section 6.2.1, pp. 409–26 Similarly, the merge sort algorithm sorts an unsorted list by dividing the list into halves and sorting these first before merging the results. Merge sort algorithms typically require a time approximately proportional to . The base of the logarithm is not specified here, because the result only changes by a constant factor when another base is used. A constant factor is usually disregarded in the analysis of algorithms under the standard uniform cost model.
A function is said to grow logarithmically if is (exactly or approximately) proportional to the logarithm of . (Biological descriptions of organism growth, however, use this term for an exponential function., chapter 19, p. 298) For example, any natural number can be represented in binary form in no more than . In other words, the amount of memory needed to store grows logarithmically with .
The sum is over all possible states of the system in question, such as the positions of gas particles in a container. Moreover, is the probability that the state is attained and is the Boltzmann constant. Similarly, entropy in information theory measures the quantity of information. If a message recipient may expect any one of possible messages with equal likelihood, then the amount of information conveyed by any one such message is quantified as bits., section III.I
Lyapunov exponents use logarithms to gauge the degree of chaoticity of a dynamical system. For example, for a particle moving on an oval billiard table, even small changes of the initial conditions result in very different paths of the particle. Such systems are chaos theory in a deterministic way, because small measurement errors of the initial state predictably lead to largely different final states., section 1.9 At least one Lyapunov exponent of a deterministically chaotic system is positive.
Intervals between arbitrary pitches can be measured in octaves by taking the logarithm of the frequency ratio, can be measured in equally tempered semitones by taking the logarithm ( times the logarithm), or can be measured in cents, hundredths of a semitone, by taking the logarithm ( times the logarithm). The latter is used for finer encoding, as it is needed for finer measurements or non-equal temperaments., chapter 5
in the sense that the ratio of and that fraction approaches 1 when tends to infinity., theorem 4.1 As a consequence, the probability that a randomly chosen number between 1 and is prime is inversely proportional to the number of decimal digits of . A far better estimate of is given by the offset logarithmic integral function , defined by
The Riemann hypothesis, one of the oldest open mathematical , can be stated in terms of comparing and . The Erdős–Kac theorem describing the number of distinct also involves the natural logarithm.
The logarithm of n factorial, , is given by
This can be used to obtain Stirling's formula, an approximation of for large ., chapter 4
are called complex logarithms of , when is (considered as) a complex number. A complex number is commonly represented as , where and are real numbers and is an imaginary unit, the square of which is −1. Such a number can be visualized by a point in the complex plane, as shown at the right. The polar form encodes a non-zero complex number by its absolute value, that is, the (positive, real) distance to the origin, and an angle between the real () axis and the line passing through both the origin and . This angle is called the argument of .
The absolute value of is given by
Using the geometrical interpretation of sine and cosine and their periodicity in , any complex number may be denoted as
for any integer number . Evidently the argument of is not uniquely specified: both and are valid arguments of for all integers , because adding or k⋅360° to corresponds to "winding" around the origin counter-clock-wise by turns. The resulting complex number is always , as illustrated at the right for . One may select exactly one of the possible arguments of as the so-called principal argument, denoted , with a capital , by requiring to belong to one, conveniently selected turn, e.g. , Definition 1.6.3 or ., section 5.9 These regions, where the argument of is uniquely determined are called principal branch of the argument function.
Euler's formula connects the trigonometric functions sine and cosine to the complex exponential:
Using this formula, and again the periodicity, the following identities hold:, section 1.2
where is the unique real natural logarithm, denote the complex logarithms of , and is an arbitrary integer. Therefore, the complex logarithms of , which are all those complex values for which the power of equals , are the infinitely many values
for arbitrary integers .
Taking such that is within the defined interval for the principal arguments, then is called the principal value of the logarithm, denoted , again with a capital . The principal argument of any positive real number is 0; hence is a real number and equals the real (natural) logarithm. However, the above formulas for logarithms of products and powers do generalize to the principal value of the complex logarithm., theorem 6.1.
The illustration at the right depicts , confining the arguments of to the interval . This way the corresponding branch of the complex logarithm has discontinuities all along the negative real axis, which can be seen in the jump in the hue there. This discontinuity arises from jumping to the other boundary in the same branch, when crossing a boundary, i.e. not changing to the corresponding -value of the continuously neighboring branch. Such a locus is called a branch cut. Dropping the range restrictions on the argument makes the relations "argument of ", and consequently the "logarithm of ", multi-valued functions.
In the context of exponentiation is given by repeatedly multiplying one group element with itself. The discrete logarithm is the integer solving the equation
where is an element of the group. Carrying out the exponentiation can be done efficiently, but the discrete logarithm is believed to be very hard to calculate in some groups. This asymmetry has important applications in public key cryptography, such as for example in the Diffie–Hellman key exchange, a routine that allows secure exchanges of cryptography keys over unsecured information channels. Zech's logarithm is related to the discrete logarithm in the multiplicative group of non-zero elements of a finite field.
Further logarithm-like inverse functions include the double logarithm , the super-logarithm (a slight variation of which is called iterated logarithm in computer science), the Lambert W function, and the logit. They are the inverse functions of the double exponential function, tetration, of , and of the logistic function, respectively., p. 357
logarithmic form appear in complex analysis and algebraic geometry as differential forms with logarithmic poles., section 2
The polylogarithm is the function defined by
It is related to the natural logarithm by . Moreover, equals the Riemann zeta function .
|
|