[Math] Every integer is congruent modulo $m$ to exactly one integer in $\{0, 1, …, m-1\}$

number theory

Show that every integer is congruent modulo $m$ to exactly one of the numbers in the set $\{0, 1, …, m-1\}$.

I tried this:

Apply the division algorithm – then $n = q \cdot m+r$ where $q, r$ are integers and $0 \le r < m$. In other words, $n$ is congruent (mod $m$) to $r$, and $r$ is in that set.

Suppose there are two integers in the set, $r$ and $s$, both of which are congruent (mod $m$) to $n$. Then $r$ is congruent (mod $m$) to $s$, so either $r-s$ or $s-r$ is a non negative multiple of $m$, less than $m$, so it must be 0.

$$r-s = 0 \qquad \text{ or }\qquad s-r = 0$$

Either way $s = r$.


The problem is:

We know that if $n \ge 0$, then $n$ is congruent mod $m$ to a number $r$ with $0 \le r < m$ by the division theorem. For an integer $a < 0$, find some multiple $k$ of $m$ so that $a + mk > 0$. Then by the division theorem, $a + mk = mq + r$ with $0 \le r < m$. Then $a = r \pmod m$.

Best Answer

There is no problem. You have given a complete proof.

But for the sake of making this answer more useful, let's provide a second proof. We want to show that every integer is congruent modulo $m$ to exactly one of the numbers in the set $\{0,1,...,m−1\}$.

Let's suppose that there is an integer $x$ that is congruent to both $a,b \mod m$. So $x \equiv a \mod m$ and $x \equiv b \mod m$. Subtracting one from the other yields

$$0 \equiv b - a \mod m$$

or rather that

$$b \equiv a \mod m.$$

This means that $x$ wasn't congruent to two different numbers mod $m$ at all.

Related Question