Remainder of sum equals sum of remainders

group-theorymodular arithmetic

This fact is obvious if I'm allowed to use modular arithmetic, but not without it.

Suppose I define $\mathbb{Z}/n$ as the set $\{0,1, \ldots, n-1\}$ with addition given by $(a,b) \to a + b$ if $a + b < n$ and $a + b – n$ otherwise. I then define a map $\varphi: \mathbb{Z} \to \mathbb{Z}/n$ sending $a$ to $a \text{ mod $n$}$, that is, I send an integer to its remainder after division by $n$. I claim this is a homomorphism of groups, but I can't prove it.

So given $a,b \in \mathbb{Z}$, $\varphi(a + b) = a + b \text{ (mod $n$)}$. If $a + b < n$ in $\mathbb{Z}$, then its remainder is $a + b$, and we're done. If not, then $a + b \text{ (mod $n$)}$ is $a + b – n$. I don't know how to proceed from here.

If I try to use the divison algorithm outright, I get $a = nq_1 + r_1$ and $b = nq_2 + r_2$ where $q_1, q_2, r_1, r_2 \in \mathbb{Z}$ are unique and $0 \leq r_1, r_2 \leq n-1$. Then
$$a + b = n(q_1 + q_2) + (r_1 + r_2).$$
But then there's a question of whether $r_1 + r_2$ is divisible by $n$, so I'm stuck again.

Best Answer

Let us denote the addition in $\mathbb{Z}_n$ by $*$. If $\varphi(a)= r_1$ and $\varphi(b) = r_2$, then as you have noticed $$a=nq_1+r_1$$ and $$b=nq_2+r_2,$$ where $0\leq r_1, r_2 \leq n-1$. From the above two, $$a+b = n(q_1+q_2) +r_1+r_2.$$ If $r_1+r_2 <n$, then $\varphi(a+b) = r_1+r_2 = r_1*r_2= \varphi(a)*\varphi(b)$.

If $r_1+r_2\geq n$, then $(r_1+r_2) -n < n$, by the conditions of $r_1$ and $r_2$. Hence, $$a+b= n(q_1+q_2+1) +(r_2+r_2-n).$$ This implies that $$ \varphi(a+b) = r_1+r_2-n = r_1*r_2= \varphi(a) * \varphi(b)$$.

Related Question