# Casting out nines

Jump to navigation Jump to search

Casting out nines is a sanity test to ensure that hand computations of sums, differences, products, and quotients of integers are correct. By looking at the digital roots of the inputs and outputs, the casting-out-nines method can help one check arithmetic calculations. The method is so simple that most schoolchildren can apply it without understanding its mathematical underpinnings.

## Examples

The method involves converting each number into its "casting-out-nines" equivalent, and then redoing the arithmetic. The casting-out-nines answer should equal the casting-out-nines version of the original answer. Below are examples for using casting-out-nines to check addition, subtraction, multiplication, and division.

### Addition

In each addend, cross out all 9s and pairs of digits that total 9, then add together what remains. These new values are called excesses. Add up leftover digits for each addend until one digit is reached. Now process the sum and also the excesses to get a final excess.

### Subtraction

 ${\displaystyle {\bcancel {5}}{\bcancel {6}}{\bcancel {4}}{\bcancel {3}}\,}$ ${\displaystyle \Rightarrow }$ ${\displaystyle 0(9)\,}$ First, cross out all 9s and digits that total 9 in both minuend and subtrahend (italicized). ${\displaystyle {\underline {-2{\bcancel {8}}{\bcancel {9}}{\bcancel {1}}}}\,}$ ${\displaystyle \Rightarrow }$ ${\displaystyle -2\,}$ Add up leftover digits for each value until one digit is reached. ${\displaystyle {\bcancel {2}}7{\bcancel {5}}{\bcancel {2}}\,}$ ${\displaystyle {\bigg \Downarrow }}$ Now follow the same procedure with the difference, coming to a single digit. ${\displaystyle \Downarrow }$ Because subtracting 2 from zero gives a negative number, borrow a 9 from the minuend. ${\displaystyle {7}\,}$ ${\displaystyle \Leftrightarrow }$ ${\displaystyle 7\,}$ The difference between the minuend and the subtrahend excesses should equal the difference excess.

### Multiplication

 ${\displaystyle {\bcancel {5}}{\bcancel {4}}8\,}$ ${\displaystyle \Rightarrow }$ ${\displaystyle 8\,}$ First, cross out all 9s and digits that total 9 in each factor (italicized). ${\displaystyle {\underline {\times 62{\bcancel {9}}}}\,}$ ${\displaystyle \Rightarrow }$ ${\displaystyle 8\,}$ Add up leftover digits for each multiplicand until one digit is reached. ${\displaystyle {{\bcancel {3}}44{\bcancel {6}}{\bcancel {9}}2}\,}$ ${\displaystyle {\bigg \Downarrow }}$ Multiply the two excesses, and then add until one digit is reached. ${\displaystyle \Downarrow }$ Do the same with the product, crossing out 9s and getting one digit. ${\displaystyle {1}\,}$ ${\displaystyle \Leftrightarrow }$ ${\displaystyle 1\,}$* The excess from the product should equal the final excess from the factors.

*8 times 8 is 64; 6 and 4 are 10; 1 and 0 are 1.

### Division

 ${\displaystyle {\bcancel {27}}{\bcancel {54}}62\,}$ ${\displaystyle \div }$ ${\displaystyle 877\,}$ ${\displaystyle =}$ ${\displaystyle 314\,}$ ${\displaystyle r.}$ ${\displaystyle 84\,}$ Cross out all 9s and digits that total 9 in the divisor, quotient, and remainder. ${\displaystyle \Downarrow }$ ${\displaystyle \Downarrow }$ ${\displaystyle \Downarrow }$ ${\displaystyle \Downarrow }$ Add up all uncrossed digits from each value until one digit is reached for each value. ${\displaystyle 8\,}$ ${\displaystyle \Leftrightarrow }$ ${\displaystyle (4\,}$ ${\displaystyle \times }$ ${\displaystyle 8)\,}$ ${\displaystyle +}$ ${\displaystyle 3\,}$ The dividend excess should equal the final excess from the other values. In other words, you are performing the same procedure as in a multiplication, only backwards. 8x4=32 which is 5, 5+3 = 8. And 8=8.

## How it works

The method works because the original numbers are 'decimal' (base 10), the modulus is chosen to differ by 1, and casting out is equivalent to taking a digit sum. In general any two 'large' integers, x and y, expressed in any smaller modulus as x' and y' (for example, modulo 7) will always have the same sum, difference or product as their originals. This property is also preserved for the 'digit sum' where the base and the modulus differ by 1.

If a calculation was correct before casting out, casting out on both sides will preserve correctness. However, it is possible that two previously unequal integers will be identical modulo 9 (on average, a ninth of the time).

One should note that the operation does not work on fractions, since a given fractional number does not have a unique representation.

## A variation on the explanation

A nice trick for very young children to learn to add nine is to add ten to the digit and to count back one. Since we are adding 1 to the ten's digit and subtracting one from the unit's digit, the sum of the digits should remain the same. For example, 9 + 2 = 11 with 1 + 1 = 2. When adding 9 to itself, we would thus expect the sum of the digits to be 9 as follows: 9 + 9 = 18, (1 + 8 = 9) and 9 + 9 + 9 = 27, (2 + 7 = 9). Let us look at a simple multiplication: 5×7 = 35, (3 + 5 = 8). Now consider (7 + 9)×5 = 16×5 = 80, (8 + 0 = 8) or 7×(9 + 5) = 7×14 = 98, (9 + 8 = 17, (1 + 7 = 8).

Any positive integer can be written as 9×n + a, where 'a' is a single digit from 0 to 8, and 'n' is any positive integer. Thus, using the distributive rule, (9×n + a)×(9×m + b)= 9×9×n×m + 9(am + bn) + ab. Since the first two factors are multiplied by 9, their sums will end up being 9 or 0, leaving us with 'ab'. In our example, 'a' was 7 and 'b' was 5. We would expect that in any base system, the number before that base would behave just like the nine.

## Limitation to casting out nines

While extremely useful, casting out nines does not catch all errors made while doing calculations. For example, the casting-out-nines method would not recognise the error in a calculation of 5×7 which produced any of the erroneous results 8, 17, 26, etc. in other words, the method only catches erroneous results whose digital root is one of the 8 digits that is different from that of the correct result.

## History

A form of casting out nines known to ancient Greek mathematicians was described by the Roman bishop Hippolytus in The Refutation of all Heresies, and more briefly by the Syrian Neoplatonist philosopher Iamblichus in his commentary on Nicomachus's Introduction to Arithmetic. Ibn Sina (Avicenna) (908–946) was a Persian physician, astronomer, physicist and mathematician who contributed to the development of this mathematical technique.[1] It was employed by twelfth-century Hindu mathematicians.[2] In the 17th century, Gottfried Wilhelm Leibniz not only used the method extensively, but presented it frequently as a model for rationality.Template:Cn

In Synergetics, R. Buckminster Fuller claims to have used casting-out-nines "before World War I."[3] Fuller explains how to cast out nines and makes other claims about the resulting 'indigs,' but he fails to note that casting out nines can result in false positives.

The method bears striking resemblance to standard signal processing and computational error detection and error correction methods, typically using similar modular arithmetic in checksums and simpler check digits.

## References

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}

• {{#invoke:citation/CS1|citation

|CitationClass=citation }}