Math Shortcut - Squaring Any Number
Few days back when I was doing some number multiplications, I found an easy way to square any number without much of calculations, so thought of sharing it. So here is my try to explain it and extend it for more number of digits and for more complex use also.
(But for larger numbers, multiplications become painstaking and this might result in more time and merely just a stunt, this works good for max 5-6 digit number, though this trick can be used for higher digits also, but use it carefully.)
Squaring is basically multiplying a number by itself e.g.
(89)² = (89) * (89),
(111)² =(111)*(111), etc.
And if you had a basic algebra classes then you should know this equation, where a & b are non-zero →
(a + b)² = (a + b)*(a + b) = (a)² + (2*a*b) + (b)²
I use the same equation for this trick.
e.g. we want to square a number, say 34, then as per (a+b) logic, its a = 30 and b = 4,
but for making calculations easy take only digits and not their values as per the digits place,
so a=3, b=4.
IMP - one important rule for choosing a and b → never ever choose a or b as zero, it always should be non-zero.
So
(34)²
Brief Explanation of above steps → each "/" represents separation for each digits place i.e. digit at unit's place, at tenth place, at hundredth place, and so on.
Each place will hold only single digit (consider for the time being that there will only be one digit, I will show the corollary later), if multiplication gives rise to more no of digits, they just overflow or carry forward to next higher digit's place.
e.g. in above example of (34)² - at unit's place there was 16 and at tenth place there was 24, but both of these places should hold one and only one digit, so we carry forward the digits (just like in addition).
So out of 16, 6 will remain at unit's place and 1 will be carry forwarded to tenth's place, so 24 + 1 = 25. But tenth's place can hold only one digit, so out of 25 only 5 will remain at tenth's place and 2 will be carry forwarded to hundred's place.
And we have 9 in hundred's place, and plus 2 from carry forward, so (i.e. 9+2) equals to 11.
How many digits will stay and what will be carry forwarded ??? →
Actually, this carry forwarding rule is, in equation of (ab)², if b is a n-digit number then n digits will stay and any other will overflow to next level.
i.e.
1) If both a and b are of equal length, i.e. both a and b are 1-digit or 2-digit or 3-digit and so on... of same size → the middle entity 2*a*b will be of same digit length as of a and b.
2) If both a and b are of different sizes, then the middle entity 2*a*b will always be of size of b.
So,
(311)²
Second, when number of digits in b is equal to a →
e.g. (1111)2 - and a = 11 (actually its 1100, but as per the rule diagram we forget their 10s power to make our multiplications easier) and b = 11.
(1111)²
Third, when number of digits in b is less than a →
For example,
(111)²
So, first split the number as per your preference into 2 entities a and b, e.g. a = 12345 and b = 6789,
Now it will be like this -
Conclusion →
(But for larger numbers, multiplications become painstaking and this might result in more time and merely just a stunt, this works good for max 5-6 digit number, though this trick can be used for higher digits also, but use it carefully.)
Squaring is basically multiplying a number by itself e.g.
(89)² = (89) * (89),
(111)² =(111)*(111), etc.
And if you had a basic algebra classes then you should know this equation, where a & b are non-zero →
(a + b)² = (a + b)*(a + b) = (a)² + (2*a*b) + (b)²
I use the same equation for this trick.
e.g. we want to square a number, say 34, then as per (a+b) logic, its a = 30 and b = 4,
but for making calculations easy take only digits and not their values as per the digits place,
so a=3, b=4.
IMP - one important rule for choosing a and b → never ever choose a or b as zero, it always should be non-zero.
So
(34)²
→ keeping a = 3 and b = 4
→ (ab)²
→ (a)² / 2*a*b / (b)² ... here “/” sign is used as a separator,
→ nowhere in this technique we use division, so its not a division sign.
→ so putting our "a" and "b" values in above equation,
→ (3)² / 2*(3)*(4) / (4)²
→ 9 / 24 / 16
→ now the special part of merging all these results to get actual answer
→ always start from right most part
→ so for last part of above calculation i.e. 16... keep 6 in units place
→ and carry forward 1 to get 10s place digit,
→ so 24 plus carry forward from previous digits place i.e. 1
→ So,
→ 9 / 24 + 1 / 6
→ 9 / 25 / 6
→ so for 25, keep 5 and carry forward 2 to 9
→ So,
→ 9 + 2 / 5 / 6
→ 11/5/6 ... we started with carry forward from right end and
→ reached the left end
→ nowhere in this technique we use division, so its not a division sign.
→ so putting our "a" and "b" values in above equation,
→ (3)² / 2*(3)*(4) / (4)²
→ 9 / 24 / 16
→ now the special part of merging all these results to get actual answer
→ always start from right most part
→ so for last part of above calculation i.e. 16... keep 6 in units place
→ and carry forward 1 to get 10s place digit,
→ so 24 plus carry forward from previous digits place i.e. 1
→ So,
→ 9 / 24 + 1 / 6
→ 9 / 25 / 6
→ so for 25, keep 5 and carry forward 2 to 9
→ So,
→ 9 + 2 / 5 / 6
→ 11/5/6 ... we started with carry forward from right end and
→ reached the left end
→ here is where we have got our result.. just remove our “/” separator sign
→ Result is 1156 = (34)²
Brief Explanation of above steps → each "/" represents separation for each digits place i.e. digit at unit's place, at tenth place, at hundredth place, and so on.
Each place will hold only single digit (consider for the time being that there will only be one digit, I will show the corollary later), if multiplication gives rise to more no of digits, they just overflow or carry forward to next higher digit's place.
e.g. in above example of (34)² - at unit's place there was 16 and at tenth place there was 24, but both of these places should hold one and only one digit, so we carry forward the digits (just like in addition).
So out of 16, 6 will remain at unit's place and 1 will be carry forwarded to tenth's place, so 24 + 1 = 25. But tenth's place can hold only one digit, so out of 25 only 5 will remain at tenth's place and 2 will be carry forwarded to hundred's place.
And we have 9 in hundred's place, and plus 2 from carry forward, so (i.e. 9+2) equals to 11.
How many digits will stay and what will be carry forwarded ??? →
Actually, this carry forwarding rule is, in equation of (ab)², if b is a n-digit number then n digits will stay and any other will overflow to next level.
i.e.
1) If both a and b are of equal length, i.e. both a and b are 1-digit or 2-digit or 3-digit and so on... of same size → the middle entity 2*a*b will be of same digit length as of a and b.
2) If both a and b are of different sizes, then the middle entity 2*a*b will always be of size of b.
First, when number of digits in b is more than a →
e.g. if you are having a = 3 and b = 11 then, as b is 2-digit number, 2 digits will stay and remaining higher digits will be carry forwarded.So,
(311)²
→ keeping a = 3 and b = 11
→ (ab)²
→ (a)² / 2*a*b / (b)² ... here “/” sign is used as a separator, nowhere in this
→ technique we use division
→ (3)² / 2*(3)*(11) / (11)²
→ 9 / 66 / 121
→ now the special part of merging all these results to get actual answer
→ always start from right most part
→ so for last part of above calculation i.e. 121... keep 21 in units place
→ and carry forward 1 to next part,
→ so now 66 plus carry forward from previous digits place i.e. 1
→ So,
→ 9 / 66 + 1 / 21
→ 9 / 67 / 21
→ Now how many digits to keep in 2*a*b part, so its always the number of
→ digits of b, that many digits we will keep and remaining will be carry
→ forwarded to next part
→ so for 67, keep all 67, and carry forward nothing
→ So,
→ 9 / 67 / 21 ...so we started with carry forward from right end and
→ reached the left end
→ technique we use division
→ (3)² / 2*(3)*(11) / (11)²
→ 9 / 66 / 121
→ now the special part of merging all these results to get actual answer
→ always start from right most part
→ so for last part of above calculation i.e. 121... keep 21 in units place
→ and carry forward 1 to next part,
→ so now 66 plus carry forward from previous digits place i.e. 1
→ So,
→ 9 / 66 + 1 / 21
→ 9 / 67 / 21
→ Now how many digits to keep in 2*a*b part, so its always the number of
→ digits of b, that many digits we will keep and remaining will be carry
→ forwarded to next part
→ so for 67, keep all 67, and carry forward nothing
→ So,
→ 9 / 67 / 21 ...so we started with carry forward from right end and
→ reached the left end
→ here is where we have got our result.. just remove our “/” separator sign
→ Result is 96721 = (311)²
Second, when number of digits in b is equal to a →
e.g. (1111)2 - and a = 11 (actually its 1100, but as per the rule diagram we forget their 10s power to make our multiplications easier) and b = 11.
(1111)²
→ keeping a = 11 and b = 11
→ (ab)²
→ (a)² / 2*a*b / (b)² ... here “/” sign is used as a separator, nowhere in this
→ technique we use division
→ (11)² / 2*(11)*(11) / (11)²
→ 121 / 242 / 121
→ now the special part of merging all these results to get actual answer
→ always start from right most part
→ so for rightmost part of above calculation i.e. 121,
→ keep 21 in units place
→ and carry forward 1 to next part, as b was a 2-digit number
→ so now 242 plus carry forward from previous digits place i.e. 1
→ So,
→ 121 / 242 + 1 / 21
→ 121 / 243 / 21
→ Now how many digits to keep in 2*a*b part, so its always the number of
→ digits of b, that many digits we will keep and remaining will be carry
→ forwarded to next part
→ so for 243, keep all 43, and carry forward 2 to next part
→ So,
→ 121+2 / 43 / 21
→ 123 / 43 / 21 ...so we started with carry forward from right end and
→ reached the left end
→ technique we use division
→ (11)² / 2*(11)*(11) / (11)²
→ 121 / 242 / 121
→ now the special part of merging all these results to get actual answer
→ always start from right most part
→ so for rightmost part of above calculation i.e. 121,
→ keep 21 in units place
→ and carry forward 1 to next part, as b was a 2-digit number
→ so now 242 plus carry forward from previous digits place i.e. 1
→ So,
→ 121 / 242 + 1 / 21
→ 121 / 243 / 21
→ Now how many digits to keep in 2*a*b part, so its always the number of
→ digits of b, that many digits we will keep and remaining will be carry
→ forwarded to next part
→ so for 243, keep all 43, and carry forward 2 to next part
→ So,
→ 121+2 / 43 / 21
→ 123 / 43 / 21 ...so we started with carry forward from right end and
→ reached the left end
→ here is where we have got our result.. just remove our “/” separator sign
→ Result is 1234321 = (1111)²
Third, when number of digits in b is less than a →
For example,
(111)²
→ keeping a = 11 and b = 1
→ (ab)²
→ (a)² / 2*a*b / (b)² ... here “/” sign is used as a separator, nowhere in this
→ technique we use division
→ (11)² / 2*(11)*(1) / (1)²
→ 121 / 22 / 1
→ now the special part of merging all these results to get actual answer
→ always start from right most part
→ so for last part of above calculation i.e. 1, as b is already 1-digit number,
→ no carry forward to next part,
→ So,
→ 121 / 22 / 1
→ Now how many digits to keep in 2*a*b part, so its always the number of
→ digits of b, that many digits we will keep and remaining will be carry
→ forwarded to next part
→ so for 22, keep all 2, and carry forward 2 to next part
→ So,
→ 121+2 / 2 / 1
→ 123 / 2 / 1 ...so we started with carry forward from right end and
→ reached the left end
→ technique we use division
→ (11)² / 2*(11)*(1) / (1)²
→ 121 / 22 / 1
→ now the special part of merging all these results to get actual answer
→ always start from right most part
→ so for last part of above calculation i.e. 1, as b is already 1-digit number,
→ no carry forward to next part,
→ So,
→ 121 / 22 / 1
→ Now how many digits to keep in 2*a*b part, so its always the number of
→ digits of b, that many digits we will keep and remaining will be carry
→ forwarded to next part
→ so for 22, keep all 2, and carry forward 2 to next part
→ So,
→ 121+2 / 2 / 1
→ 123 / 2 / 1 ...so we started with carry forward from right end and
→ reached the left end
→ here is where we have got our result.. just remove our “/” separator sign
→ Result is 12321 = (111)²
One more example,
(2325)²
→ (ab)²
→ (a)²/2*a*b/(b)²
→ (23)²/2×(25)×23/(25)²
... (here "/" is just used as a separator and not a division sign)
→ 529/1150/625 ... (squaring 23 and 25)
→ 529/1150+6/25 ...(keeping 2 digits and carry forward remaining ones to next stage)
→ 529/1156/25
→ 529+11/56/25 ... (keeping 2 digits, because we always keep n digits where n equals digits of b .. in above (ab)²)
→ 540/56/25 ... (finally removing all "/" separators... once we add all carry forward values)
→ 5405625
Limitations →
How to use this in case of very big numbers - e.g. (123456789)2So, first split the number as per your preference into 2 entities a and b, e.g. a = 12345 and b = 6789,
Now it will be like this -
(123456789)²
→ keeping a = 12345 and b = 6789
→ (ab)²
→ (a)²/2*a*b/(b)²
→ (12345)²/2*(12345)*(6789)/(6789)²
→ {(12345)²}/2*(12345)*(6789)/{(6789)²}
→ Now use the same (a+b)² technique for both (6789)² and (12345)²
→ { (123)² / 2*(123)*(45) / (45)² } / 2*(12345)*(6789) / { (67)²/2*(67)*(89)/(89)² }
→ and so on...
One more example,
→ Now use the same (a+b)² technique for both (6789)² and (12345)²
→ { (123)² / 2*(123)*(45) / (45)² } / 2*(12345)*(6789) / { (67)²/2*(67)*(89)/(89)² }
→ and so on...
One more example,
(8925746)²
→ keeping a = 892574 and b = 6
→ (ab)²
→ (a)²/2*a*b/(b)²
→ (892574)²/2×(892574)×6/(6)²
→ (892574)²/(892574)×12/36
→ (892574)²/10710888/36
→ now squaring 892574 separately, (using a = 892570)
→ (892574)²/10710888/36
→ now keeping everything same do our (ab)² for (892574), so process continues...I know it not good, I will rather do it some other way.
→ now keeping everything same do our (ab)² for (892574), so process continues...I know it not good, I will rather do it some other way.
Conclusion →
Ideally, we can square any number with minimal such calculations, the only issue or difficulty you will face when numbers are larger, in that case you have to do the multiplications of these big intermediate parts of above solution.. i.e. 2*a*b and that's where you will generally give up.
So I use this technique when total digits in given number are around 4-5 or when I can split the number easily and still don't have to do these complex 2*a*b multiplications. e.g. 1111, 302040, 90008700, etc. where you can easily split it into easier a and b parts.
Happy number crunching... :)
Comments
Post a Comment