If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

## Class 6 math (India)

### Unit 3: Lesson 3

Tests for divisibility

# The why of the 3 divisibility rule

Why you can add the digits to see if something is divisible by 3. Created by Sal Khan.

## Want to join the conversation?

• Why doesn't this work with other numbers? Why can't I add all the digits to see if it's divisible by 4? •   It will only work with numbers that are factors of 9 (i.e. 3 and 9). The reason is that every time you go above 10, you increase the value in the tens column by 1, and decrease the value of the units by 10. The net result is that the sum of the digits decreases by 9. So it works with 3, because when you get to 12, the sum of the digits is 12-9 or 3 (which is divisible by 3). But it doesn't work with 4 because when you get to 12, you subtract 9, which isn't a multiple of 4.

However this does means that if you were to use base 9, you would be able to use this trick on numbers divisible by 8 (i.e. 2, 4 and 8). If you use base 16, the trick works for factors of 15 (i.e. 3, 5 and 15).

Hope that makes some sense.
• Are there any other "tricks" for numbers other than three? •   To test divisibility by 2, the last digit must be even.
To test divisibility by 3, the sum of the digits must be a multiple of 3
TTDB 4, the last two digits must be a multiple of 4 OR the last two digits are 00.
TTDB 5, the last digit must be either a 5 OR 0.
TTDB 6, the sum of the digits must be a multiple of 3.
TTDB 7, take the last digit and double it. Then subtract your answer from the sum of the other digits. If this new answer is a multiple of 7, then the original number must be also.
TTDB 8, the last 3 digits must be either 000 OR a multiple of 8.
TTDB 9, check if the sum of the digits is a multiple of 9.
For 10, it must end with a 0.

To acknowledge everyone's posts below, TTDB N, the number must divide evenly by all of N's factors.
• Is there a divisibility rule for 7? It's the only number which stumps me. •  me again i looked it up and OMG it's confusing i hope you'll understand it :) here goes nothing let's see if the number 60172 is divisable by 7, you 'delete' the 1st digte. 60172->6017 got it? then multiply the number you just deleted( the number 2) by 2 then subtract it from the number you got(the number 6017) we're on the same page yes? ok so 6017-4 rite? =6013 you repete the process untill you get to a 2digte or 1 digte number. 6013->601 then subration 601-3x2(6)= 595
• • Is this principle the same for 6 and 9, i.e. multiples of 3? • This rule only works for 3 and 9.

For a number to be divisible by nine, you can do the same thing, and add up all the digits and see if that number is divisible by 9
• Does the trick for three and nine work for eighty-one? Since nine is a factor of eighty-one. • Sal confused me when he said 9x9. I know he didn't mean to say that but it confused me so is there someone who can explain it to me? • This may be a proof of the divisibility rule for 3.
Given a number written in standard notation as xyz, where x,y, and z are integers, and xyz is actually 100x+10y+(1)z, prove that if (x+y+z)mod 3 = 0 (which means it is divisible by 3), then (xyz)mod 3 = 0.

1) if (x+y+z) mod 3 = 0 then (xyz) mod 3 = 0 (=> what we're trying to prove)
2) if (x+y+z) mod 3 = 0 then (100x+10y+z) mod 3 = 0 (=> rewrite (xyz) as 100x+10y+z).
3) If (x+y+z) mod 3 = 0 then [(100x mod 3)+ (10y mod 3) + (1)z mod 3]mod 3 = 0. (=> rewrite using the distributive property of modulo, which states that - (a+b)mod n = [(a mod n) + (b mod n)]mod n).
4) If (x + y + z) mod 3 = 0, then [(100 mod 3)(x mod 3)+(10 mod 3)(y mod 3)+ (1 mod 3)(z mod 3]mod 3 = 0 (=> use the distributive property of modulo, which states that - a*b mod n = [(a mod n)*(b mod n)]mod n
5) We know 100 mod 3 is 1, and 10 mod 3 is 1, and 1 mod 3 is 1 so we reduce the above to -
If (x+y+z)mod 3 = 0, then [(1)x mod 3 + (1)y mod 3 + (1)z mod 3]mod 3 = 0.
6) We use the reverse of the distributive property of modulo, which is that [a mod n + b mod n]mod n = (a+b) mod n to write:
If (x+y+z)mod 3 = 0, then (x+y+z)mod 3 = 0.

VOILA! What this means is that it doesn't have to be just evenly divisible. This means that any remainder of a number of the form xyz divided by 3 will be equal to the remainder of the sum of of x + y + z by 3.

This can be applied to divisibility rules for 2, 9, 4, etc.

For 2:

For a number of the form xyz, where xyz = 100x+10y+z, prove that if z mod 2 = 0 then xyz mod 2 = 0. I'm just going to go through the right hand side if the conditional statement:
1) (100x+10y+z)mod 2 = 0
2) [(100x mod 2)+(10y mod 2) + z mod 2]mod 2 = 0 (distributive property of modulo)
3) {[(100 mod 2)(x mod 2)](mod 2)+[(10 mod 2)(y mod 2)](mod 2)+ z mod 2}mod 2 = 0
4) We know 100 mod 2 = 0, 10 mod 2 = 0 and so we get:
{[(0)(x mod 2)]mod 2 + [(0)(y mod 2)]mod 2 + z mod 2}mod 2 = 0.
5) {(0)mod 2 + (0)mod 2 + z mod 2}mod 2 = 0.
We know 0 mod 2 = 0, so we get:
6) (0 + 0 + z mod 2)mod 2 = 0.
7) (z mod 2)mod 2 = 0
We just showed that (xyz)mod 2 = 0 is the same as (z mod 2)mod 2 = 0.

Now if we assume the expression in the if statement, that if z mod 2 = 0, then that statement becomes
(0)mod 2 = 0, and since 0 mod 2 = 0, we just proved that the divisibility rule for 2 is true.

WOOOOHOOO!

This is amazing. Khan Academy just makes math beautiful and so much fun.   