Checking Multiplication via Digit Sums

Last week a friend who is a fourth grade teacher came to me with a math problem.  The father of one of his students had showed him a trick for checking the result of a three-digit multiplication problem.  The father had learned the trick as a student himself, but he didn’t know why it worked.  My friend showed me the trick and asked if I had seen it before.  This post describes this check and explains why it works.

Suppose you want to multiply 231 \times 243.  Working it out by hand, you get 56133.  Add the digits in the answer (5+6+1+3+3) to get 18.  Add the digits again to get 9.  Stop now that you have a single digit.

Alternatively, do this digit adding beforehand.  Adding the digits of 231 together, we get 6.  Adding the digits of 243 together, we get 9.  Multiply 6 \times 9 to get 54, then add these digits to get 9.  We got 9, just as we did before.  And that’s the check: You have to get the same thing with either process.

This almost seems like magic, but there’s some interesting basic number theory going on here.  Let’s start with the following definition.

Given a positive integer x, define its digit sum D(x) to be the sum of the digits in its base 10 representation, with the stipulation that if this sum is 10 or larger then the process of adding digits is applied repeatedly until a single digit is obtained.

Then the trick my friend showed me claims that the following is true:

Theorem 1: \displaystyle D(xy) = D(D(x)D(y)).

The most important piece of the proof of Theorem 1 is that D(x) is actually calculating the remainder when x is divided by 9.  Using standard notation for remainders, let’s call this

Lemma 1: \displaystyle D(x) = x \bmod 9.

Proof of Lemma 1: Let the base 10 representation of x be given by \displaystyle x = \sum_{k=0}^n x_k 10^k.  Then \displaystyle x \bmod 9 = \sum_{k=0}^n x^k 10^k \bmod 9 = \sum_{k=0}^n x_k \bmod 9.   (The last step is valid because 10 \bmod 9 = 1 \bmod 9, so we can replace 10^k with 1 in the sum.)  Thus calculating x \bmod 9 gives the same result as calculating the sum of its digits mod 9.  If y = \sum_{k=0}^n x_k (i.e., the sum of the digits of x), finding the sum, mod 9, of the digits of y gives the same result as y \bmod 9.  Continuing this process shows that x \bmod 9 can be determined by calculating the sum of the digits of x, calculating the sum of the digits of that result, and so forth.  This continues until a single digit is obtained, which must be the value of x \bmod 9.  Since D(x) = x \bmod 9 in the case where x has a single digit in base 10, and D(x) follows exactly the process described here when x consists of two or more digits in base 10, it must be the case that D(x) = x \bmod 9.

Back to the proof of Theorem 1:  With Lemma 1 in mind, we can rewrite the claim in Theorem 1 like so:

\displaystyle xy \bmod 9 = ((x \bmod 9)(y \bmod 9)) \bmod 9.

This is a standard property of modular arithmetic, and so we could stop here, but let’s prove it for the sake of completeness.  Let x = 9q_x + r_x, where q_x is the quotient when x is divided by 9, and r_x is the remainder.  Similarly, let y = 9q_y + r_y.

Then \displaystyle xy \bmod 9 = 81q_x q_y + 9 q_x r_y + 9 r_x q_y + r_x r_y \bmod 9 = r_x r_y \bmod 9, as the other terms are divisible by 9.

Similarly, \displaystyle ((x \bmod 9)(y \bmod 9)) \bmod 9 = r_x r_y \bmod 9, proving the theorem.

Additional comments

This check works for addition and subtraction as well.  For more on that, see this site on the arithmetic of digit sums.

The check can be simplified further by removing, at any point in the process, a 9 that appear in a digit sum.  This should make sense, given that finding a digit sum is just working mod 9.  This simplification is called “casting out nines.”

Of course, the check isn’t infallible.  It’s possible to make a mistake in the multiplication that yields the same result mod 9.  However, the chances of that (assuming a uniform distribution on the mod 9 result when a mistake is made) is only 1/9.

Advertisements
This entry was posted in arithmetic, elementary number theory. Bookmark the permalink.

4 Responses to Checking Multiplication via Digit Sums

  1. me says:

    um…2+3+1=6…

    • mzspivey says:

      Ha! Thanks; I’ll fix it.

      • me says:

        It’s also interesting to note that you inadvertently created an example of a pitfall of this trick because the digit sum of the other term is 9.

        I learned this trick a long time ago, but never really knew how it worked. I asked some of my engineering math profs who waved their hands and said something about modulus math. Your explanation is great. Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s