TOPICS
Search

Casting Out Nines


"Casting out nines" is an elementary check of a multiplication which makes use of the congruence 10^n=1 (mod 9). Let decimal numbers be written a=a_n...a_2a_1a_0, b=b_n...b_2b_1b_0, and their product be c=c_n...c_2c_1c_0. Let the digit sums of these numbers be a^*, b^*, and c^*. Then a=a^* (mod 9), b=b^* (mod 9), and c=c^* (mod 9). Furthermore ab=a^*b^* (mod 9), so c=c^* (mod 9). So if c and a^*b^* are incongruent (mod 9), the multiplication has been done incorrectly.

Casting out nines is also an addition test, since a+b=a^*+b^* (mod 9), and a subtraction test, since a-b=9+a-b (mod 9). It can also be used as a division test for a/b=q+r/b (i.e., a=qb+r) since a^*=q^*b^*+r^* (mod 9).

A page from Abraham Lincoln's cyphering book, Plimpton 089.001, Rare Book and Manuscript Library, Columbia University

In 1824, Abraham Lincoln used casting out nines to check long multiplication in his cyphering book, a page of which is illustrated above (History of Mathematics Project).

A modern transcription beside Abraham Lincoln's handwritten multiplication, Plimpton 089.001, Rare Book and Manuscript Library, Columbia University

The first exercise in the left column of the page is the multiplication 3456782×30406, shown above in a modern transcription beside the corresponding manuscript detail. Lincoln correctly wrote the three nonzero intermediate products 20740692, 1382712800, and 103703460000. Their sum, the correct product, is 105106913492, but his final handwritten line instead reads 1005106913492. The extra zero before the 5 is highlighted in red in the transcription.

Abraham Lincoln's casting-out-nines check, Plimpton 089.001, Rare Book and Manuscript Library, Columbia University

The cross is a compact layout for the check: the residues of the multiplier and multiplicand are written at left and right, the residue of their product at the bottom, and the residue of the written answer at the top. Agreement of the top and bottom entries means that the multiplication passes the test.

Lincoln placed 8 at the left of the cross because the digit sum of 3456782 is 35, which is congruent to 8 modulo 9. Similarly, the digit sum of 30406 is 13, giving the 4 at the right. Multiplying these two residues gives 8·4=32=5 (mod 9), so 5 appears at the bottom. Lincoln's written result 1005106913492 also has digit sum 41, which is congruent to 5 modulo 9, giving the matching number at the top.

Because the check compares only residues modulo 9, it does not detect errors that preserve the digit sum, including a transposition of digits or the insertion of a zero. The extra zero in Lincoln's written addition is such an error, so the check did not reveal it. The manuscript leaf is now held by Columbia University's Rare Book & Manuscript Library in New York as Plimpton 089.001 (Columbia University Libraries).

Casting out nines was transmitted to Europe by the Arabs, but was probably developed somewhere on the Indian subcontinent and is therefore sometimes also called "the Hindu check," with "Hindu" simply meaning the people of the Indian subcontinent. The method of checking arithmetic by casting out nines was described by Fibonacci in his Liber Abaci (Wells 1986, p. 74).


See also

Casting Out Sevens, Digit Sum, Digital Root, Divisibility Tests, Rule of Nines

Explore with Wolfram|Alpha

References

Conway, J. H. and Guy, R. K. The Book of Numbers. New York: Springer-Verlag, pp. 28-29, 1996.Columbia University Libraries. "Abraham Lincoln (1809-1865), Arithmetic Exercises from Manuscript Sum Book." https://exhibitions.library.columbia.edu/exhibits/show/plimpton/item/44.Ellerton, N. F.; Holguín, V. A.; and Clements, M. A. "He Would Be Good: Abraham Lincoln's Early Mathematics, 1819-1826." Ch. 6 in Abraham Lincoln's Cyphering Book and Ten Other Extraordinary Cyphering Books. Cham, Switzerland: Springer, pp. 123-186, 2014.Flannery, S. and Flannery, D. In Code: A Mathematical Journey. London, England: Profile Books, p. 115, 2000.Hilton, P.; Holton, D.; and Pedersen, J. "Casting Out 9's and 11's: Tricks of the Trade." Mathematical Reflections in a Room with Many Mirrors. New York: Springer-Verlag, pp. 53-57, 1997.History of Mathematics Project. "Lincoln's Cyphering Book." https://www.history-of-mathematics.org/artifacts/lincolns-cyphering-book.Wells, D. The Penguin Dictionary of Curious and Interesting Numbers. Middlesex, England: Penguin Books, p. 74, 1986.

Referenced on Wolfram|Alpha

Casting Out Nines

Cite this as:

Weisstein, Eric W. "Casting Out Nines." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/CastingOutNines.html

Subject classifications