## Wednesday, October 03, 2007

### HOWTO: Multiplying Numbers in your Head "trick" - Difference of Squares

Here's a mathematical "trick" for multiplying some numbers in your head that a friend showed me the other day. It uses an algebraic difference of squares. It's a little reminiscent of my earlier post of How to Multiply numbers near 100 quickly in your head.

First, an example: Let's say you want to multiply 95 x 105. In my head, I could think, "OK, that's 100^2 - 5^2, which is 10000 - 25 = 9975", and 9975 is the correct answer. Now how did I do that?

In algebra, a difference of squares is an expression that takes the form of:

x^2 - a^2

which has the factors

(x - a)*(x + a)

(Multiply out these two factors and you'll get the difference of squares, above)

Look at the example numbers I gave, 95 and 105. Those numbers can be rewritten in the form:

(100 - 5)*(100 + 5)

which correspond directly to the factors of the difference of squares. (That is, let x=100, a=5) That means that I can also represent the same multiplication in the difference of squares form:

100^2 - 5^2 = 10000 - 25 = 9975

The ease of this method relies on you being able to do squares of the numbers involved, but it works for any two numbers you can choose, as you only need to find the midpoint around which each value is radially symmetric.

Here's another example: What's 15 x 17?

15 x 17 = (16 - 1)*(16 + 1) = 16^2 - 1^2 = 256 - 1 = 255.

Not impressed yet? What's 264 x 248?

264 x 248 = (256 + 8)*(256 - 8) = 256^2 - 8^2 = 65536 - 64 = 65472.

It really helps, of course, to know a bunch of squares of integers. The ones I provided in example here are ones that tech people usually know. A lot of people know the squares of numbers from 1 to 10 or 16, which still makes this technique useful. Your mileage may vary.

This also comes in handy when used in conjunction with other tricks, like How to Square Integers near 50 in your head and How to Square Numbers ending in a 5 in your head. Get enough of these tricks in your head and people will think you're a superhuman calculator, but remember, as Spiderman said, "With great power comes great responsibility". Use it wisely.

Burton MacKenZie www.burtonmackenzie.com