Rule of nines (mathematics)
From Wikipedia, the free encyclopedia
The rule of nines, in mathematics, is a divisibility rule for the divisor 9. It is notable because it illustrates some interesting properties of modular arithmetic, and its proof is derived from that basis. The rule is that any positive integer is divisible by 9 if and only if the sum of its digits is also divisible by 9.
[edit] Proof
This proof, although not directly taken from that source, is based on the one by Flannery (2001).
Let the positive integer n be represented by the decimal digits ak ak-1 ... a2 a1 a0. Because
and multiplication functions the same way in modular arithmetic as it does in elementary algebra,[1]
Summing these equivalences, we get
Notice that the left term of this equivalence is equal to n, according to our definition. Therefore, the sum of the digits of n is equivalent to n itself (modulo 9); and so this sum is divisible by 9 if and only if n is also divisible by 9. The proof is complete.
[edit] Notes
- ^ with the caveat that the modulus must remain the same
[edit] References
Flannery (2001). In Code: A Mathematical Journey. Workman Publishing. ISBN 0761123849.