# Simple Number Theory Identity Regarding Subtraction

Take these two digit numbers: $$xa$$ $$yb$$

Assume $$x>y>0$$ and $$b>a>=0$$ and we are to subtract the two numbers. If for example we set, a=3 and b=6, the unit digit of this subtraction will always be 7, regardless of what x and y are. I want to know if there is an identity that can help you identify the unit digit of a subtraction or a shortcut that can help you realize the third number by simply glancing without a thought. I would really appreciate your help.

-
Maybe I'm wrong, you asked How to recognize the unit digit of the result of a subtraction right? –  Riccardo May 4 '13 at 21:15

Given the conditions for two, 2-digit numbers:

$$xa,\quad yb , \quad x> y > 0, \quad b > a \geq 0,$$

we can simply recognize that the unit's digit of the difference $\,xa - yb,\;$will be given by $$10 - (b - a) = 10 + a - b$$ But that's what we do, implicitly, when mechanically subtracting the given two digit numbers.

Put differently, we can express the unit's digit of the difference first by finding $(a - b) \pmod {10}$, which will necessarily be negative, so to find the desired positive unit's digit, we'd simply add $10$.

-
Please clarify if I misunderstood what you are asking. –  amWhy May 4 '13 at 21:22
Hi amWhy. Thank you for responding to my question. I was wondering if there was mental math type identity that could be used to identify our third digit (the unit digit) quickly. {3,6,7};{5,8,7};{4,7,7}, etc. But it seems the only way to be super quick at subtraction of 4-5 digit numbers is to memorize that {3,6,7}. –  jessica May 4 '13 at 22:10
You could use the trick above $\{3, 6, 10+3-6= 7\}, \;\{5, 8, 10+5-8 = 7\},$ etc.... –  amWhy May 4 '13 at 22:16
@amWhy: I wonder if the OP got it? +1 –  Amzoti May 5 '13 at 0:47
Not quite sure...Oh well, we can hope. ;-) –  amWhy May 5 '13 at 0:48