Skip to content

logs of products and powers

foundations

the puzzle

A board has 16 columns and 128 rows. 16 takes 4 doublings from 1, and 128 takes 7. How many doublings from 1 reach its number of squares, log⁡2(16×128)\log_2 (16 \times 128)?

a worked example

Count the doublings in each number, then in the product.

  1. 16 is 242^4, four doublings from 1, and 128 is 272^7, seven doublings.
  2. 16×128=24×27=24+7=21116 \times 128 = 2^4 \times 2^7 = 2^{4 + 7} = 2^{11}, by lesson 3.2's rule for joining powers.
  3. So log⁡2(16×128)=11\log_2 (16 \times 128) = 11, which is 4+74 + 7, the two logs added.
  4. Check it. 16×128=204816 \times 128 = 2048, and lesson 6.1 found log⁡2 2048=11\log_2\, 2048 = 11.
numberlog× 2+ 110423252183164
8 is 232^3, so times 8 moves 3 steps right. 2 sits above log 1, and 2 times 8 is 16, above log 4. So 1+3=41 + 3 = 4, just as 4+7=114 + 7 = 11 in the steps.

how it works

For whole powers of 2, a=2ma = 2^m and b=2nb = 2^n, so log⁡2 a=m\log_2\, a = m and log⁡2 b=n\log_2\, b = n. Then ab=2m+nab = 2^{m + n} by lesson 3.2, so log⁡2(ab)=log⁡2 a+log⁡2 b\log_2 (ab) = \log_2\, a + \log_2\, b.

xxlog⁡2 x\log_2\, x
164
1287
16×12816 \times 1284+7=114 + 7 = 11
204816\frac{2048}{16}11−4=711 - 4 = 7
1282128^22×7=142 \times 7 = 14
The puzzle's numbers and their logs. Multiplying adds the logs, dividing takes one log from the other, squaring doubles the log.

Dividing takes one exponent from the other (lesson 3.2), so log⁡2 ab=log⁡2 a−log⁡2 b\log_2\, \frac{a}{b} = \log_2\, a - \log_2\, b. For the puzzle's numbers, log⁡2 204816=11−4=7\log_2\, \frac{2048}{16} = 11 - 4 = 7, and 204816=128\frac{2048}{16} = 128.

If a=2ma = 2^m, then ak=(2m)k=2mka^k = (2^m)^k = 2^{mk} by lesson 3.3, so log⁡2(ak)=k log⁡2 a\log_2 (a^k) = k \,\log_2\, a. So log⁡2(1282)=2×7=14\log_2 (128^2) = 2 \times 7 = 14.

Nothing here used the 2 itself, so the same steps give the same three rules for any base above 1. The examples use whole powers; the rules hold for every number above 0.

in symbols

log⁡2(2+8)=log⁡2 10\log_2 (2 + 8) = \log_2\, 10, between 3 and 4, but log⁡2 2+log⁡2 8=1+3=4\log_2\, 2 + \log_2\, 8 = 1 + 3 = 4. Adding numbers has no log rule.

16=4×416 = 4 \times 4, and each 4 is 222^2, so 16 is two 4s multiplied, or four 2s. In general, if log⁡4 x=y\log_4\, x = y, then x=4y=(22)y=22yx = 4^y = (2^2)^y = 2^{2y} by lesson 3.3.

So log⁡2 x=2y=2 log⁡4 x\log_2\, x = 2y = 2 \,\log_4\, x: in every row of the table below, the base 2 log is twice the base 4 log.

Any two bases work alike: from base 8 to base 2, every log is multiplied by 3, and the same steps with b=2cb = 2^c give log⁡2 x=c log⁡b x\log_2\, x = c \,\log_b\, x. A new base only multiplies every log by one fixed number, so when a fixed multiple does not matter, an algorithm's log can go without its base.

xxlog⁡4 x\log_4\, xlog⁡2 x\log_2\, x
412
1624
25648
1024510
The base 2 log is twice the base 4 log, whatever xx is.

your turn

Work each one out. Where there is a box, type your answer and check it. Each exercise's worked answer opens under it.

exercise 1

Two numbers have log⁡2 a=5\log_2\, a = 5 and log⁡2 b=9\log_2\, b = 9.

A number, like 13, 9.5 or 19/2.

A number, like 13, 9.5 or 19/2.

worked answer
  1. log⁡2(ab)=log⁡2 a+log⁡2 b=5+9=14\log_2 (ab) = \log_2\, a + \log_2\, b = 5 + 9 = 14.
  2. log⁡2 ba=log⁡2 b−log⁡2 a=9−5=4\log_2\, \frac{b}{a} = \log_2\, b - \log_2\, a = 9 - 5 = 4.

Check it another way: Here a=25=32a = 2^5 = 32 and b=29=512b = 2^9 = 512. Then ab=16384=214ab = 16384 = 2^{14} and ba=16=24\frac{b}{a} = 16 = 2^4.

exercise 2

A number xx has log⁡4 x=7\log_4\, x = 7.

A number, like 13, 9.5 or 19/2.

worked answer
  1. log⁡4 x=7\log_4\, x = 7 says x=47x = 4^7.
  2. 4=224 = 2^2, so 47=(22)74^7 = (2^2)^7.
  3. (22)7=214(2^2)^7 = 2^{14} by lesson 3.3, so x=214x = 2^{14}.
  4. So log⁡2 x=14\log_2\, x = 14 (lesson 6.1), which is 2×72 \times 7.

Check it another way: The rule log⁡2 x=2 log⁡4 x\log_2\, x = 2 \,\log_4\, x gives 2×7=142 \times 7 = 14 too.

exercise 3

A log of a sum.

A number, like 13, 9.5 or 19/2.

worked answer
  1. 2+2+4+8=162 + 2 + 4 + 8 = 16.
  2. 16=2416 = 2^4, so log⁡2 16=4\log_2\, 16 = 4.

Check it another way: The logs added give 7, the log of 2×2×4×8=1282 \times 2 \times 4 \times 8 = 128, not of the sum.

exercise 4

The power rule backwards. The log is given; find the exponent kk.

A number, like 13, 9.5 or 19/2.

worked answer
  1. 9=329 = 3^2, so log⁡3 9=2\log_3\, 9 = 2.
  2. The power rule gives log⁡3(9k)=k log⁡3 9=2k\log_3 (9^k) = k \,\log_3\, 9 = 2k.
  3. So 2k=142k = 14. Divide both sides by 2, and k=7k = 7.

Check it another way: 97=(32)7=3149^7 = (3^2)^7 = 3^{14}, by lesson 3.3, so its log to base 3 is 14.