Logarithm

Introduction: logarithm as inverse of exponentiation

There are three simple ways equate a with b: using addition, a + cdiff = b, scaling, a * cscaler = b or exponentiation, ac = b. Similarly to the first case, where cdiff is called difference and is computed by subtraction, cdiff = b-a, and the second of multiplication, where factor cscaler = b/a is computed by division (you say that subtraction and division are inverses of the addition and multiplication, correspondingly), the appropriate power c, called exponent, of base a is computed by the logarithm function, c = loga(b). Therefore, the logarithm is a function, inverse of exponentiation.

Actually, because two arguments, the base a and power n, are not commutative in exponentiation an = b, there are two inverse operations. The first one, which computes a, given b and n, is known as n-th root. The logarithm, which computes n, given a and b is the other.

So, basically,

Formal definition

The logarithm is a function of two arguments, a and b, that computes such c

c = \log_a b

 

 

 

 

(2 )

that satisfies the equation

a^c = b

 

 

 

 

(1 )


The result of the log function is also called logarithm of b with respect to base a or exponent because it is the power that must be applied to the base a to get b.

Properties

The first thing we get by plugging (1 ) into (2 ):

c = \log_a a^c.

 

 

 

 

(3.1 )

It basically says that \log_a a^c is equivalent to c. Similar rule is obtained plugging (2 ) into (1 ):

a^{\log_a b} = b

 

 

 

 

(3.2 )

Because you must raise a into power 1 to get a, you may write

a¹ = a or

{\log_a a} = 1

 

 

 

 

(4.1 )

Similarly, because to get 1 you must raise any number into power 0,

a^0 = 1 is equivalent to the logarithm property

{\log_a 1} = 0

 

 

 

 

(4.2 )

and, finally,

a^{-\infty} = 0 is identical to

{\log_a 0} = -\infty

 

 

 

 

(4.3 )

Note the controversy between (4.1 ) and (4.2 ): log11 = 1 according to the first rule and 0, according to the second.

Log (m*n) = log(m) + log(n)

Without loss of generality, we can define l and m to stand for powers of a,

\begin{array}{lcr} l = a^\lambda & \quad\overset\text{by 3.1}{\Longleftrightarrow}& \lambda = \log_a l\\ m = a^\mu &  & \mu = \log_a m\end{array}

whereupon, the logarithm of the product is

\log_a (l \cdot m) = \log_a (a^\lambda \cdot a^\mu) = \log_a a^{\lambda + \mu} \overset{by\ 3.1}{=} \lambda + \mu \overset\text{by definition above}{=} \log_a l + \log_a m.

In short, we arrived at law log of a product equals the sum of the logarithmed operands:

\log (l \cdot m) = \log l + \log m.

 

 

 

 

(5 )

The base `a` is omitted because the law holds for any base.

This explains how logarithms replace multiplication with summation. They, further, replace exponentiation with multiplication:

Log (ak) = k log(a)

Decomposing the first term m = m1 * m2 of the equation (5 ) above and using it two times, we can get

\log [(m_1 m_2) n] = \log (m_1 m_2) + \log n = \log m_1 + \log m_2 + \log n

You can see that this operation is associative

\log [m_1 (m_2 n)] = \log m_1 + (\log m_2 + \log n)

and commutative

\log (m n) = \log m + \log n = \log n + \log m = \log (n m)


The associativity and commutativity properties are valid for arbitrary number of terms

\log (m_1 m_2 \ldots m_n) = \log m_1 + \log m_2 + \cdots + \log m_n

One important case of having k identical items m1 = m2 = ... = mn = m, gives:

\log m^\textbf{k} = \textbf{k} \ \log m

 

 

 

 

(11 )

If we are not familiar with logarithm of product, the same formula can be proven if we start with a¹=m, whence loga(m)= 1 and, raised to the power, ak=mk gives loga(mk) = k = k * 1 = k loga(m). The same can be demonstrated starting with identity (3.2 ), raised to the power k, b^k = a^{k\log b} and, applying (1 ) with mapping b^k \rightarrow b, k\log b \rightarrow c, we get the \log b^k = k\log b.

Similarly, we can prove that factoring the power out of base, has the opposite effect:

\log_{a^\textbf{k}} m = \textbf{1/k} \ \log_a m

 

 

 

 

(12 )

Change of bases

Sometimes you have a library that computes logs in some fixed base, say log2, but you need to compute a logarithm of a number, say 3, in some different base, say 10. How do you compute x=log10(3), given log2 function? You need to compute such x that 10x = 3. Apply log2 to both left and right to get

\log_2 10^x = \log_2 3

Apply the last property of (11 )

x \log_2 10 = \log_2 3

and divide both sides by \log_2 10 and get

x = {\log_2 3 \over \log_2 10}.

Generally,

\log_m n = {\log_a n \over \log_a m}
This article is issued from Wikiversity - version of the Saturday, September 26, 2015. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.