Difference of Squares in Mental Arithmetic

One of the first tricks taught in factoring polynomials is the difference of squares formula, namely:

    \[ x^2-y^2=(x+y)(x-y). \]

This simple formula comes in handy in mental arithmetic when we substitute x and y with numbers, especially when you have your square numbers memorized. For example, suppose someone asks you to calculate 27 X 23. Here's a quick way to do this: Let x=25 and y=2 in the above formula. Then we get 25^2-2^2=(27)(23). So the desired product is just the difference between 25^2 and 2^2, which is 625-4=621.