To do a square root on an abacus, you use partitions to do a paper algorithm for square root using the abacus. The catch is that most people don’t even *remember* how to do square roots on paper, if they ever learned it at all. (In fact, in school, *I* didn’t learn the classical paper algorithm; we never really did roots on paper; the closest we did was using square root as an example of Newton’s method. Like so much of my basic math, I learned this from my father.)
So, for your entertainment and edification, today, I’ll describe the classical algorithm for computing square roots on paper. I’ll also show you just why it works.
Suppose you want to take the square root of *n*. Start by writing down *n*. The algorithm is going to work using *pairs* of digits, so you need to divide the number into *pairs* of digits. A pair *can’t* cross the decimal point, so start at the decimal, and break into pairs going both right and left. If you don’t have enough digits, you pad out the ends with zeros.
So let’s do that much with an example, Let’s say we wanted to take the square root of 513.5. The pairing would look like:
05 13. 20
Now, start with the first pair, and approximate: what’s the single digit that is *closest* to being the square root of that pair? Write that down *above* the first pair. Then take the square of that digit, and write it *beneath* the pair, and subtract.
So with our example, the first pair is “05”. The closest single digit approximation of the square root is “2”. So we’d write “2” above the “05”; and “4” beneath it, and subtract. The number on *top* of the radical is the current root estimate, which we’ll call *est*; the result of the subtraction is the current remainder.
2 /-------- \/ 05 13. 20 4 ---- 1
That’s the setup. Now we get to the part where we iterate. We’ll take the next pair from the number we’re taking the square root of, pull it down, and write it next to the current remainder. The current remainder concatenated with those two digits is the *target number* for this iteration, which we’ll call *t*. What we want to do in the iteration is find a number *x* for which (20×*est*+n)×n ≤ t. That number *x* will be the next digit of the square root. So we’ll write *x* on top of the radical as the next digit; and subtract (20×*est*+x)×x from the target.
So we take the *est*, multiply it by 20; and write it down next to the current target:
2 /-------- \/ 05 13. 20 4 ---- (40) 1 13
Now, we need to approximate again. What’s the largest *x* for which (40+x)×x ≤ 113? 3×43=123, so 3 is too large. 2×42=84. So the next digit is two. So we write 2 on top of the radical, and subtract 84 from the target. Then we pull down the next two digits, and repeat.
2 2 /-------------- \/ 05 13. 20 4 ---- (40) 113 84 ----- (440) 2920
So we want to approximate: what number *x* is the largest *x* such that (440+x)×x ≤ 2920? That would be six. There’s one special thing about this step: this is were we cross the decimal point in the original number. So we copy the decimal point up above the radical; the next digit of our root is going to be after the decimal.
2 2 . 6 /-------------- \/ 05 13. 20 4 ---- (40) 113 84 ----- (440) 2920 2676 ------ 244
If we wanted to keep going, we could just add another trailing pair of zeros under the radical. Let’s do that once.
2 2 . 6 5 /-------------- \/ 05 13. 20 00 4 ---- (40) 113 84 ----- (440) 2920 2676 ------ (4520) 24400 22625 ------- 1775
We could keep going if we wanted. But that’s enough for now. To quickly check our result, what’s the square of 22.65? Whipping out my slide rule, I find that 22.65×22.65 is almost exactly 513.
It’s pretty easy, and quite fast if you don’t want too many digits. As you compute more and more digits, figuring out the approximation starts to get a bit harder, because you’re using more and more digits in your target.
The obvious question is, why does this work? It’s actually pretty simple, and remarkably clever. It’s just another one of those places where you do a bit of algebra to see what’s going on.
At each step, we’re breaking the number *n* we’re taking the root of into two parts, *a* and *b*, such that ((a×10)+b)2 = n.
So, let’s expand that. (10a)2 + 20ab + b2 = n.
So, first step, we get a value for a. Then we compute an approximation of *b* using “20ab + b2≤n-(10a)2“.
That gives us a better approximation of the square root. We now repeat the process, using the *better* approximation as the new value of *a*, and approximate *b* using the inequality.
This is long enough that I’m not going to try to do it on the abacus as part of this post; I’ll show you how to do this algorithm using an abacus tomorrow.