Casting Out Nines to Check Arithmetic
Date: 08/26/99 at 19:29:17 From: Jason Fowler Subject: Division, Multiplication, Subtraction, and Addition My teacher was talking about casting out 9's. She said it was the easiest way to check the problems. No one in the class understands this method. She is a new teacher, we're in the 6th grade, and she was teaching high school math. Thank you, Jason Fowler
Date: 08/27/99 at 08:56:02 From: Doctor Peterson Subject: Re: Division, Multiplication, Subtraction, and Addition Hi, Jason. Casting out nines is not high-school math if all you want to do is use it; but it can take some effort to explain why it works without getting into hard stuff. Here are two explanations of it in our archives, both of which get into some deeper ideas than you want by way of explaining how it works: Casting Out Nines and Elevens http://mathforum.org/library/drmath/view/55805.html Casting Out Nines http://mathforum.org/library/drmath/view/55831.html I'll give you a quick explanation of how to do it, without the big words. First, for any number we can get a single digit, which I will call the "check digit," by repeatedly adding the digits. That is, we add the digits of the number, then if there is more than one digit in the result we add its digits, and so on until there is only one digit left. For example, for the numbers 6395 and 1259, we get: 6395 --> 6 + 3 + 9 + 5 = 23 --> 2 + 3 = 5 1259 --> 1 + 2 + 5 + 9 = 17 --> 1 + 7 = 8 Now, it turns out that if you add or multiply a set of numbers, the check digit of their sum is the same as the check digit of the sum of the check digits. You can think of it like this: numbers -----> digits | check | | (1) |add | |(2) | V |add sum -----> digit |(4) check | | (3) |equal? | (5) | (6) V check V sum -------------------> digit That is, if you calculate the check digit (1) of each number you're adding, then add these (2) and calculate the check digit of the sum (3), that should be the same as the check digit (5) of the sum (4) you are checking. In our example, the sum of the numbers is 6395 + 1259 ------ 7654 --> 7 + 6 + 5 + 4 = 22 --> 2 + 2 = 4 with check digit 4, and the sum of their check digits is 5 + 8 --- 13 --> 1 + 3 = 4 So the check digit of the sum is 4, and the check digit of the sum of the check digits 5 and 8 is also 4. If they didn't agree, we'd know something was wrong. Here's my diagram: 6395 -------> 5 1259 -------> 8 | check | | |add | | | V |add 13 -------> 4 | check | | |equal? yes! | | V check V 7654 ------------------> 4 Similarly, for multiplication, the product of the numbers is 6395 x 1259 ------- 8051305 --> 8 + 0 + 5 + 1 + 3 + 0 + 5 = 22 --> 2 + 2 = 4 and the product of the check digits is 5 x 8 --- 40 --> 4 + 0 = 4 which agrees with our product: 6395 -------> 5 1259 -------> 8 | check | | |mult | | | V |mult 40 -------> 4 | check | | |equal? yes! | | V check V 8051305 ----------------> 4 (You wouldn't normally get the same check digit for the result of the sum and the products; I just picked a weird example.) You can also apply the process to subtraction and division, but because of some special cases you have to deal with, it's easier to transform the problem to an addition or multiplication. For example, to check the subtraction: 7654 - 6395 ------ 1259 you would transform it to the addition I did above. To check this division: _____6395_rem 342 1259 ) 8051647 you would transform it to the multiplication I did above, by adding the check digit of the remainder to the product of the check digits of the quotient and the divisor, and checking whether this is equal to the dividend: 6395 --> 5 x 1259 --> x 8 ------- --- 8051305 40 --> 4 + 342 ----------> + 9 ------- --- 8051647 ---> 4 <--- 13 In other words, you apply casting out nines not to the subtraction or division itself, but to the standard check, in which you reverse the problem by adding the subtrahend to the difference or multiplying the quotient by the divisor. If the check digits don't come out right, you must have made a mistake in your arithmetic (either in the problem you're checking, or in calculating the check digit); but if the check digits agree, your work could still be wrong, such as if you switched two digits when you were copying. In fact, I use a variant of this method when I balance my checkbook. If I get the wrong balance, I know my calculator didn't add wrong, but I may have entered something wrong. If the check digit for my balance is the same as what the bank says, I can guess that I reversed two digits somewhere; if they are different, it's more likely that I dropped a digit, or perhaps a whole transaction. If you want to know what this has to do with nines, or why it works, check out the other answers I referred to above. The basic idea is that the check digit is essentially the remainder after you divide by 9. (A slightly more advanced way of working with these check digits is to treat a result of 9 as a zero, so that check digits are always between 0 and 8 rather than 1 and 9, making it a genuine remainder.) You may notice that when you add the digits of 6395, if you just ignore the 9, and the 6+3 = 9, you still end up with 5 as your check digit. This is because any 9's make no difference in the result. That's why the process is called "casting out" nines. Also, at any step in the process, you can add digits, not just at the end: to do 8051647, I can say 8 + 5 = 13, which gives 4; plus 1 is 5, plus 6 is 11, which gives 2, plus 4 is 6, plus 7 is 13 which gives 4. I never have to work with numbers bigger than 18. I hope this clarifies what you're doing. It takes a lot of words to explain, but it's really easy to do. Keep at it and you'll get the idea. If you want a simpler explanation of WHY the method works than we have in our archives, write back and I can send that to you too. - Doctor Peterson, The Math Forum http://mathforum.org/dr.math/
Date: 03/23/2003 at 13:28:21 From: Sarah Dodge Subject: Casting out nines Dear Dr. Math, I don't understand casting out nines. Can you help me? Here is an example 3942 - 1581 ------- I know that it equals 2361 I think that you would add the numbers together and you would throw out the nines, so it would be 3942 (0) - 1581 (6) so what wwould the answer be? (3?) How do you get that though ?
Date: 03/24/2003 at 12:40:37 From: Doctor Peterson Subject: Re: Casting out nines Hi, Sarah. I would usually check a subtraction by checking the equivalent addition; here 2361 + 1581 = 3942. In this case, the reduced digit sums are 3, 6, and 0, which is correct since 3+6=9 which reduces to 0. But you can cast out nines to check subtraction directly, if you add one step. In this example you want to subtract 6 from 0. To make the 0 big enough to subtract, you can "borrow" a 9, by adding 9 to the zero. (Just as you reduce by casting out nines, you can grab an extra nine when you need one.) Now you are subtracting 6 from 9, which gives you the 3 you expect. If you have any further questions, feel free to write back. - Doctor Peterson, The Math Forum http://mathforum.org/dr.math/
Search the Dr. Math Library:
Ask Dr. MathTM
© 1994-2013 The Math Forum