What is a logarithm?

Log­a­r­ithms are a group of func­tions that map num­bers to num­bers. There is a log­a­r­ithm func­tion for ev­ery pos­i­tive num­ber \(b\) ex­cept 1, and the log­a­r­ithm func­tion for \(b\) (called “the log­a­r­ithm base \(b\)” or just “log base \(b\)”) takes an in­put \(x\) and counts how many times you have to mul­ti­ply \(1\) by \(b\) to get \(x\).

For ex­am­ple, the log base 10 of 1000 is 3, be­cause you have to mul­ti­ply 1 by 10 three times to get 1000, and the log base 2 of 16 is 4, be­cause you have to mul­ti­ply 1 by 2 four times to get 16. The log base \(b\) of \(x\) is writ­ten \(\log_b(x).\)

The log­a­r­ithm func­tion grows slowly. For ex­am­ple, \(\log_{10}(x)\) is less than 1 un­til \(x\) reaches 10, and it’s less than 2 un­til \(x\) reaches 100, and it’s less than 6 un­til \(x\) reaches 1,000,000 and so on. You’ve got to put a lot of oomph (speci­fi­cally, a whole fac­tor of 10) into the in­put in or­der to make the out­put go up by 1. Here’s a graph of \(\log_{10}(x)\) inch­ing its way to­wards a measly 2 as \(x\) makes it all the way out to 100:

log10

Make this graph in­ter­ac­tive.

Log­a­r­ithms may grow slowly, but they never stop grow­ing: For ev­ery num­ber \(n\), no mat­ter how large, there is an in­put \(x\) such that \(\log_{10}(x) > n.\)

Examples

  1. \(\log_{10}(10000) = 4,\) be­cause you have to mul­ti­ply 1 by 10 four times to get ten thou­sand: \(1 \cdot 10 \cdot 10 \cdot 10 \cdot 10 = 10000.\)

  2. \(\log_2(8) = 3,\) be­cause \(1 \cdot 2 \cdot 2 \cdot 2 = 8.\)

  3. \(\log_3(9) = 2,\) be­cause \(1 \cdot 3 \cdot 3 = 9.\)

  4. \(\log_{b}(1) = 0\) for any \(b\), be­cause no mat­ter what \(b\) is, you don’t need to mul­ti­ply 1 by \(b\) any times to get 1.

  5. \(\log_{b}(b) = 1\) for any \(b\), be­cause no mat­ter what \(b\) is, if you mul­ti­ply 1 by \(b\) once, you get \(b.\)

  6. \(\log_{1.5}(3.375) = 3,\) be­cause \(1 \cdot 1.5 \cdot 1.5 \cdot 1.5 = 3.375.\)

Ques­tion: What’s \(\log_3(27)\)?

An­swer: 3, be­cause \(1 \cdot 3 \cdot 3 \cdot 3 = 27\).

Ques­tion: What’s \(\log_4(16)\)?

An­swer: 2, be­cause \(1 \cdot 4 \cdot 4 = 16\).

Ques­tion: What’s \(\log_{10}(\text{1,000,000})\)?

An­swer: 6, be­cause \(1 \cdot 10 \cdot 10 \cdot 10 \cdot 10 \cdot 10 \cdot 10 = 1,000,000\).

All of the ex­am­ples above are cases where the an­swer is a whole num­ber, be­cause \(x\) is a power of \(b.\) Log­a­r­ithms also give an­swers in cases where the an­swer is not a whole num­ber. For ex­am­ple, \(\log_{10}(500) \approx 2.7\).

What’s that sup­posed to mean? That if you mul­ti­ply 1 by 10 about 2.7 times, you get 500?

Yes, pre­cisely! If you mul­ti­ply 1 by ten once, and mul­ti­ply the re­sult by ten an­other time, and then mul­ti­ply that by ten 0.7 times, the re­sult is roughly 500. What does it mean to mul­ti­ply a num­ber by ten 0.7 times? Well, is there a num­ber \(x\) such that if we mul­ti­ply 1 by \(x\) ten times, it’s the same as mul­ti­ply­ing 1 by 10 seven times? Yes! That num­ber is roughly 5:

$$\underbrace{5 \cdot 5 \cdot \ldots 5}_\text{10 times} \approx \underbrace{10 \cdot 10 \cdot \ldots 10}_\text{7 times}$$

Mul­ti­ply­ing by 5 (ten times) is about the same as mul­ti­ply­ing by 10 (seven times), so mul­ti­ply­ing by five (once) is about the same as mul­ti­ply­ing by 10 (seven-tenths of a time). Thus, mul­ti­ply­ing 1 by ten 2.7 times means mul­ti­ply­ing it by 10 twice, then mul­ti­ply­ing it by ap­prox­i­mately 5, for a re­sult of ap­prox­i­mately 500.

This is why \(\log_{10}(500) \approx 2.7\): that’s how many times you need to mul­ti­ply 1 by 10 to get 500.

If that an­swer isn’t satis­fac­tory yet, don’t worry: Through­out the tu­to­rial, we’ll ex­plore both (a) what this means, and (b) why this is the “right way” to mul­ti­ply a num­ber by \(b\) frac­tion­ally-many times.

You might be say­ing to your­self, “Ok, I can see how 500 is kinda sorta one times ten 2.7 times, but how do you figure that out? As far as I can tell, you pul­led that ”\(5^{10}\) is ap­prox­i­mately \(10^7\)” thing out of thin air. Where did that come from? How is the log­a­r­ithm ac­tu­ally calcu­lated?”

The an­noy­ing an­swer is that I calcu­lated \(\log_{10}(500)\) by typ­ing “log10(500)” into Wolfram Alpha. In more se­ri­ous­ness, in the com­ing posts, you’ll learn how to find things like \(\log_{10}(500)\) on your own.

That said, the out­puts of log­a­r­ithms are gen­er­ally difficult to find, but use­ful once you’ve found them. His­tor­i­cally, sci­en­tists and en­g­ineers would pay money for gi­ant ta­bles of pre-com­puted log­a­r­ithm val­ues, be­cause those sped up their prac­ti­cal calcu­la­tions con­sid­er­ably. Why are the out­puts of log­a­r­ithm func­tions so con­ve­nient to use? That ques­tion will be an­swered later in this tu­to­rial.

You might also be say­ing to your­self, “ok, I buy that there’s a way to see 500 as ‘1 times 10, 2.7 times,’ but what does that mean? What’s the point of look­ing at 500 that way?”

It’s hard to give a short an­swer to that ques­tion, but only be­cause there are so many good an­swers. One an­swer goes some­thing like, “if you think of 500 as 2.7 tens, and you think of 8000 as 3.9 tens, then you can mul­ti­ply the num­bers on the left by adding the rep­re­sen­ta­tions on the right”. For ex­am­ple, \(500 \cdot 8000\) is ap­prox­i­mately \(2.7 + 3.9 = 6.6\) tens.

But that’s get­ting ahead of our­selves a bit. The most in­tu­itive in­ter­pre­ta­tion to start with is prob­a­bly this one: Log­a­r­ithms are mea­sur­ing how “long” a num­ber is, in terms of how many digits it takes to write that num­ber down, for a gen­er­al­ized no­tion of “length.”

It may seem that num­bers always take a whole num­ber of digits to write down: 139 and 931 are both writ­ten us­ing three digits (‘9’, ‘3’, and ‘1’). How­ever, as we will see, there’s a sense in which 139 is barely us­ing its third digit, while 931 is us­ing all three of its digits to al­most their full ex­tent. Log­a­r­ithms quan­tify this in­tu­ition, and the pre­cise an­swer that they give re­veals some in­ter­est­ing facts about how many digits it costs to write a given num­ber down.

Parents: