Return to my Mathematics pages
Go to my home page


Taking Square Roots

© Copyright 1999, Jim Loy

When I was in high school, I learned a mysterious method for taking square roots. I tried to find out why it worked. And I ended up finding methods of taking cube roots and fifth roots (to take a fourth root, just take the square root twice). Now, with modern calculators, you can do all of this with the touch of a few buttons. Do you long for the good old days when you took square roots by hand? Me neither.

It is surprisingly easy to take square roots (and other roots) by trial and error. Let's take the square root of 19:

  guess  squared
  4.0    16 < 19
  4.5    20.25 > 19
  4.4    19.36 > 19
  4.3    18.89 < 19
  4.35   18.9225 < 19
  4.36   19.0096 > 19
  4.355  18.966025 < 19

So, 4.36 is correct to 3 places. That is not too bad. You may actually have to do something like that, when you need to take a cube root, if your calculator does not have power functions on it. Of course, other methods are faster, if you can figure out how.


square root methodHere's how we were taught in school. We draw a diagram much like we do with long division. In fact, the whole method is very much like long division. We mark off every other digit of the number under the square root sign, starting at the decimal point. Every two digits of that number produces one digit of the answer.

We estimate the first digit of the answer: greater than 4 and less than 5, so we choose 4. Now we put that 4 to the left of the square root sign. We multiply 4x4 and get 16, which we put under the 19. We subtract and get 3, and we bring down two digits (00 in this case), making 300.

Here's the part that is different from long division (where the divisor stays the same): We double the four on the left, making 8, and put that to the left of the 300. Now we estimate what times 80+what is just less than 300. 4x84 is greater than 300, so 3x83 is what we want. 3 is the next digit of the answer, and we put that 3 to the right of the 8 (making 83 (or 80+what)) on the left side. 3x83=249, which we put under the 300 and subtract, getting 51. We bring down 00 from above.

Now we get 86 (twice 43) on the left side. And we repeat the operation, getting 865x5 and 8708x8 and 87169x9. I did that last one to see which way to round the previous answer. So the answer is 4.359. That process may look daunting. But it is fairly fast.


That is not the way computers and calculators do square roots. They use a very fast method called Newton's Method, or Newton's Iteration. Estimating the square root of n:

x(new)=(x+n/x)/2

The x(new) on the left (xk or "x sub k" in technical terms) is the new x. The other x's (xk-1 or "x sub k-1") are the old x. The new x is an improved estimate of the answer. Let's try to estimate the square root of 19. We can start with any estimate except 0. So, let's start with 1:

  1. 1
  2. 10
  3. 5.95
  4. 4.571638655462
  5. 4.363848830052
  6. 4.358901750853
  7. 4.358898943542
  8. 4.358898943541

That is correct out to the last digit. It took a little while to get started, so you may want to start with a better estimate than 1. For an eight digit number you would start with a four digit estimate. After a while, this method is very fast, faster than the method we learned in school. For example, step 7 (above) gained 8 digits of accuracy over the estimate in step 6. Step 8 would have been even more impressive (about 16 more digits), had we not exceeded the accuracy of my calculator.

Newton's Method has other uses, besides square roots. [I originally showed an erroneous formula for cube roots, here.] Calculators and computers do not use Newton's method for cube roots. They would use a power function, which is based on natural (base e) logarithms. The calculator uses series to estimate these. And the process is much slower, and less accurate than Newton's Method. Newton's method is not always applicable.


Sometimes you can be very accurate just by making a quick estimation of a square root. I can tell that the square root of 1.02 is about 1.01. Let's say that 1.01 is 1+x. Squared, that is 1+2x+x2 (or 1+2x+x^2). Here, x squared is fairly insignificant. Try the square root of 1.001. That is about 1.0005 (x is .0005 here).


Addendum:

I received email, just a few days after I wrote the above article, from a person who had been frustrated because a programming language that he was using did not have a square root function. He searched the Internet for such a function, and found it above. Ahhhh. Here at jimloy.com, success is our most important product.

Also see Two Series for Taking Square Roots. Here is the Newton method formula for finding the pth root of n. We can easily derive a cube root formula from that:

x(new) = x - (x^p-n)/(px^(p-1))

With a computer, you don't want to take something to the p power, you multiply it times itself, p times.


Return to my Mathematics pages
Go to my home page