[ELI5]: How do calculators find out the square root of a number?

677 views

[ELI5]: How do calculators find out the square root of a number?

In: Mathematics

4 Answers

Anonymous 0 Comments

There’s no ELI5 answer to this as it involves a fair amount of mathematics.

There are many methods of computing a square root, but for the ones that calculators and computers use, [this answer on Quora explains it well](https://www.quora.com/How-do-computers-calculate-square-roots?top_ans=25779191).

If you still want an ELI5 answer to how a square root can be calculated, then here is a simple method. Note that this is *not* the one that a calculator uses as it is too slow.

1. Take an initial guess at the answer, which could be a square root of a nearby square number (for example, 900 = 30^(2), so 30 would be a good first guess for the square root of 1000), or just half the number. It doesn’t have to be that accurate.
2. Square that guess and see whether it is higher or lower than the number you want to find the square root of.
3. Make another guess that gives you a square on the other side of your original number, so that now you have one guess that is too low and one that is too high.
4. Take the average of your two guesses.
5. Square that average. If the square is close enough to the number you want the square root of, then stop.
6. If the square is greater than your original number, replace the high guess with this new guess. If it is lower, replace the low guess with this number.
7. Go back to step 4.

This will give find you the square root as close as you like.

Here’s an example to make it clearer. What’s the square root of 5?

High guess: 3 (because 3^2 is 9, which is greater than 5). Low guess: 2 (2^2 = 4, and 4 < 5).

Average of guesses: (2 + 3)/2 = 2.5

Square of average: 6.25

This is greater than 5, so replace the high guess of 3 with 2.5.

Average of guesses: (2 + 2.5) / 2 = 2.25

Square of average: 5.0625

We are pretty close to 5 now, so 2.25 is a good estimate of the square root, but let’s go one step further. 2.25 is too high, so replace 2.5 with 2.25:

(2 + 2.25) / 2 = 2.125

2.125^2 = 4.515625

This answer is too low, so replace our low guess of 2 with this number:

(2.125 + 2.25) / 2 = 2.1875

2.1875^2 = 4.78515625

and so on until we are happy.

You are viewing 1 out of 4 answers, click here to view all answers.