0:00

>> [music] Here's a fundamental question. How can I multiply numbers really quickly.

Â It's not like this is a particularly new problem.

Â You can imagine somebody trying to multiply 10, 15, 17 by 10, 20, 30, 35, 36,

Â 37 and getting 500, 600 and 29. But you know, how would you ever do these

Â kinds of calculations if you were trapped in a world filled with Roman numerals?

Â Thankfully, instead of Roman numerals, we've got place value.

Â Place value provides an algorithm for actually computing these multiplication

Â answers. So, here we've got 17, here I've got 37.

Â If I want to do this multiplication problem, I just have to do this single

Â digit multiplies. 7 times 7 is 49.

Â 7 plus 4 is 11. 3 times 7 is 21.

Â 3 plus 2 is 5. Add these numbers up, 629.

Â And that's exactly what I had here in Roman numerals.

Â What if the numbers were much, much bigger than just 2 digit numbers?

Â What if the two numbers I wanted to multiply each had 10 digits?

Â Well then, I've still gotta do all these para-wise multiplications.

Â Right down here, I'm going to end up writing 100 digits.

Â At least 100 digits. Because for every pair of digits here,

Â I've got to write down at least one digit down here.

Â That's terrible. You know, and then I've got to add all of

Â these things up before I before I'm able to get the answer.

Â I mean that's a ton of work, right? You'd really hope that there'd be some way

Â to speed this up. And there is a way to speed this up.

Â There's a ton of ways to speed up multiplication.

Â Multiplication is such an important operation that humans have given it a ton

Â of thought. We've really got a lot of different ways

Â to try to make this faster, but maybe the easiest way Is that of quarter squares.

Â So here's the trick. I'm going to use this table of quarter

Â squares. This is n squared over 4, a quarter

Â square, so here's n, here's the output. If I plug in 1, I get a quarter.

Â If I plug in 2, 2 squared over 4 is 1. 3 squared over 4 is 2 and a quarter.

Â 4 squared over 4 is 4. 5 squared over 4 is 6 and a quarter.

Â Okay, you can image I've got a really big table of these quarter squares.

Â Now, why does this help you multiply? We've also got this little algebraic fact.

Â A times b is a plus b squared over 4, the quarter square of a plus b minus a minus b

Â squared over 4. So, instead of multiplying a and b, I'll

Â add them together, look it up in the table, take their difference, look it up

Â in the table, and take the difference of those table values.

Â For instance, let's suppose that I want to multiply 3 times 2.

Â I mean, this is a ridiculously easy case. But just to show off how it works.

Â Let's multiply 3 times 2. I'll add 3 and 2 and I get 5.

Â And I look it up in my table. And 5 squared over 4 is 6 and a quarter.

Â I take the difference, 3 minus 2 is 1. And if I look up 1 in my table, I get a

Â quarter. And 6 and a quarter minus a quarter is 6.

Â Which is a product of 3 and 2. Quarter squares convert multiplication

Â into an addition, a subtraction, two table lookups and a final subtraction.

Â Let's try doing this on a much bigger number.

Â Let's try to multiply 17 by 37 using quarter squares.

Â So, the first thing to do is to figure out the quarter square of 17 plus 37.

Â 17 plus 37 is 54. I've got a much bigger table of quarter

Â squares here. Here's 54 on my table.

Â 54 squared over 4 according to my table is 729.

Â Now, the next step is to look at the difference of 17 and 37, which is 20, and

Â look that up in my table of quarter squares.

Â Here's 20. And the quarter square of 20 is 100.

Â That's pretty clear. 20 squared is 400, divided by 4.

Â So 100. Now what do I do to figure out the product

Â of 17 and 37? Well, I'm going to take 729, I'm going to

Â subtract 100, and I'm going to get 629, which is in fact the produce of 17 and 37.

Â But we did it using quarter squares, by just adding the numbers together, taking

Â their difference, looking up those numbers in the table and then taking the

Â difference of the numbers in the table, I got the product of these 2 numbers.

Â Admittedly, people don't talk too much about quarter squares nowadays.

Â What you've probably heard a lot more about is logarithms.

Â There's this property of exponents that e to the x times e to the y is e to the x

Â plus y. The corresponding property of logs is that

Â log of a product is the sum of the logs. The log of a times b is log of a plus log

Â of b. You can use this property of logs to

Â multiply very quickly provided you have a log table.

Â And I do have a table of logarithms. Here's my table.

Â Let's multiply 17 by 37. So, instead of looking up 17, I'm going to

Â look 1.70 in my table and I find the log of 1.70 is about 0.23045.

Â Then, instead of looking up 37, I'm going to look up 3.70 in my table, and the log

Â of 3.70 is about 0.56820. I'm going to add together those two logs

Â and I get 0.79865, and I just got to hunt for that number in my table.

Â Mercifully, the numbers are in order and I find that 0.79865 is right here in my

Â table that's in the 9th column of the row which starts with 6.2.

Â So the product of 17 and 37 must be 629. Why this works is that same basic fact

Â about logs again. Logs convert multiplication into addition.

Â There's another way that we can exploit this fact.

Â If I've just got two plain old rulers, I can use the two rulers to add together

Â numbers. Let's say, I want to add 3 and 2 together.

Â What I'll do is I'll put the 0 on the top above the 2 on the bottom so that this

Â distance is 2 units. On the top, the distance between 0 and 3

Â is 3 units. So, if I'm going to add 2 units to 3

Â units, I just read down and the answer is 5.

Â If your 2 rulers, have a logarithmic scale, then you've just invented the slide

Â rule. This is a logarithmic scale, so this

Â distance, on the scale labeled D, starting at 1 and ending at this 7, this distance

Â is log of 1.7. Now, next to that distance, I have to

Â place a distance whose length is log of 3.7.

Â Now I've placed the 1 on the scale labeled C, just above the 7 on the D scale.

Â The distance on the C scale from that one all the way over here to 3.7 on the C

Â scale, that's a distance which is really log of 3.7.

Â Since I've placed these two distances next to each other, the total distance is just

Â the sum of the logs, which is the log of the product.

Â So, here's the answer. Just below 3.7 on the top scale is what

Â looks to be 6.3, just a little bit less than 6.3.

Â Now, I know the last digit of 17 times 37 is going to be a 9.

Â So, the answer must be 6.29. For hundreds of years, these slide rules

Â were state of the art for multiplying. So that you can join into this proud

Â tradition, I encourage you to print out your own slide rule, and try doing some

Â multiplication problems on it.

Â