## Friday, April 22, 2011

### The Math Behind Using Digital Roots To Check Your Arithmetic

In my post on digital roots a while back, I provided some examples of using digital roots to perform sniff tests on basic arithmetic operations like addition, subtraction and multiplication. Digital roots turn out to have interesting properties that enable them to be used to check arithmetic operations, and also to solve some brain-teasers that rely on these interesting properties. I did not provide any reasoning or proof as to why digital roots have the properties mentioned in that post.

In this post, I will provide the basic mathematics that explains how and why digital roots have these interesting properties. The properties we will look at are:
• The digital root of a sum is the sum of the digital roots of the numbers being added
• The digital root of a difference is the difference of the digital roots of the numbers in the subtraction
• The digital root of a product is the product of the digital roots of the numbers being multiplied
Let us first define the operation of taking a digital root of a number using the notation D(n). D(n) will represent the digital root of the integer, n. In this mathematical notation, the three properties above can be rewritten as below:
• D(a + b) = D(D(a) + D(b))
• D(a - b) = D(D(a) - D(b))
• D(a * b) = D(D(a) * D(b))
On the right hand side, we include an extra digital root operation because it is possible that the sum, difference or product of the digital roots may not be in the range from 1 to 9, whereas on the left hand side, we will always get an answer that is inside that range. Proving that these properties are always true turns out to be quite easy once we figure out what a digital root is exactly.

So, what exactly is the digital root? From the discussion in the post on digital roots, you probably already know that the digital root of a number is simply the remainder when that number is divided by 9. If the remainder is 0, we use 9 as the digital root instead. Given this definition of the digital root, let us see how this applies to checking the results of addition.

Let us assume that a + b = c.

Let us also assume that a = 9w + x, and b = 9y + z.

Therefore, the digital root of a is x, and the digital root of b is z. Now, c, since it is equal to a + b, must be equal to 9w + 9y + x + z. Since 9w + 9y is fully divisible by 9 without a remainder, the digital root of c must equal D(x + z). This then proves that D(a + b) = D(D(a) + D(b)). That is all there is to this seemingly mysterious property of digital roots!

The case of subtraction is very similar to that of addition. I will not insult the intelligence of my readers by providing the proof here. Instead, let us take on multiplication.

Let us assume that a*b = c

Let us also assume that a = 9w + x, and b = 9y + z.

Therefore, the digital root of a is x, and that of b is z. Now, c, since it is equal to a*b, must be equal to 81wy + 9wz + 9yx + xz. Of the 4 terms above, the first three are divisible by 9 without a remainder. Therefore, the digital root of c is simply D(xz). And that is precisely what the property we are discussing says: D(a*b) = D(D(a)*D(b)).

Now, the astute reader is probably scratching his/her head with a question such as "what is so special about the number 9 that makes all this work as above?" Well, as it turns out, there is absolutely nothing special about the number 9 at all. We could have replaced 9 in the above proofs with 7 or 4 or any other number (1 would probably make little sense), and they would work perfectly fine. Which actually means that we could define the digital root operation with respect to any "base", not just 9.

What we did above was not just D(n), but D9(n). That is, we were talking about digital roots with respect to 9. We could just as well have D3(n), D5(n) or D8(n). For checking the results of addition, subtraction and multiplication, they would all work perfectly fine. The only difference would be the difficulty or ease of calculating these digital roots. Because we use base 10 arithmetic (normally), it turns out to be very easy to calculate D10(n) (which would just be the last digit of a number, or 10 if that last digit was 0), D5(n) (which would be the remainder of dividing the last digit by 5, and 5 if that remainder was 0), and D2(n) (which would be the remainder of dividing the last digit by 2, and 2 if that remainder was 0).

Notice that the traditional definition of digital roots involves reducing the given number to a single digit from 1 to 9, but that is only because the traditional definition of digital roots has always been D9, though most people do not realize this when using digital roots. It is perfectly acceptable for digital roots to have any number of digits, and in fact D10(n) can be any number from 1 to 10, and D1000(n) can be any number between 1 and 1000, inclusive.

It is slightly more difficult to calculate other digital roots, which is why they are not used too often. D9(n) turns out to be easy because it is just the sum of the digits of the number after throwing out 9's. This is once again because we use base 10 arithmetic (if we did all our calculations in hexadecimal numbers, D16(n) and D15(n) would be as easy to calculate as D10(n) and D9(n) are right now with decimal numbers).

So, why do we use D9 to verify the correctness of arithmetic such as addition, subtraction and multiplication instead of using something easier to compute such as D10? The answer lies in the usefulness of the test itself. The basic problem is that since D10 only uses the last digit of a number, the D10 of two numbers is the same even if all the remaining digits were completely wrong.

Thus, for example, let us say we want to check whether 324 + 642 = 456. We know that this is obviously not correct, but D10(324) = 4, D10(642) = 2, and D10(456) = 6. So, checking using digital roots can not rule out 456 as possibly the correct answer to the given problem. D9 overcomes this problem to some extent by making sure that the answer does not depend on just one digit.

Thus, D9(324) = 9, D9(642) = 3 and D9(456) = 6. Thus, we can conclude that 456 is wrong using D9 even though we could not rule it out using D10. But D9 has another problem that becomes apparent when dealing with long numbers: D9, by its very nature, depends only on the digits of the number, not the order of digits in the number.

Thus, let us say we want to see if 4987 + 9384 = 13471. Using D10, we can conclude that since D10(7 + 4) = D10(13471), we can not rule out 13471 as the correct answer. Using D9, we get D9(4987) = 1, D9(9384) = 6, and D9(13471) = 7. Since 6 + 1 = 7, we still can not rule out 13471 based on D9. It turns out that I deliberately interchanged two digits in the correct answer to get 13471. The correct answer is 14371, and checking with D10 and D9 did not reveal the problem. D9 is better at it than D10, but not perfect.

But, as we found out in this post, we are not restricted to using D9 to check the results of our computations, even though that is the most common way in which digital roots are utilized to sniff-test the results of computations. Because of the general properties of digital roots, we can actually use digital roots with respect to any number to check our computations. In fact, under some conditions, it may make sense to check the answers using multiple digital roots.

D10 and D9 could be quick checks because of the ease with which we can compute digital roots with respect to these 10 and 9. But, if time permits, one of the best digital roots for this use is D7. Divisibility by 7 does not depend on the last few digits of a number. Moreover, you can not interchange the digits of a number and retain divisibility by 7. Thus, D7 can spot mistakes that D10 and D9 can miss. In fact, this is one of the main reasons why D7 is used as a check digit in many applications!

Obviously, no digital root is going to be completely foolproof. But the number of false positives when we use D7 is much smaller than when using D10 or D9.

Going back to 4987 + 9384, we see that D7(4987) = 3, and D7(9384) = 4. Now, D7(13471) = 3, so we can tell right away that 13471 is not the correct answer. It turns out that D7(14371) = 7, thus giving us more confidence in that answer than in 13471. Many prime numbers whose multiples do not include any power of 10, such as 7, 11, 13, etc., are good candidates for using with digital roots to verify the correctness of additions, subtractions and multiplications.

What should you use? That is a matter of how much accuracy and confidence we are willing to trade off for convenience. D10 and D9 are easier to calculate than D7 or D11, which are easier to calculate than D13. But with practice, D7 and D11 are actually not that difficult to compute. Given that the task of checking the accuracy of mathematical computations is made a lot more reliable using D7 and/or D11, rather than D9 or D10, it makes sense to use digital roots with respect to 7 or 11 to perform quick checks of mathematical computations.

We could use D10, which is extremely convenient, but we sacrifice a lot in accuracy (too many false positives). Or we could use D9, which is slightly less convenient. We gain a little in accuracy, but it is not perfect. When we switch to D7 or D11, we encounter more inconvenience, but the accuracy takes a big jump up. It is difficult to fool D7 or D11 with the types of mistakes people make when performing computations (such as interchanging digits, missing a carryover somewhere in the middle of a long addition, errors caused by multiple borrowings during subtraction, and so on). This makes them much more useful for checking for computation errors than traditional digital roots.

Hopefully, this post has expanded your horizons as far as digital roots are concerned. In summary, digital roots can be computed with respect to any number, not just 9. Digital roots with respect to 9 (this is the traditional definition of digital roots) have their place when it comes to checking the possible correctness of mathematical computations, but digital roots with respect to other numbers like 7 and 11 may be much more useful in this respect. A little practice in computing D7 and D11 will go a long way in building up both your capacity for mental computation as well as your ability to sniff-test your mental computations much more reliably than traditional digital roots will ever allow you to!

Now, in this post, I have talked about verifying the results of addition, subtraction and multiplication. Most people assume that digital roots are really not very useful in checking the correctness of division. Not so fast! In the next post, I will talk about how to use digital roots for checking the results of division problems. Stay tuned, you will not be disappointed!

Las Vegas Foreclosures said...

whew! that should be read many times to understand. but thanks for sharing this, it really helped! ;)

Blogannath said...

I am glad it made sense, and also helped. If you have any questions or concerns, please feel free to post back.

Mayank said...

32%of 395-?%of286 = 74.92 how to solve this by digital roots tricks?

Blogannath said...

I know of no way to actually solve an arithmetic problem using digital roots. Digital roots can only be used to perform sanity checks on arithmetic computations after the problem has been solved and an answer has been found.

Moreover, if the problem involves non-integer numbers, digital roots are of no use because only integers have digital roots in the traditional sense.

Take a look at my posts on solving equations to find tips on solving the equation you have posted above.

Anonymous said...

How do you use digital roots to check a fraction or decimal problem? I was told it was possible, but haven't figured out how yet.

Blogannath said...

I will also work on it now that you have piqued my curiosity. If I figure it out, I will be sure to explain how to do it in a new blog post.

P L Patodia said...

My dear Blogannathji,

You said by if you check digit root of 7, the chances get reduced. It is not correct. The principle is very simple. When you use modulo 7 for digital roots, you get number between 1 and 7, so the probability of getting wrong answer is 1/7. Instead, if you use two digital roots, say 9 and 11, you are effectively using modulo 99, so the probability of mistake reduces to 1/99. Is it clear?

P L Patodia

Blogannath said...

Unfortunately, it has nothing to do with probabilities since calculating modulo is not the same as generating random numbers. By your logic, if I check my answers using digital roots with respect to 10 and 100, my probability of mistakes should go down to 1/1000. Obviously, that is not the case.

Instead, 7 and 11 are more reliable than 9 only because of the properties of modulo with respect to those numbers. As explained in the article, digital root with respect to 9 does not depend on the order of the digits in the number, so the reliability is lower. Digital roots with respect to 7 and 11 do not suffer from that problem, and therefore are preferable. Digital root with respect to 10 and other powers of 10 are the worst since they only depend on the last few digits of the number, not on the whole number, and so on.

MigrantBlog said...
This comment has been removed by the author.

## Content From TheFreeDictionary.com

In the News

Article of the Day

This Day in History

Today's Birthday

Quote of the Day

Word of the Day

Match Up
 Match each word in the left column with its synonym on the right. When finished, click Answer to see the results. Good luck!

Hangman

Spelling Bee
difficulty level:
score: -