Many years ago, I read a shortcut trick for squaring numbers that end
in 5. You multiply the number that precedes the 5 by the next
number higher than it, and then tack on 25 to the end of the product you
get. So, for example, to square 25, you multiply the 2 times the
next higher number, 3, and get 6; append 25, and you have 625, which is
the square of 25. To square 75, you multiply the 7 times 8 and
stick on 25 after the answer and you get 5625, which is indeed the
square of 75.
It works for longer numbers too, such as 125. Multiply the 12 by
13 (which is 156, since 12 dozen, a gross, is 144 and one more 12 added to that
makes 156), and then stick on the 25 to get 15,625, which, yes, is the
square of 125.
Or square 15,625 itself. Of course to do that, you usually would
need a calculator to multiply the 1562 times 1563 to get 2,441,406; and
then putting the 25 on the end gives you 244,140,625 which the
calculator could have more readily just told you right away was the
square of 15,625. So in that particular case, at least for me,
this was not a short cut but took as long or longer to do.
But even though I have known this trick for decades, it never occurred to me before the other night to try to figure out why or how
it worked. So in order to try to see how it worked, at first, I
just multiplied out a couple of numbers ending in 5 by themselves to see
whether I could detect a pattern, but the patterns I detected were not
really helpful, and only explained the 25 at the end of the final
product (i.e., the squared number). And that explanation itself
was complicated and not at all intuitive in any way.
For example consider the calculations of the following squares: 25, 35, 85, and 75, in columns A, B, C, and D respectively:

A

B

C

D


25

35

85

75


x25

x35

x85

x75

First multiplication
Second multiplication

125
500
625

175
1050
1225

425
6800
7225

375
5250
5625

I didn't see any kind of obvious pattern there other than that using 35
and 75, I got a 75 at the end of the first product (in red) and a 50 at
the end of the second product (in blue), which would yield 25 at the end
of the sum of the two of them. And I could see if you squared 25
and also 85, at the end of the first product by standard multiplication,
you got numbers ending 25 (purple) and in 00 (green), which would also
yield 25 at the end of the sum of the two of them. And I could see
why you got those combinations:
1) Why you get the 25 as the last two
digits in columns A and C: It is because you always get 25 as the last
two digits of the first multiplication and 00 as the last two digits of
the second multiplication, and when you add those pairs of digits
together to get the full product, you will end up with 25 at the end of the sum:
 First multiplication will always end in 25: With even
numbers in front of the 5, multiplying the two 5's together would always
give you 25, and you would write down the 5 and carry the 2, which
would show up as a 2 in the next column, because you would get a zero on
the end of whatever even number you multiplied by 5. Hence the
last two digits in the product of the first multiplication will be
25. E.g., in column A, (5x2) gives 10, and when you add the
carried 2 to it, you will have 12 in front of the 5 you already had from
multiplying the 5 times the 5, so the last two digits are 25.
Similarly in column C, you get 40 when you multiply the 5 times the 8
which ends in a zero because, again, you are multiplying 5 by an even
number, which will always give a zero, so that too will end 25.
 Second multiplication will always end in 00: In the
second multiplication the right zero is automatic, as it is in any
multiplication of the ten's column numeral. And the second number
will always be a zero too, because you are multiplying 5 times an even
number in the second column.
 By this analysis, it will be the same for any even number preceding the 5 in the original number to be squared.
2) Why you get the 25 as the last two digits in
columns B and D: It is because you always get 75 as the last two
digits of the first multiplication and 50 as the last two digits of the
second multiplication, and when you add those pairs of digits together
to get the full product, you will get 125, which gives you 25 as the last two digits at the end of that sum:
 First multiplication will always end in 75: With odd
numbers in front of the 5, multiplying the two 5's together would
always give you 25, and you
would write down the 5 and carry the 2, which would show up as a 7 in
the next column, because you would get a 5 to (add to the 2) on the end of whatever
odd number you multiplied by 5. Hence the last two digits in
the
product of the first multiplication will be 75. E.g., in column B,
(5x3) gives 15, and when you add the carried 2 to it, you will have 17
in front of the 5 you already had from multiplying the 5 times the 5, so
the last two digits are 75. Similarly in column D, you get 35
when you
multiply the 5 times the 7 which ends in a 5 because, again, you are
multiplying 5 by an odd number, which will always give a 5 at the end,
so that
too will end 75.
 Second multiplication will always end in 50: In the second
multiplication the right zero is automatic, as it is in any
multiplication of the ten's column numeral. And the second number will
always be a 5, because you are multiplying 5 times an odd
number in the second column.
 By this analysis, it will be the same for any odd number preceding the 5 in the original number to be squared.
However none of that helped with seeing why the part in
front of the 25 came out to be the product of the part of the number
before the five (in the number we are squaring) with its next higher
number.
A Better, More General Explanation
So I tried something else, and it worked
out. I can
explain the idea intuitively and logically, using some algebra. It
is easier to see than the full algebraic proof. I will give the
intuitive, logic
explanation and I will give you the full algebraic proof.
First, here is the intuitive explanation (starting with just a little bit of algebra):
1) The square of the sum of any two numbers x and y is represented by: (x + y)^{2} which is always equal to (x^{2 }+ 2xy + y^{2}).
That is a known algebraic equation that comes
from simply multiplying each of the components times each of the other
components and adding the products, in the way one does
multiplication. In this case, (x)(x) gives the x^{2}, (y)(y) gives the y^{2}, (x)(y) gives one of the two xy's and (y)(x) gives the other xy.
2) Consider a specific case now, say (35)^{2}. This is (30 + 5)(30 + 5), and by the above equation, it will equal [(30)^{2} + (2)(30)(5) + (5)^{2}]
3) Since (2)(30)(5) = (10)(30) if we just multiply the 2
times the 5 first, we can derive from step 2 that [(30 + 5)(30 + 5)] =
[(30)^{2} + (10)(30) + 25]
4) The "25" will end up being the end "25" from the final
squared number, as you will see once I give the explanation of the
"(30)^{2} + (10)(30)"
portion of the equation in 3, which is:
Substituting (30)(30) for (30)^{2}, we have [(30)(30) + (10)(30)], which simply says that you have
thirty 30's and then ten more 30's. So in all you have forty 30's,
which is 1200.
5) Adding the 25 to the 1200, we get the square of 35, which is 1225,
and is the number that we get when we multiply 3x4 and put the answer in
front of any two digit number to make it essentially be (100)(3)(4).
6) More generally, though this is hard to say in a way that makes it
easy to see, what we have when we multiply any two digit number ending
in 5 will be 25 (from squaring the 5's) PLUS the square of the number in the ten's place PLUS 10 more of the number in the 10's place. And
since the number in the tens place is a multiple of 10, we are then
adding one more "ten" to that multiple, meaning that we are multiplying
the number by one more than what we multiplied it by originally, which
means we are multiply the first digit by (1 + the first digit), which is
what the 'trick' says to do before adding the 25 to it. Or to say
that a different way, using an example in part:
7) Since any number two digit number ending in 5 can be represented
algebraically as (10x + 5), where x is the numeral in front of the 5,
then the square of the number will be, from step 1, [x(x) + (2)(5)x +
25], which is [x(x) + (10)x + 25]. E.g., 45 is [(10)(4) + 5], and so (45)(45) will be [(40)(40) + ten more 40's + 25], which will be [fifty 40's + 25].
8) So no matter what number is represented by "x", we will have "(that
many tens) times (that many tens)", plus one more set of tens, which is
the same as saying we have "(that many tens) times (one more than that
many tens), which is [(x)(x + 1)] number of tens altogether.
This is why the trick
works, though it is easier to see with particular numbers than with alphabetical representations of numbers.
But here is the full algebra proof, which is not particularly intuitive:
9) Consider first any two or more digit number, where the last digit is 5
and the number before that last digit is "a". This whole number
can be represented as (10a + 5).
10) So to square it (using step 1 above), we have (10a + 5)^{2} = [(10a)(10a) + (2)(10a)(5) + 25], which, if we multiply the 2 times the 5 in the middle term, is equal to:
{(10a)(10a) + (10)(10a) + 25} which, when grouped by the first two addends together is also
{[(10a)(10a) + (10)(10a)] + 25}
11) Now [(10a)(10a) + (10)(10a)] = 10a(10a + 10) = 100[a(a + 1)]
12) So what we have then, from steps 9, 10, and 11, is (10a + 5)^{2} = {[100a(a + 1)] + 25}
13) Notice, that (a + 1) is simply one more than a, and since we are
multiplying it by 100, which adds two zeroes to the end of the product,
it shows that the square of any number ending in 5 will be sum of 25 and the product
of multiplying "the portion of the number before the 5" with "one more than the portion of the number before the 5" (with the 25 being put on at the end
where the two zeroes are, since any number plus zero is equal to that number).
