# Squaring 2-Digit Numbers

Let's see an example different from the ones at the index page. Say, find 32².

First add the last digit (2) to the number itself: 32 + 2 = 34. Multiply the sum by the first digit: 34 × 3 = 102. Square the last digit: 2² = 4. Append that square to the product just computed: 1024. If the square is a 2-digit number, append its last digit and carry the first digit to the last digit of the product.

Why does this work?

Let the number be N = 10a + b.

 (10a + b)² = 100a² + 20ab + b² = 10a(10a + 2b) + b² = 10a(10a + b + b) + b² = 10a(N + b) + b².

So, to compute the square of N = 10a + b, first find N + b. Then multiply that by the first digit a to get a(N + b). Square the second digit to get b². "Appending b²" mean multiplying a(N + b) by 10 and adding b².

In fact the method is not restricted to 2-digit numbers. a may have 2 or more digits as well. The calculations become more complex of course.

Find 215². 215 + 5 = 220. 220 × 21 = 4400 + 220 = 4620. 5² = 25. 4620·10 + 25 = 46225..

[an error occurred while processing this directive]