# Squaring biggish numbers, revisited

One of the Mathematical Ninja’s favourite tricks is squaring biggish numbers. He’d secretly like to be Art Benjamin one day.

So (inspired partly by Barney), he’s been looking at quick tricks to help him square numbers.

He knows the first 25 square numbers by heart (and so should you); he’s also pretty hot at multiplying, adding and taking away. So he came up with this algorithm for squaring - say - 173:

- Find the nearest fifty (150 is three 50s, and we’re 23 away)
- Take off half of the nearest 50 (here, that’s $173 - 75 = 98$)
- Multiply the number by the number of 50s ($98 \times 3 = 294$)
- This is the number of hundreds. Now look at the remainder - 23 - squared, which is 529, and add it on to 29,400 to get 29,929

That looks about right, because $\sqrt{3} \simeq 1.732$, so $173^2 \simeq 30,000$.

Why does it work? It’s because of ALGEBRA.

Let $n = 50k + r$ – here, k was 3 and r was 23.

The Mathematical Ninja works out $100k(25k + r) + r^2 = 2500k^2 + 100kr + r^2$, which is just the same thing as $(50k+r)^2$. Only it doesn’t take so long…