0

With modular definition in mind that two integers $a,b \in \mathbb{Z}$, are congruent module $m$ meaning that $a\equiv b \pmod{m}$, where $m$ is a positive integer.

Details:

  • $x \equiv y \pmod{m}$ is by definition equivalent to $m|(x−y)$.
  • $x \equiv y \pmod{m}$ , $x,y\in \mathbb{Z}, m \in \mathbb{Z^+}$ iff $a \pmod {m} = b \pmod{m}$.
  • if $a | b$ and $a|c$, then $a|(b+c)$.
  • if $a | b$ and $b|c$, then $a|c$.
  • if $a | b$ then $a|bc$, for all integers $c$.

Question: Show that $ab \pmod{m} = ((a \pmod{m} )(b \pmod{m})) \mod m.$

Avv
  • 1,199
  • 3
    The "$\mod m$" is part of the $\equiv$ notation, not a numeric operation, so it doesn't make sense inside numeric expressions. The right way to state the desired property is: If $a'\equiv a\pmod m$ and $b'\equiv b\pmod m$ then $ab\equiv a'b'\pmod m$. – Karl Mar 15 '21 at 03:47
  • 1
    Remember that $x\equiv y\pmod m$ is by definition equivalent to $m|(x-y)$. – Karl Mar 15 '21 at 03:53
  • 1
    To answer objections, you might want to provide a definition of $a \bmod m.$ – David K Mar 15 '21 at 04:32
  • 2
    Notation: use ab\bmod m $\color{blue}{ab\bmod m}$ for $\bmod$ as a binary operation, and a\equiv b\pmod{m} $\color{blue}{a\equiv b\pmod{m}}$ for modular congruences; \mod uses too much space. – metamorphy Mar 15 '21 at 13:37
  • 1
    Please search first to avoid posting duplicate questions. – Bill Dubuque Mar 17 '21 at 18:04
  • @BillDubuque. Thank you. I always make sure to check similar questions first before posting them. I did not see that in similar questions list. – Avv Mar 18 '21 at 00:42

3 Answers3

2

Suppose $a = mq + r, b = mq' + r':$

So $ a \mod m = r$ and $b \mod m = r'$

$ab = mq(mq') + rmq' +r'(mq) + rr'$

All terms are multiples of $m$ except perhaps $rr'$ So to get modulo $m$ of $ab$, you simply get modulo $m$ of $rr'$.

Hence $ab \mod m = rr' \mod m $ and $rr' = (a \mod m)(b \mod m)$ , yielding the result.

  • When I was still programming $-2\bmod 3$ was different from $1\bmod 3$, so a difference of a multiple of $m$ does not guarantee that the results of the $\bmod m$ operation would be equal. Anyway, programmers binary mod (instead of congruence), while necessary in programs, is a source of confusion on math forums. – Jyrki Lahtonen Mar 15 '21 at 09:22
  • @JyrkiLahtonen The "standard" way of addressing that is to say that % is the remainder operator, not the modulus operator, and that the remainder operator works differently for negative values. – DanielV Mar 15 '21 at 09:31
  • @JyrkiLahtonen Sad to see you also denigrating normal forms ("programmers binary mod"). Many mathematicians also use mod and normal forms. There is nothing at all wrong with doing computation (in fact it always was - and still is - the source of insight for much of the development of mathematics) – Bill Dubuque Mar 18 '21 at 05:44
  • @Bill May be you have noticed that I have a hard time letting go of old grudges? Here the source of my irritation is mostly due to the fact that many programmers are ignorant about congruences. When working in the industry I did not enjoy the experience of engineers lecturing to me that You need to add one more $\bmod m$ to the end when I was trying to communicate a cyclically repeating pattern using a congruence. And I'm sure you are aware of the fact that some CASs and processors give negative remainders. For well documented reasons. So what is a normal form here? – Jyrki Lahtonen Mar 18 '21 at 06:00
1

What you want to show is that you can multiply by representatives thus showing that the relation $a\equiv b\pmod {m}$ is a congruence relation. So following @Karl's comment suppose that $a\equiv a'\pmod m$ and $b\equiv b'\pmod m$, i.e. $m|a-a'$ and $m|b-b'$, then $$ab-a'b'=(a-a')b'+a(b-b')$$ and since $a-a',b-b'$are divisble by $m$ it follows that $ab-a'b'$ is divisble by $m$ and thus $$ab\equiv a'b'\pmod m.$$

Peter Melech
  • 4,470
  • Thank you. Can you add more details to show that $ab \pmod{m} = ((a \pmod{m} )(b \pmod{m})) \mod m.$ The last statement in the answer is not exactly the same as the one in the question. – Avv Mar 15 '21 at 15:20
  • 1
    You´re welcome. This is what Karl ment in his comment, if $ab\mod m=(a\mod m)(b\mod m)$ makes sense it is that you can define the multiplication by representatives and thus that it does not depend on the choice of representatives, that is exactly what is shown above – Peter Melech Mar 15 '21 at 19:01
  • Thank you again. Is there theorem or prove or it's just logical? – Avv Mar 15 '21 at 21:00
  • 1
    It´s a logical proof for the fact that $.\equiv .\pmod{m}$ is a congruence relation. – Peter Melech Mar 16 '21 at 13:07
  • Please strive not to add more dupe answers to dupes of FAQs. – Bill Dubuque Mar 17 '21 at 18:04
0

Let $x, y \in \mathbb{Z}_n$ and $l,k \in \mathbb{Z}$.

Further let \begin{align*} a &\equiv x \mod n \implies a = ln +_n x \\ b &\equiv y \mod n \implies b = kn +_n y \end{align*}

If we now multiply $a\cdot b$ we get:

\begin{align*} a\cdot b &= (ln +x)(kn +y) \\ &=lkn^2 +lny +kxn + xy \\ &= lkn^2 +n(ly +kx) +xy \equiv x\cdot y \mod n \end{align*}

Algebruh
  • 612