Show that if $a\equiv b\pmod m$ and $c\equiv d\pmod m$, then $ac\equiv bd\pmod m$

516 Views Asked by At

So I have shown that if $a\equiv b\pmod m$ and $c\equiv d\pmod m$, then $(a+c)\equiv (b+d)\pmod m$, but I'm sort of confused on show to prove $ac\equiv bd\pmod m$.

I have a feeling it would be the same except for multiplication instead of addition. Would that be the case?

2

There are 2 best solutions below

0
On

$$\begin{cases}a=b\pmod m\iff a=b+km\\{}\\c=d\pmod m\iff c=d+lm\end{cases}\;\;\;\;\;\implies$$$${}$$

$$ac=\color{red}{ac}+\color{green}{bc}-\color{red}{bc}+bd-\color{green}{bd}=(a-b)c+(c-d)b+bd=$$

$$=\left(kc+lb\right)m+bd\implies ac=bd\pmod m$$

0
On

To prove this, assume that $a\equiv b\pmod m$ and $c\equiv d\pmod m$. Then $a-b = xm$ and $c-d = ym$ for two integers $x$ and $y$.

We need to show that $ac-bd$ is equal to $zm$ for some integer $z$, because then $ac\equiv bd\pmod m$. There's a trick to this:

\begin{align*} ac-bd &= a(c-d) - (b-a)d\\ &= aym + xmd\\ &= m(ay+xd), \end{align*} so the integer $z=ay+xd$ works, and thus $ac\equiv bd\pmod m$.