r/explainlikeimfive • u/abyssDweller1700 • Jul 24 '16
Mathematics ELI5: Why is the difference between the sum of a whole number's places and the number itself is ALWAYS a direct multiple of 9?
For example let's assume a number 142. So 1+4+2=7
142-7=135, which is a multiple of 9.
3.3k
Upvotes
3.4k
u/le_epic Jul 24 '16 edited Jul 24 '16
In the decimal system (which is the one we use), the places of a number are how it's written as a sum of powers of ten. For example 142 = 1×102 + 4×101 + 2×100
So if we apply your operation to a number that's written "abc" (a is the first digit, b is the second digit, c is the last digit), a little algebra can show us how it works:
(a×100 + b×10 + c) - (a+b+c)
= a×100-a + b×10-b + c-c
= 99×a + 9×b
and now we divide by 9:
(99×a + 9×b) / 9 = 11a+b.
Since a and b are whole numbers, the final result will always be a whole number, so it's divisible by 9.
ELIhatealgebra:
Let's take a big number, for example 7342.
It's actually made of a group of 1000 sevens, a group of 100 threes, a group of 10 fours, and a single solitary two. That's what all big numbers are, the digits of a number just tell you exactly what groups of 10, 100, 1000 and so on it is made of! It's what we call the "decimal system", or "base ten".
If you remove one instance of each of the digits, well you're left with 999 sevens, 99 threes, and 9 fours! (You remove the single solitary two, so there are no lonely digits left). So you're left with a number that is just a collection of groups of nine, ninety-nine, nine-hundred-and-ninety nine digits! These groups are all multiples of nine! So the number itself is, too a multiple of nine! (because if you divide each of the groups it contains by nine, all groups make "good" divisions with no leftover! 99/9 = 11, 999/9 =111 and so on, they'll always divide neatly).
13
u/Casteway Jul 24 '16
Here's something cool I found out about whole numbers places. Take for example, 8,677. 8+6+7+7= 28. 2+8= 10. 1+0= 1. Ok, so remember the 1. Now, take that original number 8,677. 8+6 = 14. 1+4= 5. 5+7 =12. 1+2 = 3. 3+7= 10. 1+0= 1. No matter how you do it, you come to the same number.
168
u/firtree Jul 24 '16
Let's say you've got a number abc (like 142).
The difference between the number itself and the sum of the digits is:
100a + 10b + c - (a + b + c)
= a(100 - 1) + b(10 - 1) + c(1 - 1)
= 99a + 9b + 0 = 9(11a + b)
So the difference between the digits and the number itself is always 9 times something else, which means that it's always divisible by 9. This can be generalized to however many digits you want (thousands, millions, etc).
5
u/sevargmas Jul 24 '16
This should be one of those questions that the mods link back to alllllll the other times its been asked.
71
u/mike_mafuqqn_trout Jul 24 '16 edited Jul 24 '16
We can represent a whole number x with n places like this:
x = p0 + ( 10 )p1 + ( 102 )p2 + ... + ( 10n )pn
Where the ps represent the place values (e.g., for 142, p0 = 2, p1 = 4, p2 = 1.)
Now, if we subtract p0 + ... + pn from x, we get:
0 + ( 9 )p1 + ( 99 )p2 + ... + ( 10n - 1 )pn
Since all of the coefficients on the place values are 9 repeated k times for place value pk, we can factor out a 9, and thus the number is divisible by 9.
6
u/LovepeaceandStarTrek Jul 24 '16
Fun fact: for any base n, this trick always work to check divisibility by n-1. So in base 8, 49 is 61. 6+1=7, which is a multiple of 7; 49 is divisible by 7. In base 135, the digits of multiples of 134 add up to 134.
Funner fact: in base 10, divisibility can check by adding and subtracting alternating digits. If it adds to a multiple of 11, it's divisible by 11.
For example, consider 51,557. 5-1+5-5+7= 11. 51557 is divisible by 11.
10
u/footstuff Jul 24 '16 edited Jul 24 '16
It works because 9 is one less than the base of 10 (3 would also work as a divisor of 9). All of 1, 10, 100, etc. leave a remainder of 1 when you divide by 9. This means that both the original number and the sum of its digits have the same remainder when dividing by 9. If you subtract one from the other, that leaves a remainder of 0 and hence a multiple of 9.
Addendum: I feel I left out too many details. Read this if you want to know more. The remainder of 10/9 is obviously 1. You can easily show this extends to 102/9 and beyond. When all you care about is the remainder, you can always take the remainder first before adding/subtracting/multiplying without affecting the remainder of the result. So the remainder of 102/9 is equal to the remainder of 12/9. You can keep going with 103/9 and so on. All obviously 1.
A number written as abc is really 102a+10b+c. Using the above trick, we can reduce this to a+b+c and still get the same remainder. Since that is in fact the number we're subtracting from, we're left with (a+b+c)-(a+b+c)=0 as the final remainder.
5
u/vir4030 Jul 24 '16
So, to prove this for each number, we prove it for the first, and then each one after that, given the one before.
The first nine are easy, since the number and sum of digits are the same, and zero is a multiple of nine.
As long as the sum of the numbers and the number itself are both going up by one, the difference doesn't change. If you subtract nine from one, the difference will remain a direct multiple of nine.
When you increment a number, you add one to the rightmost digit. Where this causes a roll over from 9 to 0, you instead subtract nine from it, and add one to then next digit over. If it causes a double-roll from 99 to 00, you are subtracting nine twice and adding one. And so forth with as many rolls as you need. Either way, since subtracting nine from one digit doesn't affect the multiple of nine, we are only adding one to one digit.
So to increment any number, we add one to one digit (and maybe subtract nine from one or more) and of course by incrementing it we are adding one to the number. The difference between the two doesn't change and so it remains an exact multiple of nine.
4
u/Zairr Jul 24 '16
This also works if you take a number, say 142 and rearrange it to say, 421. The difference between these two numbers will also always be a multiple of 9.
3
u/[deleted] Jul 24 '16
haha OP. This is one of the math riddles I try to mentally solve while attempting to last longer during sex.
I also think about subtracting a multiple of nine by a lesser multiple of nine always ends up being an odd number plus two from the last one.
3
u/Minimaximizer Jul 25 '16
Let's say some number n has k digits and the ith digit is d_i. So n = sum(i=0 to k) 10i x d_i
Now if we take n minus the digit-sum:
sum(i=0 to k) 10i x d_i - sum(i=0 to k) d_i
= sum(i=0 to k) 10i x d_i - d_i
= sum(i=0 to k) d_i x (10i - 1)
we can see that every single element (10i - 1) is going to be divisible by 9.
3
u/Gwannow Jul 25 '16
Thanks so much for your explanation, I have a five year old daughter who was struggling to understand why the sum of a whole numbers places and the number itself is always a direct multiple of nine and she couldn't sleep because of it. Hopefully now she will be able to sleep since I've explained to her that In the decimal system (which is the one we use), the places of a number are how it's written as a sum of powers of ten. For example 142 = 1×102 + 4×101 + 2×100
So if we apply your operation to a number that's written "abc" (a is the first digit, b is the second digit, c is the last digit), a little algebra can show us how it works:
(a×100 + b×10 + c) - (a+b+c)
= a×100-a + b×10-b + c-c
= 99×a + 9×b
and now we divide by 9:
(99×a + 9×b) / 9 = 11a+b.
Since a and b are whole numbers, the final result will always be a whole number, so it's divisible by 9.
7
u/[deleted] Jul 24 '16 edited Jul 24 '16
Along with all the excellent answers, I'd like to chime in and offer a slightly different explanation for why this happens. The remainder when any integer power of 10 is divided by 9 is 1. Because of this, the sum of the digits of any number is its remainder when divided by 9. OP is summing the digits and getting the remainder of his number divided by 9 and then subtracting that remainder from the original number. This means the new number is divisible by 9.
Edit: Wording (I wrote multiples instead of powers of 10)
4
u/Gotu_Jayle Jul 24 '16
Omg i wasnt the only one to notice! I often look at the clock to see the numbers and then i would add them up and i noticed something similar to this.
Let's say it's 4:03. 4+3=7. Then if you add 9 to 4:03 it becomes 4:12. And guess what? 4+1+2 is 7.
Thanks for making a randomly relateable post man
2
u/kessenich Jul 24 '16 edited Jul 24 '16
Man, all this talking about numbers and nines and sevens... Need to see this visualized somehow..
edit: a friend told me in Sweden they teach students in 3 different ways: logic, visual, and something else, forgot what it was
2
u/PaleStool Jul 24 '16
Took me a while to figure out how this flash game managed always to guess the symbol I had in mind.
The solution boils down to OP's observation: Subtracting the sum of a number's digits from the same number is always a multiple of 9.
2
u/icanneverremember3 Jul 24 '16
Since we are talking about 9's I'll go a step further. I figured this out years ago while trying to go to sleep. No matter what time it is as long as it's the ninth hour the time reduces to 9. Example: 9:23 9x20=180, 9x3=27, 180+27=207, 2+0+7=9 another: 9:54 9x50=450, 9x4=36, 450+36=486, 4+8+6=18, 1+8=9
2
u/basicality Jul 24 '16
It works in other bases too
Base 12, multiple of 11:
142 in base 12 is #BA
B+#A = #19 (base 12)
BA - #19 = #A1
A1 / #B = #B (ie: 121 / 11 = 11)
2
u/Powersoutdotcom Jul 24 '16
The explanations are not "LI5" enough.
There has to be a better explanation.
For example:
When you add each digit of a number together, and subtract that from the number, it causes a another number that can be devided by 9.
This is because we use base 10 (0-9) to count, and that base is what causes it.
If we used base 12, or base 20, the end result would be divisible by 11 and 19 respectively, in base 12 or 20.
(I DON'T KNOW IF THIS IS TRUE, I JUST USED LOGIC TO FIND A SIMPLER EXPLANATION!)
2
u/taggedjc Jul 24 '16 edited Jul 24 '16
142 = 1*100 + 4*10 + 2*1
= 1*(99+1) + 4*(9+1) + 2*1
In that step, you can see that taking out the 1+4+2 results in making each other number a multiple of 9 (since 9 and 99 are both multiples of 9, and this would be true for any 10n-1). So;
= (99+1) + (36+4) + (2)
= 135 + 7
Which is 142 - 7
1
u/LastGuardianStanding Jul 24 '16
Probably for the same reason you can use your hands to do multiples of 9.
If you hold your hands out in front of you with your fingers spread all you do is drop the finger your multiplying by and that finger is the place holder separating the 10's from the 1's.
So, say you want to do 9 x 4...
Hands up, drop the 4th finger (left index) and then you see there 3 fingers to the left of the gap, and 6 to the right. So, the answer is 36, 9 x 4 = 36.
It works for all multiples of 9 for 1 thru 9.
Maybe the explanation is the same?
1
u/Initial_E Jul 25 '16
Lets start with adding 10 to 10 over and over. The result you get is 10. 20. 30. 40. etc. The sum of the places is: 1, 2, 3, 4 etc. and once you reach 100, you start over again. 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, etc. Now every time you add 10, subtract 1. you end up with the number series: 1, 1, 1, 1, etc Another change this time: start with 9 instead of 10. You now have a series of 9s. This is basically what happens when you have a multiple of 9.
1
u/MJomaa Jul 24 '16 edited Jul 24 '16
You can write a number in the decimal system as a sum like s := 1*a0 + 101 * a1 + .. + 10n * an. From 10n you basicly just subtract one (1+4+2 are all from the "category" a0) and get a coefficient that is divisible by 9 on every decimal place (0, 99, 999, ..). So just take the residue class [9] mod10 instead. [9] * something => divisible by 9 (and 3). That's all.
-1
u/Tame---Impala Jul 24 '16
Funny how people often ask these kind of mathematical questions. "If I do X and Y then Z ALWAYS happens".
Maths are made by people to understand how certain things work. A logical, systematical way of explaining things. So it's obvious that these things 'happen', it's not nature or some randomness, we MADE it this way.
-2
u/convoy465 Jul 24 '16
Because of math, if you take any written number and do that specific funtion, you will always end up having something divisible by the maximum possible value of the base integer until you get down to base 1 and here is why:
base 10:
10
10-1 = 9
Divisible by 9 which is 1 less than [base 10]
Base 9: where 10[base 9] = 9[base 10]
10
10-1 = 8
divisible by 8 which is less than [base 10] ...
Base 2: where 10[base 2] = 1[base 10]
10
10-1 = 0
There is no base 1 because every value is identical as 0, we can't compute at that level because it's too simple
0[base 1] = fuckall[base anything else]
0
0 - 1 = 0
because fuckall
It works with any almost any base number system and the answer as to WHY for an eli5 is just Because Mathtm