The difference between any two numbers formed by rearranging the same set of digits is always divisible by 9. Here's the thing — this fascinating arithmetic property often surprises students and math enthusiasts alike, revealing a hidden structure within our base-10 number system. Whether you are comparing 4321 and 1234, or 98765 and 56789, the result of the subtraction will always be a multiple of 9. Understanding why this happens requires a look at place value, modular arithmetic, and the concept of the digital root, offering a deeper appreciation for the elegance of mathematics The details matter here..
The Core Rule: Permutations and Divisibility
At the heart of this phenomenon lies the fact that the value of a digit depends entirely on its position, or place value. In the decimal system, moving a digit one place to the left multiplies its value by 10, while moving it right divides by 10. When we rearrange digits to form a new number, we are essentially changing the multipliers (powers of 10) attached to each digit Worth keeping that in mind..
Consider a number with digits $d_n, d_{n-1}, \dots, d_1, d_0$. Its mathematical representation is: $N = d_n \times 10^n + d_{n-1} \times 10^{n-1} + \dots + d_1 \times 10^1 + d_0 \times 10^0$
If we create a permutation of these digits, call it $M$, the digits remain the same set ${d_n, \dots, d_0}$, but they are attached to different powers of 10. Since every term contains a factor of $(10^a - 10^b)$, and since $10^k \equiv 1 \pmod 9$ for any integer $k$, every term is divisible by 9. Now, the difference $N - M$ becomes a sum of terms like $d_i(10^a - 10^b)$. So naturally, the entire difference is divisible by 9 Not complicated — just consistent..
Understanding Through Modular Arithmetic
For those comfortable with congruences, the proof is remarkably concise. So in modulo 9 arithmetic, the number 10 is congruent to 1 ($10 \equiv 1 \pmod 9$). Because of this, any power of 10 is also congruent to 1 ($10^k \equiv 1^k \equiv 1 \pmod 9$) Most people skip this — try not to..
Let the original number be $N = \sum d_i 10^i$ and the rearranged number be $M = \sum d_i 10^{\sigma(i)}$, where $\sigma$ represents the permutation of positions. $N \equiv \sum d_i (1) \equiv \text{Sum of Digits} \pmod 9$ $M \equiv \sum d_i (1) \equiv \text{Sum of Digits} \pmod 9$
Since both $N$ and $M$ leave the same remainder when divided by 9 (specifically, the remainder of their digit sum), their difference $N - M$ must leave a remainder of 0. Thus, $N - M \equiv 0 \pmod 9$, proving the difference is a multiple of 9 That's the part that actually makes a difference..
Quick note before moving on And that's really what it comes down to..
The Role of the Digital Root
This property is inextricably linked to the concept of the digital root. Practically speaking, the digital root of a non-zero number is the single-digit value obtained by iteratively summing the digits until a single digit remains. To give you an idea, the digital root of 456 is $4+5+6=15 \rightarrow 1+5=6$.
A crucial theorem states that a number and the sum of its digits are congruent modulo 9. Because rearranging digits does not change the sum of the digits, the digital root of the original number and the rearranged number are identical.
- Original Number: 8,352 $\rightarrow$ Sum = 18 $\rightarrow$ Digital Root = 9
- Rearranged: 2,358 $\rightarrow$ Sum = 18 $\rightarrow$ Digital Root = 9
- Difference: $8,352 - 2,358 = 5,994$
- Check: $5,994 \div 9 = 666$. The digital root of 5,994 is $5+9+9+4=27 \rightarrow 2+7=9$.
Since both numbers share the same digital root, their difference must have a digital root of 9 (or 0, which is equivalent to 9 in this context for non-zero differences), confirming divisibility by 9.
Practical Examples and Verification
Let us test this rule with various scenarios to solidify the understanding.
Example 1: Two-Digit Numbers (The Classic Reversal)
Take the number 73. Reverse the digits to get 37. Difference: $73 - 37 = 36$. $36 \div 9 = 4$. Divisible by 9.
Algebraically, a two-digit number is $10a + b$. Its reversal is $10b + a$. Difference $= (10a + b) - (10b + a) = 9a - 9b = 9(a - b)$. The factor of 9 is explicit Simple, but easy to overlook. Still holds up..
Example 2: Three-Digit Numbers (Non-Reversal Permutation)
Original: 481. Permutation: 814. Difference: $814 - 481 = 333$. $333 \div 9 = 37$. Divisible by 9.
Example 3: Large Numbers with Repeated Digits
Original: 1,122,334. Permutation: 4,332,211. Difference: $4,332,211 - 1,122,334 = 3,209,877$. Sum of digits of difference: $3+2+0+9+8+7+7 = 36 \rightarrow 3+6=9$. $3,209,877 \div 9 = 356,653$. Divisible by 9.
Example 4: Including Zero as a Digit
Original: 5,040. Permutation: 4,500. Difference: $5,040 - 4,500 = 540$. $540 \div 9 = 60$. Divisible by 9. Note: Leading zeros are typically dropped in standard notation (e.g., 0450 becomes 450), but the property holds because the place value of the zero digit contributes nothing to the sum regardless of position.
Why This Fails for Divisibility by 3 (And Succeeds)
A common point of confusion arises with divisibility by 3. Since 9 is a multiple of 3, any number divisible by 9 is automatically divisible by 3. Because of this, the difference of two permutations is also always divisible by 3 Simple, but easy to overlook..
Still, the reverse is not a special property of permutations. On the flip side, the sum of digits determines divisibility by 3 just as it does for 9. Which means because the digit sum is invariant under permutation, both numbers have the same remainder modulo 3. Thus, the difference is a multiple of 3. The "magic" of 9 is simply that it is the base minus one ($10 - 1$), making the congruence $10 \equiv 1 \pmod 9$ the tightest non-trivial constraint in base 10 Nothing fancy..