Sunday, October 28, 2012

173: Digital Roots

Audio Link

Back in episode 128, you may have heard me rightly make fun of New Age numerologists for their propensity to draw great significance into adding up the digits of a number, ignoring the various deep and interesting aspects of numerical structure. I still reserve the right to make fun of them for this, as it's generally pretty silly to prognosticate the future that way. But, being a thoughtful Number 7 personality, it occurred to me that it might be worth talking about the legitimate uses for summing the digits of a number. While it doesn't have quite the universal significance taught by the numerologists, adding the digits of a number is a legitimate mathematical operation, known as the “Digital Root”, and does have real applications.

To start with, let's take a closer look at what you get when you add a number's digits, repeating the process if the result is multi-digit, until you have digested the original number down to a 1-digit value. At first you might think the result is totally arbitrary, but as with many things in math, if we look a little closer we can find a surprising pattern. Try adding the digits of a few examples, and you may start to notice that the digital root is congruent modulo 9 to the original number. In other words, if you take the number you started with, divide it by 9, and look at the remainder, you'll get the same value as you did by this digit-summing process. (Note that for this purpose, as is standard in modular arithmetic and bargain sales prices, we are treating 9 as equivalent to 0.) For example, look at 56. Since 5+6=11. and 1+1=2, its digital root is 2. And it's also 2 more than the closest multiple of 9, 54. How did that happen?
 
It's actually pretty easy to prove that this is always the case. Suppose we have a 4 digit number abcd. Remember that in our place-based number system, the value of this number is equivalent to 1000a + 100b + 10c + d. Let's rearrange this a bit, and write it as 999a + 99b + 9c + a +b+c+d. When you write it this way, you can see that the original number is equal to some multiple of 9 plus the sum of the digits. If the sum of the digits is itself multi-digit, you can repeat the process for another iteration or two. In any case, you can see that our result is proven: this sum really is congruent mod 9 to the starting number.
 
If you're lucky enough to have gone to elementary school before the age of calculator addiction, you may vaguely recall one powerful use for this property of digital roots: the old trick of “casting out 9s”, to check if the result of an arithmetic operation you did by hand is accurate. This takes advantage of the fact that the mod 9 value is preserved by addition, subtraction, multiplication, and division: so if P is congruent to 3, and Q is congruent to 2, then P+Q is congruent to 5. So if you find the digital root of P and add it to the digital root of Q, the sum should match the digital root of your result for P+Q-- if it didn't, you made a mistake somewhere. Be careful though-- about 1/9 of your mistakes will probably result in an error that is congruent mod 9, and will be missed by this method. The term “casting out 9s” comes from the fact that you can take a shortcut and cross out any sets of digits that sum to 9 before adding up the digital roots, without changing the results.
 
There are also many cases where certain types of numbers leave “tracks” in the digital roots that can be used to quickly eliminate candidates that might or might not be numbers of a certain type. As the simplest example, numbers divisible by 9 are identifiable by their digital root of 9. Related to this is that numbers divisible by 3 always have digital roots of 3, 6, or 9. All squares have a digital root of 1, 4, 7, or 9, and cubes have a digital root of 1, 8, or 9. On the wikipedia page you can see the patterns for other cases such as perfect numbers, prime numbers, twin primes, factorials, and more.
 
A cooler application of digital roots is the figure known as the Vedic Square, an ancient Indian variant of the traditional 9x9 multiplication table, with the digital roots in each square instead of the product. So for example, in row 7 and column 8, instead of displaying the product 56, we would write 2, since 5+6 = 11 and 1+1 = 2. I know, you're probably thinking to yourself, “Since when are multiplication tables cool?” But try drawing one, and then coloring in all the squares with a particular set of numbers-- color in all the 1s, or all the 2s, or all the 4s and 5s, etc. You will find that you generate intricate symmetrical patterns, which you can see at some links in the show notes if you're too lazy to start sketching out squares yourself. Such patterns have been observed since ancient times and have been used as the foundations of various forms of abstract Islamic art. I also found one web page claiming the Sistine Chapel, the I Ching, and the game of chess were all influenced by Vedic Square patterns, but these sound like a bit of a stretch.
 
We should also keep in mind that the concept of a digital root is closely tied with the fact that our number system is Base 10. If, for example, we decided to use a Base 12 number system, then the digital roots of any number would be congruent modulo 11 rather than modulo 9 to it. The process of casting out 9s would be replaced by casting out 11s. And we would be able to generate an 11x11 Vedic square that would be totally different from our base-10 9x9 one. Next time you're in the mood to doodle some art & feeling uninspired, just choose an abitrary base and draw a Vedic square of your own, and you'll generate a new fresh set of visually interesting patterns.
 
And this has been your math mutation for today.
References: