>> [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.