Properties of logarithms
We define [math]\displaystyle{ b^n = a }[/math] as number [math]\displaystyle{ b }[/math] to the power [math]\displaystyle{ n }[/math] is equal to [math]\displaystyle{ a }[/math]. With zero to the power zero being undefined. The logarithm is defined as [math]\displaystyle{ \log_{b}a = n }[/math]. That is, the number [math]\displaystyle{ a }[/math], with a base [math]\displaystyle{ b }[/math], such that [math]\displaystyle{ b^n = a }[/math]. With exponentiation we want to find the result of the operation. With logarithm we want to find the exponent itself by knowing the base and the result of the exponentiation.
I'm going to rely on the arrow and on the function's concept to explain a little confusion that happens with log and exp. Suppose I write this [math]\displaystyle{ b^n \to a }[/math] to mean a function that associates two numbers to another. Then I write this [math]\displaystyle{ a \to b^n }[/math] to make the reversed association. First, [math]\displaystyle{ b^n }[/math] the [math]\displaystyle{ b }[/math] is fixed, static, the variable is the power (exponent). Second, log is the inverse of exp, but the reversed arrow exposes a little confusion. What the log tries to find is the unknown power, not the [math]\displaystyle{ b }[/math] or [math]\displaystyle{ a }[/math] because these two are already known. That's a very common confusion, to think that log is calculating the [math]\displaystyle{ b }[/math], which we already know. We can have unknowns anywhere in the log, be it the base, the exponent or the result. But we define log as the inverse of exponentiation and it only makes sense for this definition is to have the unknown to be the exponent.
If you remember that what the log calculates is the exponent from the exponential, that should make all properties of logarithms easier to grasp.
The properties
The base does not matter, the properties do not depend on which base the log is. The single source of most confusions with these properties is that people look at log and, unconsciously, think that the relationship between log and another log is linear. For ex: to think that to multiply by log of two doubles something. Conversely, thinking that log is akin to divide by some constant.
- [math]\displaystyle{ a^{\log_a{b}} = b }[/math]. When the exponent is a log and the base of the log is the base of the exponential itself, the result is the number of which log we are calculating. I'm going to say that I think this property is best explained if you mention that it's really using the concept of the inverse function. Don't we define exp and log (I'm using the natural base but any base will do) as being one the inverse of the other? Then:
[math]\displaystyle{ e(x) = e^x }[/math]
[math]\displaystyle{ ln(x) = \log_e{x} }[/math]
[math]\displaystyle{ e(ln(x)) = e^{\ln{x}} }[/math] (It's really much better to see this property as using the inverse function as the argument of the first function than memorizing a meaningless rule. We do some operation to some number and then "undo" it with an inverse function. That yields the number that we began with.)
Let's rewrite the first expression with log and see what happens:
[math]\displaystyle{ \log_a{b} = \log_a{b} \iff a^{\log_a{b}} = b }[/math] (it could be argued that just by reading it properly one should see that this isn't really any special rule or property, we really just wrote the log mixing it up with an exponential)
- [math]\displaystyle{ \log_p(a^b) = b\log_p(a) }[/math]. Careful! The exponent is nested in the log, we aren't taking the log itself to some power! About the proof itself, we have an statement that says that the left side is equal to the right side. What we are going to do is to prove that the right side is equal to the left side. Why? Because we have a certain property that is assumed to be true and we want to go "backwards" in the sense that we want to transform the right side back into the left side. Let's call [math]\displaystyle{ \log_p(a) = m }[/math]
[math]\displaystyle{ p^m = a }[/math] | Rewrite it as an exponential. From here where to go? Rewriting as log won't do anything useful and just go back to the previous step. |
[math]\displaystyle{ p^{bm} = a^b }[/math] | Calculate the same power on both sides. Not just a random number, let's use the same number that is the exponent in the beginning and see some interesting result |
[math]\displaystyle{ \log_p(p^{bm}) = \log_p(a^b) }[/math] | Take the same log on both sides. Hey there! The right side is the same as in the beginning! Let's do something to the left side. |
[math]\displaystyle{ bm \log_p(p) = \log_p(a^b) }[/math][math]\displaystyle{ \iff b \log_p(a) = \log_p(a^b) }[/math] | Remember the substitution that we did in the beginning. With [math]\displaystyle{ \log_p(p) = 1 }[/math] we have just proven the property. |
Remember that: [math]\displaystyle{ (p^{a})^b = p^{ab} }[/math] |
- [math]\displaystyle{ \log(ab) = \log(a) + \log(b) }[/math]. Let's call [math]\displaystyle{ \log(a) = m }[/math] and [math]\displaystyle{ \log(b) = n }[/math].
[math]\displaystyle{ \log_p(a) = m \iff p^m = a }[/math]
[math]\displaystyle{ \log_p(b) = n \iff p^n = b }[/math]
[math]\displaystyle{ ab = (p^m)(p^n) \iff ab = p^{m \ + \ n} }[/math] | From here we could rewrite the same expression as a log, but that won't solve anything because it's just going backwards. In addition, we don't have any property about [math]\displaystyle{ \log(m + n) }[/math] |
[math]\displaystyle{ \log_p(ab) = \log_p(p^{m \ + \ n}) }[/math] | Apply log on both sides. Note that on the right side we have an exponential nested in the log, one "cancels" the other, leaving the power untouched. |
[math]\displaystyle{ \log_p(ab) = (m + n)\log_p(p) }[/math][math]\displaystyle{ \iff \log_p(ab) = (m + n) }[/math] | From this point if we rewrite this as an exponential we are just taking steps backwards. |
[math]\displaystyle{ \log_p(ab) = \log_p(a) + \log_p(b) }[/math] | We did use a substitution and now we are "undoing" it. |
Remember that: [math]\displaystyle{ p^a p^b = p^{a \ + \ b} }[/math] |
- [math]\displaystyle{ \log\left(\frac{a}{b}\right) = \log(a) - \log(b) }[/math]. This property is easier to prove if we use the negative exponent:
[math]\displaystyle{ \log(ab^{-1}) = \log(a) + \log(b^{-1}) }[/math] (From the previous proof)
[math]\displaystyle{ \log(ab^{-1}) = \log(a) - \log(b) }[/math] (From the property that [math]\displaystyle{ \log_p(a^b) = b\log_p(a) }[/math])
Remember that: [math]\displaystyle{ \frac{p^a}{p^b} = p^{a \ - \ b} }[/math]