Multiplication using difference of squares

Many years ago, while lost in my thoughts, I discovered a new way to multiply a pair of numbers together in my head. It works well with certain pairs of numbers and is useless with others. Which pairs will work depends on:

My technique leverages your memory of squares to allow you to multiply numbers in your head that are higher than the multiplication tables you had to memorise at school. It’s easier to memorise all the squares up to 302 than the entire multiplication tables up to 30 x 30.

Here’s my multiplication technique in words:

xy = (their average)2 - (half their difference)2

Example where x = 13 and y = 17:

their average = 15
(their average)2 = 225
their difference = 4
half their difference = 2
(half their difference)2 = 4
xy = (their average)2 - (half their difference)2
xy = 225 - 4
xy = 221
13 x 17 = 221

I don’t know about you but I haven’t memorised 13 x 17, but I do know that 152 = 225, and I can halve 4 to 2, square it back to 4, and subtract it from 225 pretty easily in my head. Again, if you know your squares this technique is very useful. If you need a calculator to work out the squares then it’s useless to you.

While writing all this down just now I’ve realised that my technique can be explained using something I learnt in high school algebra called the ‘difference of squares’:

(a - b) (a + b) = a2 - b2

Relating this to my technique and assuming x < y:

(a - b) is x
(a + b) is y
a is the average of x and y
b is half their difference

My multiplication technique is just a way of taking two numbers and fitting them into the ‘difference of squares’ format. So I didn’t actually discover anything new, I just discovered something new to me that was probably first discovered hundreds of years ago.

(1) This will work with negative integers. You need to work with their absolutes, then apply the appropriate sign to the final answer.
(2) If their difference is odd I first do some pre-processing, then some post-processing. Put simply I add or subtract 1 to either x or y as the first step, then compensate for it at the end. Which input number I modify depends on what I want the average to be (for easy squaring).