3
$\begingroup$

I find I am in trouble to prove:

$(a + b) \mod n = (a \mod n + b \mod n) \mod n$ ?

Can anyone help?

$\endgroup$
3
$\begingroup$

Let $a = hn + (a \bmod n)$, $b = kn + (b \bmod n)$, $h,k\in \mathbb Z$. Then the left hand side

$$\begin{align*} (a+b)\bmod n =& [a+b-(h+k)n]\bmod n\\ =& [(hn +a\bmod n) + (kn+b\bmod n) - hn - kn]\bmod n\\ =& (a\bmod n + b\bmod n)\bmod n \end{align*}$$

$\endgroup$
  • $\begingroup$ But could you explain a little more about the last `equal' or tell me what background knowledge I need to know? Thank you! $\endgroup$ – Wei Zhong Nov 27 '13 at 2:49
  • $\begingroup$ Modified, is it clearer now? $\endgroup$ – peterwhy Nov 27 '13 at 2:53
  • $\begingroup$ OK, no need, I got it... Thank you! $\endgroup$ – Wei Zhong Nov 27 '13 at 2:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.