Properties of addition and multiplication modulo $m$

488 Views Asked by At

I was studying some number theory and I came across this theorem in a book, but unfortunately there was no proof of it. Can somebody tell me the proof?

$$(a + b) \bmod m = ( (a \bmod m) + (b \bmod m) ) \bmod m$$

And also,

$$ab \bmod m = ( (a \bmod m) * (b \bmod m) ) \bmod m$$

2

There are 2 best solutions below

0
On

This is intuitively easy, but this proof might clear it up for you if you don't see it immediately.

The first equivalence can be written $$(a + b) + n_1 m = ((a + n_2m) + (b + n_3 m)) + n_4 m \hspace{1cm} \text{for some } n_1, n_2, n_3, n_4 \in \mathbb{Z}$$ The $m$ terms in the right-hand side can be distributed to $$= (a + b) + (n_2+n_3+n_4)m$$ so we can just choose $n_1 = n_2+n_3+n_4$ to make the two sides equal.

The second statement can be proved in a similar way but you have to assume that $a$, $b$, and $m$ are integers after distributing them and grouping terms by an $m$ factor.

0
On

Suppose that $a_{1}, a_{2}, b_{1}, b_{2}$ are integers such that $a_{1} \equiv a_{2} (mod m)$ and $b_{1} \equiv b_{2} (mod m)$.

Then first we will show $a_{1} + a_{2} \equiv a_{1} + b_{2} (modm)$.

Suppose $q_{1}$ and $q_{2}$ are integers.

Then suppose $a_{1} + a_{2} = mq_{1}$ and $b_{1} + b_{2} = mq_{2}$.

Then we have the following.

$(a_{1} + b_{1} ) - (a_{2} + b_{2}) = (a_{1} - a_{2} ) + (b_{1} - b_{2}) = mq_{1} + mq_{2} = m(q_{1} + q_{2})$.

Therefore $m$ divides $[(a_{1} + b_{1} ) - (a_{2} + b_{2})]$.

Thus $ a_{1}+ b_{1} \equiv a_{2} + b_{2} (mod m)$, as required.

Second, we will show $a_{1}b_{1} \equiv a_{2}b_{2}(mod m)$.

Then suppose that $a_{1} = (a_{2} + mq_{1})$ and $b_{1} = (b_{2} + mq_{2})$,

$a_{1}b_{1} = (a_{2} + mq_{1})( b_{2} + mq_{2}) = a_{2}b_{2} + a_{2}mq_{2} + mq_{1}b_{2}+m^{2}q_{1}q_{2} = a_{2}b_{2} + m(a_{2}q_{2} + q_{1}b_{2} + mq_{1}q_{2})$

Hence $a_{1}b_{1} - a_{2}b_{2} =m(a_{2}q_{2} + q_{1}b_{2} + mq_{1}q_{2})$, so that $(a_{1}b_{1} - a_{2}b_{2})$ is divisible by $m$.

Thus, $a_{1}b_{1} \equiv a_{2}b_{2}(mod m)$ as required.