Logarithms and exponentials with the same base cancel each other. This is true because logarithms and exponentials are inverse operations. Both of the above are derived from the following two equations that define a logarithm: Substituting in the left equation gives, and substituting in the right gives. Finally, replace with.
Using simpler operations
Logarithms can be used to make calculations easier. For example, two numbers can be multiplied just by using a logarithm table and adding. The first three operations below assume, and/or so that and. Derivations also use the log definitions and. Where,, and are positive real numbers and. Both and are real numbers. The laws result from canceling exponentials and appropriate law of indices. Starting with the first law: The law for powers exploits another of the laws of indices: The law relating to quotients then follows: Similarly, the root law is derived by rewriting the root as a reciprocal power:
Changing the base
This identity is useful to evaluate logarithms on calculators. For instance, most calculators have buttons for ln and for, but not all calculators have buttons for the logarithm of an arbitrary base. This formula has several consequences: where is any permutation of the subscripts 1, ..., n. For example
Summation/subtraction
The following summation/subtraction rule is especially useful in probability theory when one is dealing with a sum of log-probabilities: Note that in practice and have to be switched on the right hand side of the equations if. Also note that the subtraction identity is not defined if since the logarithm of zero is not defined. Many programming languages have a specific log1p function that calculates without underflow when is small. More generally: where are sorted in descending order.
Exponents
A useful identity involving exponents: or more universally:
Other/Resulting Identities
Inequalities
Based on , and All are accurate around, but not for large numbers.
To remember higher integrals, it's convenient to define: Where is the nth Harmonic number. Then,
Approximating large numbers
The identities of logarithms can be used to approximate large numbers. Note that, where a, b, and c are arbitrary constants. Suppose that one wants to approximate the 44th Mersenne prime,. To get the base-10 logarithm, we would multiply 32,582,657 by, getting. We can then get. Similarly, factorials can be approximated by summing the logarithms of the terms.
The convention will be used here that a capital first letter is used for the principal value of functions and the lower case version refers to the multivalued function. The single valued version of definitions and identities is always given first followed by a separate section for the multiple valued versions. The multiple valued version of is a set but it is easier to write it without braces and using it in formulas follows obvious rules. When k is any integer:
Constants
Principal value forms: Multiple value forms, for any k an integer:
Summation
Principal value forms: Multiple value forms:
Powers
A complex power of a complex number can have many possible values. Principal value form: Multiple value forms: Where, are any integers: