-4

If n is a positive integer, the integers a and b are congruent modulo n, i.e. a ≡ b (mod n), if they have the same remainder after division by n. Prove that a ≡ b (mod n) if and only if n|(a − b).

danny
  • 1

1 Answers1

0

But the exercise posed is to show that the two definitions are equivalent so the fact that one is "better" is irrelevant.

Suppose that a and b have the same remainders when divided by n. Call that common remainder "z". Then a= pn+ z for some integer p and b= qn+ z for some integer q. a- b= pn- qn= (p- q)n since "z" terms cancel so a- b= 0 (mod n).

Conversely, if a- b= 0 (mod n) then a- b= rn for some integer n. Suppose b has remainder z when divided by n. That is, b= pn+ z for some integer p. From a- b= rn, a= b+ rn= pn+ z+ rn= (p+r)n+ z. So a also has remainder z when divided by n.

user247327
  • 18,710