Why The Nine Doesn’t Matter

One thing that my grandfather is superstitious about is that the car number must always add up to 7. So when we were buying a car recently, he checked with me if we’d asked the car dealer about this, and what number had been allotted. It was 8179. 

 

So I added the digits: 8 + 1 + 7 + 9 = 25

Adding the digits again to reduce to a single number: 2 + 5 = 7

So all good.

 

Then it struck me that even without the 9, the 8 + 1 + 7 added up to 16, which also gave a total of 7. Curious, I then tried it for some other numbers.

 

2936?

2 + 9 + 3 + 6 = 20

Reducing to one digit: 2 + 0 = 2

And now, just 2 + 3 + 6 = 11

1 + 1 = 2!

 

1891?

1 + 8 + 9 + 1 = 19

Reducing: 1 + 9 = 10

Reducing to one digit: 1 + 0 = 1

And now, just 1 + 8 + 1 = 10

1 + 0 = 1!

 

So it appears that the 9 does not matter. But why?

 

This is operation modulo (or mod for short, expressed as %) at work. Mod is an operation whose result is the remainder when one number is divided by another. For example, 7 % 2 = 1 and 9 % 3 = 0.

 

In our situation, what we are actually doing when adding the digits till we get a one-digit number is finding the mod 9 of the original number. This is also mathematically equivalent to adding the mod 9 of each digit of this number. This is because of the fact that every number can be expressed as the sum of its digits plus a multiple of 9. Here’s the maths:

 

Let our number be abcd.

Now, abcd = 1000a + 100b + 10c + d

∴ abcd = a + b + c + d + (999a + 99b + 9c)

Now let us assume that a + b + c + d is still a 2-digit number and therefore not the final result, so let us take it as ef.

∴ abcd = ef + (999a + 99b + 9c) = ef + 9(111a + 11b + c)

Now, if we repeat the step of reducing ef to a 1-digit number, we get

∴ abcd = 10e + f + 9(111a + 11b + c), which means

abcd = e + f + 9e + 9(111a + 11b + c) 

∴ abcd = e + f + 9(111a + 11b + c + e)

Now, if e + f is still a 2-digit number, then we repeat this last reduction one more time, which will definitely give you a 1-digit number. 

When it is now a 1-digit number, which we will take as k, then we can generalise the overall analysis to:

Original 4-digit number = a 1-digit number + a multiple of 9

Now if we take mod 9 on both sides, we get

abcd % 9 = (k % 9) + 9(111a + 11b + c + e) % 9

Now, since k is a 1-digit number (k ≤ 9), k % 9 must either be k itself or 0 if k is 9, and

9(111a + 11b + c + e) % 9 must be 0 since we know the number is a multiple of 9.

Thus, we get the result as 

Our original number % 9 = The repeated sum of the digits of our number upto 1-digit.

 

Let us illustrate this through our original 8179 example:

8179 = (1000 x 8) + (100 x 1) + (10 x 7) + 9

8179 = 8 + 1 + 7 + 9 + [(999 x 8) + (99 x 1) + (9 x 7)]

Therefore, 8179 = 25 + [(999 x 8) + (99 x 1) + (9 x 7)] = 25 + 9[(111 x 8) + (11 x 1) + (1 x 7)] Now, if we repeat the step of reducing 25 to a 1-digit number, we get

8179 = (10 x 2) + 5 + 9[(111 x 8) + (11 x 1) + (1 x 7)], which means

8179 = 2 + 5 + (9 x 2) + 9[(111 x 8) + (11 x 1) + (1 x 7)]

8179 = 2 + 5 + 9[(111 x 8) + (11 x 1) + (1 x 7) + (1 x 2)]

Now, since 2 + 5 is a 1-digit number, we directly get

8179 = 7 + 9[(111 x 8) + (11 x 1) + (1 x 7) + (1 x 2)], which is 

Our original number = Repeated sum of digits to 1-digit + a multiple of 9

Now if we take mod 9 on both sides, we get

8179 % 9 = (7 % 9) + 9[(111 x 8) + (11 x 1) + (1 x 7) + (1 x 2)] % 9

Now, since 7 is a 1-digit number less than 97 % 9 is 7 itself, and

9[(111 x 8) + (11 x 1) + (1 x 7) + (1 x 2)] % 9 must be 0 since we know the number is a multiple of 9.

Thus, we get our result:

8179 % 9 = 7, which is that

Our original number mod 9 = The sum of the digits of the number up to 1-digit

 

Now, coming to why the 9 doesn’t matter in the sum of the digits, let us take our number as abcd again.

 

abcd = a x 1000 + b x 100 + c x 10 + d 

We can separate the digits and rewrite this as:

abcd = a + b + c + d + (a x 999 + b x 99 + c x 9)

abcd = a + b + c + d + 9[(a x 111) + (b x 11) + c]

 

Then we take mod with 9 on each side, so

abcd % 9 = (a + b + c + d) % 9 + 0

which gives us the result:

abcd % 9 = (a % 9) + (b % 9) + (c % 9) + (d % 9), since mod is right distributive over addition)

From our previous result, we know that abcd % 9 = The sum of the digits upto 1-digit.

And now if any of the digits a, b, c, or d is 9, it will not add anything to the sum as 9 % 9 = 0.

 

In our example, this is :

8179 % 9 = (8 + 1 + 7 + 9) % 9 + 0 

8179 % 9 = (8 % 9) + (1 % 9) + (7 % 9) + (9 % 9)

8179 % 9 = (8 % 9) + (1 % 9) + (7 % 9) + 0

 

Therefore the 9 doesn’t matter – since 9 % 9 is 0!

 

One point to note here is that if the result of the mod operation on our original number (abcd) is 0, it means that the single-digit result is 9. This is because, from the result of the mod 9 being equal to 0, abcd must be divisible by 9. Now, since from our first proof, we know that the 4-digit number % 9 = sum of digits % 9, and the sum of digits can’t be 0, and the sum of digits is less than or equal to 9, the sum must be 9.

 

Another way of thinking about mod is by thinking of a clock with the divisor in our mod operation as the ’12’ of a clock. In our mod 9 case, the clock has numbers from 1 to 9, and so when we add 9, we actually end up at the same number that we were at before. 

 

The place-value intuition

 

Here’s another seemingly simpler take on why the 9 doesn’t: adding 9 is like adding 10 and then subtracting 1.

 

Then, because the place doesn’t matter, this boils down to adding 1 and subtracting 1.

Let’s take 8179 again. 

We can think of this as 8170 + 9 = 8170 + 10 - 1 

Now, when we add the digits, we get (8 + 1 + 7 + 0) + (1 – 1), which is just equal to 8 + 1 + 7 = 16 and 1 + 6 = 7.

 

Once again, the only exception to this rule is if the only digits are 0 and 9. 

Since we know that mod 9 of the number being 0 means the number is divisible by 9, and therefore the sum of digits is 9, we must just take 9 as the answer.

 

 

 

 

 

Comments

Popular posts from this blog

The Dishoom Dice