Prove that for given any integers $a $ and $b$, $a \equiv b ~(mod ~n) $ if and only if $a$ and $b$ leave the same nonnegative remainder when divided by $n$.

Theorem: For given any integers $a $ and $b$, $a \equiv b ~(mod ~n) $ if and only if $a$ and $b$ leave the same nonnegative remainder when  divided by $n$.

Proof: Firstly, we suppose that  $a \equiv b ~(mod ~n)$ and we will show that $a$ and $b$ leave the same nonnegative remainder when divided by $n$. Since  $a \equiv b ~(mod ~n)$, we have $a = b + k \cdot n$ for some integer $k$. When we divide $b$ by $n$,  $ b$ leaves a certain remainder say $r$; that is,  $b = q \cdot n + r$, where $0 \leq r < n$. We put $b = q \cdot n + r$ in $a = b + k \cdot n$.  Therefore, $a =  b + k \cdot n = (q \cdot n + r) + k \cdot n = (q + k) \cdot n + r$ that is  $a$ has the same remainder as $b$, when we divide $a$ by $n$. 

Conversely, suppose that $a$ and $b$ leave the same nonnegative remainder when divided by $n$. So  we can write $a = q_{1} \cdot n + r$ and $b = q_2 \cdot n + r$, with the same remainder $0 \leq r < n$. Then $a - b = (q_{1} \cdot n + r) - (q_2 \cdot n + r) = (q_{1} - q_2) \cdot n $ Hence $ n ~|~ a - b$ and by the definition of congruences, we have $a \equiv b ~(mod ~n)$.

Popular posts from this blog

Definition of divisibility and Theorem on divisibility

The Division Algorithm / Prove that given integers $a$ and $b$, with $b > ~ 0$, there exist unique integers $q$ and $r$ such that $a = b \cdot q +r$, where $0 \leq r < b$. The integer $q$ is called the $\textbf{quotient}$ and the integer $r$ is called $\textbf{remainder}$.

Define Greatest Common Divisor and Prove that if $a$ and $b$ are any integers, not both of them are zero. Then there exist integers $x$ and $y$ such that $gcd(a, b) =a \cdot x + b \cdot y$.