Hacker News new | past | comments | ask | show | jobs | submit login
Squaring two digit numbers in your head (jgc.org)
127 points by jgrahamc on March 29, 2010 | hide | past | favorite | 30 comments



Works even better for squares ending in 5 because you'll round up and down to multiples of ten which means the number ends in 00 and you'll always be adding 25.

So:

  35 squared is 4x3 x100 = 12 00 + 25 = 1225

  45 squared is 5x4 x100 = 20 00 + 25 = 2025

  55 squared is 6x5 x100 = 30 00 + 25 = 3025
When I heard about this trick it was referred to as vedic, hindu or indian math, but I don't know if that's actually historically/geographically accurate or not. There's some Japanese nintendo DS games that aim to train you in it, I think it was a bit of a craze over there.


When I heard about this trick it was referred to as vedic, hindu or indian math, but I don't know if that's actually historically/geographically accurate or not.

That is not historically accurate, as several authors in India have pointed out. Let me see if I can find a citation:

http://books.google.com/books?id=DHvThPNp9yMC&pg=PA16...

(That's footnote 7 from page 16 of Mathematics in India by Kim Plofker, citing works by scholars in India who have dug into the primary sources.)


The trick applies to two-digit multiplication xy * xz while y + z = 10. And we can simply calculate like this:

  34 * 36 = 3*4 * 100 + 4*6 = 1224
  57 * 53 = 5*6 * 100 + 7*3 = 3021
For multiplications like yx * zx as long as y + z = 10, we need to add x * 100, like this:

  24 * 84 = 2*8 * 100 + 400 + 4*4 = 2016
  46 * 66 = 4*6 * 100 + 600 + 6*6 = 3036


The two game series are called Brain Age, and Big Brain Academy. Both are great fun - and helpful.


While those are fun, IIRC (and I've spent some time with both) neither of them do large multiplication, and I'm quite confident neither of them try to teach this technique to you; they just present math problems with no technique. (Memorization is appropriate for anything up to 12x12 or 15x15 anyhow, and if they exceed that it's not by much.)


Yeah, that's a different thing, the games I was thinking of were:

Pa to Tokeru! India Suugaku Drill DS http://www.yesasia.com/global/pa-to-tokeru-india-suugaku-dri...

Indo Shiki Keisan Drill DS http://www.play-asia.com/paOS-13-71-9g-49-en-70-2fox.html

I think the latter might be the same as the Korean title, Indian Math Brain DS.

For those that don't want to import stuff that they probably can't read (though I find you can usually get by) there's also Make 10: a journey of numbers which is a weird maths based adventure game, kind of Brain Age meets WarioWare:

http://www.nintendo.co.uk/NOE/en_GB/games/nds/make_10_a_jour...


In case this observation isn't immediately obvious:

    Observe that 27^2 = 30 x 24 + 3^2
It's derived from this:

    (x + c)(x - c) = x^2 + cx - cx - c^2
                   = x^2 - c^2
    => x^2 = (x + c)(x - c) + c^2
(I note that the blog explains this later, but I had to stop when I read the observation and work it out for myself on paper - when reading the text, it seemed like this step was missing.)


IMHO, a clearer version:

                 x^2 = x^2
   x^2 + (r^2 - r^2) = x^2
   (x^2 - r^2) + r^2 = x^2
(x + r)(x - r) + r^2 = x^2

If we continue you'll also notice that:

      (x + r)(x - r) = x^2 - r^2 
Which is useful if you need to calculate the opposite where two numbers are mirrored around a suitable even number, i.e. 28 * 32 -> (30 + 2)(30 - 2) = 30^2 - 2^2


I don't think that's clearer. Factoring quadratic equations is taught in schools, and that's where you learn how to multiply out expressions of this form:

    (ax + b)(cx + d) = ax(cx + d) + b(cx + d)
                     = acx^2 + adx + bcx + bd
A special case of these factorizations is:

    (ax + c)(ax - c) = ax(ax - c) + c(ax - c)
                     = a^2x^2 - acx + acx - c^2
                     = a^2x^2 - c^2
The reason it's a special case is because there's cancellation of the terms. So starting out with this is useful, as it's likely to be something people have met in school - but people needn't remember the factorization (which isn't strictly speaking needed much - we have an equation for solving this), just how to multiply the terms (which is used more often). From it, we can derive all that's needed for the trick, without any odd moves.

With your own version, you have to introduce a term which adds up to zero - (r^2 - r^2) - for no obvious reason, and then you need to already know how to factor x^2 - r^2 to (x + r)(x - r) in order to understand the last step.

So I think your version is less easy to understand because it's not clear why the first step is what it is, and it relies on more recollection of school arithmetic.

(The only reason I expound at length on this is because I think what makes something obvious or easy to understand is a deep topic, linked to what's assumed to be known beforehand and the size of inferential jumps between steps, and is important for programming, writing, and indeed all communication.)


I'm too dense to understand your explanation, but thanks anyway :)

Edit: It took me a while but I figured out his version and your version. Thanks!


A good shortcut I use is for calculating cumulative interest / growth.

x% growth followed by y% growth is equal to a growth of (x+y).xy % overall. Eg. 6% followed by 8% growth is 14.48% overall growth.

You can easily extend this to account for negative growth rates, more decimal places and so on. Very useful in tracking business metrics, portfolio valuation and so on.


I remember reading how Bethe taught Feynman how to square numbers around 50 in his head.

1) Start at 50^2 = 2500. 2) Pick a number, determine how far away it is from 50, call it N (N can be negative). 3) Multiply N by 100, add that number to 2500. 4) Square N, add that number to your current total.

For example, 52^2. 1) Start at 2500. 2) N = 2. 3) N100 = 200. 2500 + 200 = 2700. 4) N^2 = 4. 2700 + 4 = 2704.

Example when N is negative: 47^2. 1) Start at 2500. 2) N = -3. 3) N100 = -300. 2500 + (-300) = 2200. 4) N^2 = 9. 2200 + 9 = 2209.


One technique I like to use when doing any kind of multiplication is to round the numbers, multiply, then add the multiplication of the remainders together. 222 * 15 = 200 * 15 + (15 * 22) = 3000 + (15 * 20) + (15 * 2) = 3000 + 30 + 300 = 3330.

I would do this for all multiplication basically, though. I really like the trick presented here for doing squares. It will make life much easier if I can just remember the formula.


Another interesting thing from the book is square root estimation. For example what's the square root of 73?

Well you know it's between 8 and 9 because 8^2 is 64 and 9^2 is 81, so it's 8 point something. The difference between 64 and 73 is 9. His estimate would be 8 plus 9 divided by 2 times 8. Or how much the low estimate is off by, divided by twice the guess.

In this case that's 8 9/16 = 8.5625. The actual square root of 73 is 8.544.


I do square roots "visually", since that's how my head works. Get the closest square that's less than the number, subtract the difference, and then "visually" spread them out over the two sides. That gets me to within two decimal places usually, which is generally good enough for whatever I'm trying to do in my head.

Also, I do left-to-right math too (or, "most significant first"). I did it that way when I first learned math, and then public schooling spent years teaching me not to do it that way, and finally I got good at it again a few years after graduation.

It's a much better way of handling math. I wish it was taught instead of the silly right-to-left nonsense.


The actual square root of 73 is 8.544.

No it isn't.

</pedantry>


<pedantry>your XML failed to parse</pedantry>


It depends on what the meaning of the word 'is' is.

8.544 is accurate to within 0.00001.


I had read in Surely You are joking Mr Feynman, squaring numbers near 50 is really easy, for example, 49xx2 is (50 - 1)xx2 which is 2500 - 100 + 1 that is 2401.


I have an odd habit to factorize the number first: 24 * 35 = 6 * 5 * 7 * 4 = 840. Oh, the article is talking about addition and squaring...


It's interesting that the book cited in the submitted article

http://www.amazon.com/Secrets-Mental-Math-Mathemagicians-Cal...

(this link is to the United States Amazon site, while the submitted article link was to amazon.co.uk)

is written mostly by a professional mathematician, but with an introduction by an author who is a historian by higher education. Michael Shermer writes a number of interesting books,

http://www.amazon.com/Michael-Shermer/e/B001H6MCNY/

of which my favorite is Why People Believe Weird Things: Pseudoscience, Superstition, and Other Confusions of Our Time.

http://www.amazon.com/People-Believe-Weird-Things-Pseudoscie...


The other author (also my frosh Calculus prof) did a TED talk a while back:

http://www.youtube.com/watch?v=M4vqr3_ROIk


Woow, that is really effective ! I recently listened to Derren's Brown audiobook about memory and he teaches a really effective method to remember list of words. With his technique I can memorize really easily 20 words and still remember them days after. I never tried more but I'm sure I can do 50 words (I really have to try).

His technique :

1. okay first imagine that the list of words begins with "telephone, sausage and monkey"

2. When you listen to the first word, imagine something grotesque with vivid colors and unscaled. For a telephone just imagine an immense telephone, let's say a pink huge telephone.

3. When you hear the next word, imagine something in relation with the previous word. Like you need to use smelly sausage to type on the digital numbers.

4. Continue to do the same. Next word : "A red monkey is eating saussage"


Having the ability to do quick calculations in your head is critical for good engineering.

I've worked as an electrical engineer and knowing a lot of 'envelope-style' calculations is important when you are trying to trace down problems. Being able to calculate parasitic inductance, or capacitance is key when say trying to find out why and opamp is oscillating.


something i do for more general two digit multiplies is to work from left to right, like he states. take his example, 27 squared:

2x2 = 4 2x7 + 2x7 (cross) = 28, carry the 2 now you have 68 7x7 = 49, carry the 4 729

it's usually fast enough for me, and i don't have to remember other tricks.


another approach might be to treat numbers as letters, squaring them is then represented algebraically as (a+b) ^ 2 == a^2 + b^2 + 2ab which can then be easily combined:

79^2 = 49, 126, 81 => 6241 a == 7, a^2 == 49

b == 9, b^2 == 81

2ab == 279 = 126

combination == (a^2+2ab+b^2)

from 81 take 1

add '8' to 2ab == 134, take 4

add '13' to 49 == 62

answer == 6241


I do that for all 2 digit multiplication I do in my head- I just use foil.


I do 67^2 as 6060 + 760 + 760 + 77 ...


All this and much more is available in Vedic Mathematics (and a lot is freely available on the internet).


Very interesting approach. For those who are interested in more "different" math, google (or wikipedia) for "vedic math" (from Sanskrit Véda, "knowledge"); an ancient Indian system of mathematics a bit different from the typical western teachings, said to better adhere to how the human mind works. Some amazingly efficient techniques for arithmethics on both paper and in head are to be found there.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: