# Show the rule of divisibility for 9

The rule of divisibility for 9 says that if a number is divisible by 9, the sum of all digits of the number is divisible by 9.

For example, 19341, the digits on all places of the number are 1, 9, 3, 4, 1. The sum of all digits are 1+9+3+4+1 = 18, which is divisible by 9. And the division of this number by 9 shows it is divisible by 9.

Then how to prove this rule is true for all numbers

First, let's have an observation on place values of tens place. 10 is 1 more than a number that is divisible by 9. 20 is 2 more than a number that is divisible by 9. And so on ... The remainders after division by 9 are 1, 2 ... (in the 3rd column) which are the same as the digits on the place(in the 1st column of the table below).

Second, let's observe the place values of hundreds place, which could be transformed to the sum of a number that is divisible by 9 and a place value of tens place. Division of the tens place by 9 gives the remainders that are equal to the digits on the hundreds place.

Repeating the process on place values of thousands place, or more reviews the same rule. Division of place values by 9 give remainders that are the same as the digits on the places.

Next, let’s evaluate a 4-digit number that is denoted as \overline{abcd}, in which a, b, c, d are four digits on thousands, hundreds, tens and ones places respectively. Since a number can be expressed as the sum of its place values, \overline{abcd} is rewritten as

For place value on tens place,

For the place value on hundreds place,

where the first part 90b+9b is divisible by 9. And the remainder is b

For the place value on thousands place,

where the first part 900a+90a+9a is divisible by 91 and the remainder is a.

Substituting (2),(3) and (4) into (1) gives

\begin{aligned} \overline{abcd}&=[(900a+90a+9a)+(90b+9b)+ 9c]+a+b+c+d \end{aligned}

which shows the divisibility of the number by 9 is dependent on the sum of digits on all places of the number. If the sum is divisible by 9, the number is divisible by 9.

In a more general form, an integer can be expressed as

a=a_{n}10^{n}+a_{n-1}10^{n-1}+\dots+a_210^2+a_{1}10^1+a_0

The observation above reviews

and further,

where k = 1, 2,3,4 ...

Then,

\begin{aligned} a &\equiv a_{n}10^{n}+a_{n-1}10^{n-1}+\dots+a_210^2+a_{1}10^1+a_0 \quad(\text{mod } 9) \\ &\equiv a_{n}+a_{n-1}+\dots+a_2+a_1+a_0 \quad (\text{mod } 9) \\ \end{aligned}

Therefore, the number a is divisible by 9 if and only if the sum of digits on the all places of the number is divisible by 9.