# Prove a basic result in modular arithmetic

I’ve been taught that if $a \equiv b$ and $c \equiv d \pmod {m}$, then $a +c \equiv b+d \pmod{m}$ and $ac \equiv bd \pmod {m}$. But I would like to know how one can prove it. Can you give me a hint? Thank you.

-
See this answer for proofs of the basic rules of congruence arithmetic. – Bill Dubuque Aug 13 '14 at 19:26

If $a \equiv b$ and $c \equiv d \pmod {m}$, then there exist integers $k$ and $h$ such that $a = b + km$ and $c = d + hm$.

Whence, $$a+c = b+d + (k+h)m;$$ thus, $a +c \equiv b+d \pmod {m}$.

\begin{align} ac &= bd+dkm +bhm + khm^2 \\ & = bd + (dk + bh + khm)m;\end{align} thus, $ac \equiv bd \pmod {m}$.
• $$\\ a \equiv b \pmod m, c \equiv d \pmod m \Rightarrow m \mid a − b , m \mid c − d \Rightarrow m \mid (a-b)+(c-d) \\ \Rightarrow m \mid (a+c)-(b+d) \Rightarrow a+c \equiv (b+d) \pmod m$$
• $$\\ a \equiv b \pmod m, c \equiv d \pmod m \Rightarrow m \mid a − b, m \mid c − d \\ \Rightarrow m \mid (a − b)c + (c − d)b \Rightarrow m \mid ac − bd \Rightarrow ac \equiv bd \pmod m$$