# Show the rule of divisibility for 11

The rule of divisibility for 11 says that if a number is divisible by 11, the difference of the sum of all digits on even places of the number and the sum of all digits on odd places is zero or divisible by 11.

For example, \text{\color{red}9}\text{\color{blue}3}\text{\color{red}8}\text{\color{blue}1}\text{\color{red}4}\text{\color{blue}6}, the digits on even places are 9, 8,4 in red, the digits on odd places are 3, 1,6. The sum of all digits on even places are 9+8+4 = 21. The sum of all digits on odd places are 3+1+6 = 10. Their difference is 11, which is divisible by 11. And the division of this number by 11 shows it is divisible by 11.

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 deficient to a number that is divisible by 11. 20 is 2 deficient to a number that is divisible by 11. And so on ... The remainders after division by 11 are -1, -2 ... (in the 3rd column) which are the opposite numbers of 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 difference of a number that is divisible by 11 and a place value of tens place. Substituting the results about tens place 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. For even places, the remainders are the opposite numbers of the digits on the place and for odd places, the remainders are the same as the digits on the place, if divided by 11.

Next, let’s first 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 110b-11b is divisible by 11. And the remainder is b

For the place value on thousands place,

where the first part 1100a-110a+11a is divisible by 11 and the remainder is -a.

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

\begin{aligned} \overline{abcd}&=[(1100a-110a+11a)+(110b-11b)+ 11c]-a+b-c+d \end{aligned}

which shows the divisibility of the number by 11 is dependent on the difference of the sums of alternating places. If the difference is divisible by 11 or equal to 0, the number is divisible by 11.

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

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

The observation above reviews

and further,

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

If k=2n,

if k =2n-1

Then,

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

Therefore, a is divisible by 11 if and only if the difference of the sums of digits on the even places and odd places is zero or divisible by 11.