Strange sum that always end up with 9 If we have any number, example 4896, and sum all digits
sum = 4+8+9+6 = 27
and than substract this number from the original number, we always get a number that is divisible by 9:
4896-27=4869 -> 4869/9 = 541.
Moreover now everytime i sum the digits from new number (4869), i will get number divisible by 9:
(4+8+6+9=27[divisible])
71 - (7+1) = 63
485 - (4+8+5) = 468/9=52 , 4+6+8 = 18(divisible)

Similarly interesting is with 2 digit numbers where with the same process resulting number is always 9
45 -> 45-9 = 36 (3+6=9)
87 -> 87-15 = 72 (7+2=9)
Its quite beyond my comprehension. Can anyone explain this phenomena?
 A: This is the standard divisibility test for $9$.  It is also called "casting out 9s".  The remainder on dividing by $9$ is the same as the remainder on dividing the sum of the digits by $9$.  It works because $10^n$ always has a remainder of $1$ when dividing by $9$ because, for example, $ 100000=99999+1$
A: This is very well known:
Consider that the number is $N= \sum_{k=0}^n a_i 10^k$ where $a_i$ are the digits. Digits.  Then the sum of the digits is $S = \sum_{k=0}^n a_i$.
Then $N - S = \sum_{k=0}^n a_i(10^k -1)$.
Now each of the $10^k-1$ is $99999.......9$ which is divisible by $9$.  So the whole number $N-S$ is divisible by $9$.
(Note the last digit, $a_0$ is simply subtracted.  You can think of it as $a_0 - a_0 = a_0*10^0 - a_0 = a_0(10^0 - 1) = a_0(1 - 1) = a_0*0 = 0$.)
....
As a result, a number is divisible by $9$ if and only if the sum of its digits are divisible by $9$ so that gives you your second result.
It also helps us realize if we take a number and divide by $9$ and take the remainder, then the remainder will be the same as the remainder taking the sum of the digits and dividing by $9$ and taking the remainder.
A: I will give a formal proof for numbers with $4$ digits. You can think about how to generalize it (Edit: or refer to @fleablood's answer who gave a formal proof for arbitrarily many digits).
Let $n=abcd$ be a number where $0\leq a,b,c,d\leq 9$ are it's digits. For example if $n=4821$ then $a=4,b=8,c=2,d=1$.
Another way to write $n$ is as $n=a\cdot 1000 + b\cdot 100 +c \cdot 10 +d$.
On the other hand the sum of digits is $a+b+c+d$.
so $$n - \text{The sum of digits} = a\cdot 1000 + b\cdot 100 + c\cdot 10 + d -a-b-c-d$$
The right hand side turns out to be $a\cdot 999 + b\cdot 99 + c\cdot 9$ which is divisible by $9$.
The second thing that interested you is that the sum of digits of the new number is always divisible by $9$. For this you should refer to @Ross Milikan answer.
A: To answer just the part about 2-digit numbers:
Other answers have explained why the result of subtracting the digits of a number $n$ from $n$ is always divisible by $9$ and that if a number is divisible by $9$, so is the sum of its digits.
If $n$ only has two digits, it can't be bigger than $99$. So when you subtract its digits, you get something that's (i) less than $99$, and (ii) divisible by $9$. The only possibilities are $9$, $18$, $27$, $36$, $45$, $54$, $63$, $72$ and $81$.
Now, why do their digits always sum to 9? Two ways of looking at it:
First way: The biggest sum you can get from adding two digits is $18$, when  both digits are $9$. But that needs the result of your first step to be $99$, which we've said it can't be. But we know it's a multiple of $9$, meaning its digits add up to a multiple of $9$. Since they can't add up to $18$, the only available multiple of $9$ is $9$.
Second way: How do you get from, say, $18$ to $27$? To add $9$ you can add $10$, which increases the first digit by $1$, then subtract $1$, which reduces the second digit by $1$. When you add the digits, the two changes cancel out and the digits still sum to $9$. Thinking of $9$ as $09$, this works all the way up from $9$ to $90$ and only goes wrong when you get to $99$—which is too big to be one of the options so the sum is always $9$.
