It’s the Law Too — the Laws of Logarithms
Copyright © 2002–2015 by Stan Brown
Copyright © 2002–2015 by Stan Brown
Summary: Do you have trouble remembering the laws of logarithms? Do you know why you can change log(x)+log(y) to a different form, but not log(x+y)? This page helps you make sense out of the laws of logarithms.
See also: All the laws of logarithms flow directly out of the laws of exponents. If you feel a bit unsteady with the laws of exponents, please review them before going on.
A logarithm is just an exponent.
To be specific, the logarithm of a number x to a base b is just the exponent you put onto b to make the result equal x. For instance, since 5² = 25, we know that 2 (the power) is the logarithm of 25 to base 5. Symbolically, log5(25) = 2.
More generically, if x = by, then we say that y is “the logarithm of x to the base b” or “the base-b logarithm of x”. In symbols, y = logb(x). Every exponential equation can be rewritten as a logarithmic equation, and vice versa, just by interchanging the x and y in this way.
Another way to look at it is that the logbx function is defined as the inverse of the bx function. These two statements express that inverse relationship, showing how an exponential equation is equivalent to a logarithmic equation:
x = by is the same as y = logbx
Example 1: 1000 = 103 is the same as 3 = log101000.
Example 2: log381 = ? is the same as 3? = 81.
It can’t be said too often: a logarithm is nothing more than an exponent. You can write the above definition compactly, and show the log as an exponent, by substituting the second equation into the first to eliminate y:
Read that as “the logarithm of x in base b is the exponent you put on b to get x as a result.”
Before pocket calculators—only three decades ago, but in “student years” that’s the age of dinosaurs—the answer was simple. You needed logs to compute most powers and roots with fair accuracy; even multiplying and dividing most numbers were easier with logs. Every decent algebra books had pages and pages of log tables at the back.
The invention of logs in the early 1600s fueled the scientific revolution. Back then scientists, astronomers especially, used to spend huge amounts of time crunching numbers on paper. By cutting the time they spent doing arithmetic, logarithms effectively gave them a longer productive life. The slide rule, once almost a cartoon trademark of a scientist, was nothing more than a device built for doing various computations quickly, using logarithms. See Eli Maor’s e: The Story of a Number for more on this.
Today, logs are no longer used in routine number crunching. But there are still good reasons for studying them.
Why do we use logarithms, anyway? I could write a whole article about them—maybe one day. But for now. ...
(Historically, the main reason for teaching logs in grade school was to simplify computation, because the log of a multiplication “downgrades” it to an addition, and the log of a power expression “downgrades” it to a multiplication. Of course, with the widespread availability of personal computing devices, difficulty of computation is no longer a concern, but logs still have many applications in their own right.)
From the definition of a log as inverse of an exponential, you can immediately get some basic facts. For instance, if you graph y=10x (or the exponential with any other positive base), you see that its range is positive reals; therefore the domain of y=log x (to any base) is the positive reals. In other words, you can’t take log 0 or log of a negative number.
(Actually, if you’re willing to go outside the reals, you can take the log of a negative number. The technique is taught in many trigonometry courses.)
|You know that anything to the zero power is 1: b0 = 1. Change that to logarithmic form with the definition of logs and you have|
|logb1 = 0 for any base b|
|In the same way, you know that the first power of any number is just that number: b1 = b. Again, turn that around to logarithmic form and you have|
|logbb = 1 for any base b|
Example 3: ln 1 = 0
Example 4: log55 = 1
A log is an exponent because the log function is the inverse of the exponential function. The inverse function undoes the effect of the original function. (I’m not a big fan of most uses the term “cancel” in math, but it does fit in this situation.)
|This means that if you take the log of an exponential (to the same base, of course), you get back to where you started:|
|logbbx = x for any base b|
|This fact lets you evaluate many logarithms without a calculator.|
Example 5: log5125 = log5(5³) = 3
Example 6: log10103.16 = 3.16
Example 7: ln e-kt/2 = -kt/2
Any positive number is suitable as the base of logarithms, but two bases are used more than any others:
(if no base shown)
pronounced “ell-enn” or “lahn”
|Natural logs are logs, and follow all the same rules as any other logarithm. Just remember|
|ln x means logex|
Why base e? What’s so special about e? Most of the explanations need some calculus, for instance that ex is the only function that is both its own integral and its own derivative or that e has this beautiful definition in terms of factorials:
e = 1/0! + 1/1! + 1/2! + 1/3! + ...
Numerically, e is about 2.7182818284. It’s irrational (the decimal expansion never ends and never repeats), and in fact like π it’s transcendental (no polynomial equation with integer coefficients has π or e as a root.)
e (like π) crops up in all sorts of unlikely places, like computations of compound interest. It would take a book to explain, and fortunately there is a book, Eli Maor’s e: The Story of a Number. He also goes into the history of logarithms, and the book is well worth getting from your library.
In a minute we’ll look at the various combinations. But first you might want to know the general principle: logs reduce operations by one level. Logs turn a multiplication into an addition, a division into a subtraction, an exponent into a multiplication, and a radical into a division. Now let’s see why, and look at some examples.
Multiplying two expressions corresponds to adding their logarithms. Can we make sense of this?
|By the compact definition,|
|x = blogbx and y = blogby|
|and therefore, substituting for x and y,|
|xy = blogbx blogby|
|But when you multiply two powers of the same base, you add their exponents. So the right-hand side becomes|
|xy = blogbx+logby|
|Now apply the compact definition to the left=hand side:|
|blogb(xy) = xy|
|Combine that with the preceding equation to obtain|
|blogb(xy) = blogbx+logby|
|Now we have two powers of the same base. If the powers are equal, then the exponents must also be equal. Therefore|
|logb(xy) = logbx + logby|
So what’s the bottom line? Multiplying two numbers and taking the log is the same as taking their logs and adding.
Example 8: log8(x)+log8(x²) is the same as log8(xx²) or just log8(x³).
Example 9: log10(20)+log10(50) = log10(20×50) = log10(1000) = 3.
Continuing our theme of logarithms reducing the level of operations, if you have the yth power of a number and take the log, the result is y times the log of the number. Here’s why, starting with xy:
|Start with the compact definition of a logarithm:|
|x = blogbx|
|and raise both sides to the y power:|
|xy = (blogbx)y|
|A power of a power is equivalent to just multiplying the exponents. Simplify the right-hand side:|
|xy = b(y logbx)|
|Rewrite the left-hand side using the compact definition of a log:|
|blogb(xy) = xy|
|(The font may be hard to read: that’s x to the power y on left and right.) and combine the last two equations:|
|blogb(xy) = b(y logbx)|
|If the powers are equal and the bases are equal, the exponents must be equal:|
|logb(xy) = y logbx|
Example 10: ln(26) = 6 ln 2 (where “ln” means loge, the natural logarithm).
Example 11: log5(5x²) is not equal to 2 log5(5x). Be careful with order of operations! 5x² is 5(x²), not (5x)². log5(5x²) must first be decomposed as the log of the product: log55 + log5(x²). Then the second term can use the power rule, log5(x²) = 2 log5x. The first term is just 1. Summing up, log5(5x²) = 1 + 2 log5x.
The trick to evaluating expressions like 6.74.4 is to use the exponent rule and the log-as-inverse definition:
x = 6.74.4
log x = 4.4 ( log 6.7 ) = about 3.634729132
x = 103.63472... = about 4312.5
There’s nothing special about base-10 logs here. The calculation could just as well be
x = 6.74.4
ln x = 4.4 ( ln 6.7 ) = about 8.369273116
x = e8.36927... = about 4312.5
This will work for any positive base and any real exponent, so for example
x = ππ
log x = π (log π) = about 1.561842388
x = 101.5618... = about 36.46215961
You can combine this with the multiplying numbers = adding logarithms rule to evaluate powers that are too big for your calculator. For example, what is 671217?
x = 671217
log x = 217 (log 671) = about 613.3987869
Now, separate the integer and fractional parts of the logarithm.
log x = about 0.3987869 + 613
x = 100.3987869 + 613
x = 100.3987869 · 10613
x = about 2.505 · 10613
For examples like this, you really do have to use base-10 logs.
If the base is negative or the exponent is complex, see Powers and Roots of a Complex Number.
Since division is the opposite of multiplication, and subtraction is the opposite of addition, it’s not surprising that dividing two expressions corresponds to subtracting their logs. While we could go back again to the compact definition, it’s probably easier to use the two preceding properties.
|Start with the fact that 1/y = y−1 (see the definition of negative exponents):|
|x/y = x(1/y) = xy−1|
|and take the log of both sides:|
|logb(x/y) = logb(xy−1)|
|The right-hand side is the log of a product, which becomes the sum of the logs:|
|logb(x/y) = logbx + logb(y−1)|
|and the second term is the log of a power, which becomes (−1) times the log, or just minus the log:|
|logb(x/y) = logbx − logby|
In words, if you divide and take the log, that’s the same as subtracting the individual logs.
Example 12: 675÷15=45, and therefore log10675 − log1015 = log1045. (Try it on your calculator!)
Example 13: log(x³y²) − log(x²y³) = log(x³y² / x²y³) = log(x/y) = log(x) − log(y).
Now you have everything you need to change logarithms from one base to another. Look again at the compact equation that defines a log in base b:
|To change the log from base b to another base (call it a), you want to find loga(x). Since you already have x on one side of the above equation, it seems like a good start is to take the base-a log of both sides:|
|loga(blogbx) = logax|
|But the left-hand side of that equation is just the log of a power. You remember that log(xy) is just log(x) times y. So the equation simplifies to|
|(logab) (logbx) = logax|
Notice that logab is a constant. This means that the logs of all numbers in a given base a are proportional to the logs of the same numbers in another base b, and the proportionality constant logab is the log of one base in the other base. If you’re like me, you may have trouble remembering whether to multiply or divide. If so, just derive the equation—as you see, it takes only two steps.
|Some textbooks present the change-of-base formula as a fraction. To get the fraction from the above equation, simply divide by the proportionality constant logab:|
|logbx = (logax) / (logab)|
Example 14: log416 = (log 16) / (log 4). (You can verify this with your calculator, since you know log416 must equal 2.)
Example 15: Most calculators can’t graph y = log3x directly. But you can change the base to e and easily plot y = (ln x)÷(ln 3). (You could equally well use base 10.)
|An interesting side road leads from the above formula. Replace x everywhere with a—this is legal since the formula is true for all positive a, b, and x. You get|
|logba = (logaa) / (logab)|
|But logaa = 1 (see Log of 1 above), so the formula becomes|
|logba = 1 / (logab)|
Example 16: log10e = 1/(ln 10). (You can verify this with your calculator.)
Example 17: log1255 = 1/(log5125). This is easy to verify: 53 = 125, and 5 is the cube root of 125. Therefore log1255 = 1/3 and log5125 = 3, and 1/3 does indeed equal 1/3.
The laws of logarithms have been scattered through this longish page, so it might be helpful to collect them in one place. To make this even more amazingly helpful <grin>, the associated laws of exponents are shown here too.
For heaven’s sake, don’t try to memorize this table! Just use it to jog your memory as needed. Better yet, since a log is an exponent, use the laws of exponents to re-derive any property of logarithms that you may have forgotten. That way you’ll truly gain mastery of this material, and you’ll feel confident about the operations.
|(All laws apply for any positive a, b, x, and y.)|
|x = by is the same as y = logbx|
|b0 = 1||logb1 = 0|
|b1 = b||logbb = 1|
|b(logbx) = x||logbbx = x|
|bx by = bx+y||logb(xy) = logbx + logby|
|bx÷by = bx−y||logb(x/y) = logbx − logby|
|(bx)y = bxy||logb(xy) = y logbx|
|(logab) (logbx) = logax|
|logbx = (logax) / (logab)|
|logba = 1 / (logab)|
Don’t get creative! Most variations on the above are not valid.
Example 18: log (5+x) is not the same as log 5 + log x. As you know, log 5 + log x = log(5x), not log(5+x). Look carefully at the above table and you’ll see that there’s nothing you can do to split up log(x+y) or log(x−y).
Example 19: (log x) / (log y) is not the same as log(x/y). In fact, when you divide two logs to the same base, you’re working the change-of-base formula backward. Though it’s not often useful, (log x) / (log y) = logyx. Just don’t write log(x/y)!
Example 20: (log 5)(log x) is not the same as log(5x). You know that log(5x) is log 5 + log x. There’s really not much you can do with the product of two logs when they have the same base.
See also: Combining Operations (Distributive Laws)
Well, there you have it: the laws of logarithms demystified! The general rule is that logs simply drop an operation down one level: exponents become multipliers, divisions become subtractions, and so on. If ever you’re unsure of an operation, like how to change base, work it out by using the definition of a log and applying the laws of exponents, and you won’t go wrong.