1

I have seen a proof of the following problem, but I don't fully understand the proof.

Prove that $$a\equiv b\pmod{n}\implies r_n(a)=r_n(b),$$ where $r_n(h)$ means the remainder of $h$ in the division by $n$.

Proof. By the division algorithm, $a=qn+r_a$ and $b=cn+r_b$. Then $$a-b=qn+r_a-cn-r_b=(q-c)n+(r_a-r_b).$$ By hypothesis $a\equiv b\pmod{n}$ i.e. $n\mid a-b$, so it must be $r_a-r_b=0$ i.e. $r_a=r_b$. $\square$


My doubt is in the last part: "so it must be $r_a-r_b=0$".

Question (in red): If $n\mid a-b$ (I understand this) then there exists a $k\in\Bbb{Z}$ such that $a-b=kn$. Hence we would have: $$a-b=\;\;\;\underbrace{kn=(q-c)n}_{\color{red}{\text{How can be equal $k$ and $q-c$?}}}+(r_a-r_b).$$

manooooh
  • 2,269

2 Answers2

2

Note that both $r_a$ and $r_b$ belong to $\{0,1,\ldots,n-1\}$. Therefore,$$r_a-r_b\in\{0,\pm1,\pm2,\ldots,\pm(n-1)\}.$$But the only element of this set which is a multiple of $n$ is $0$.

1

Hint: Suppose $k$ is not $q-c$ then $(k-(q-c))n=r_a-r_b$ hence $n$ divides $r_a-r_b$ but what does the division algorithm tells you about them?

Phicar
  • 14,722