-2

Consider $u$ and $v$ are integers. The $\cdot$ is the usual multiplcation.

It seems that $$((u \mod N) \cdot (v \mod N) )\overset{?}{=}(u \cdot v) \mod N,$$ is not always true. For example, on the LHS, $$((2 \mod 6) \cdot (3 \mod 6) )=6 $$ on the RHS $$(2 \cdot 3) \mod 6=0,$$ so they are no equal.

Can we prove that $$((u \mod N) \cdot (v \mod N) ) \mod N=(u \cdot v) \mod N?$$

Bill Dubuque
  • 282,220
  • related https://math.stackexchange.com/questions/1996607/prove-that-xy-text-mod-n-x-text-mod-ny-text-mod-n-text – annie marie cœur Oct 07 '18 at 18:40
  • Wait if u is 2 and v is 3, then u mod 6 = 2 and v mod 6 is 3 which implies that 23 mod 6 = 0, which is the same as (v mod 6)(u mod 6) mod 6. So your counter example is not contrary. – TrostAft Oct 07 '18 at 18:41
  • Um... $6\equiv 0 \mod 6$ so they are "equal". – fleablood Oct 07 '18 at 18:47
  • 1
    Mod is not the remainder operation. And it it no suprise that for the remainder operation (%) that if a%n=c and b%n=d and c*d > n, that we get (a%n)(b%)!=(ab)%n. But clearly [(a%n)(b%n)]%n=(ab)%n. But again, mod is NOT the remainder operation. It is an equivalence relation. – fleablood Oct 07 '18 at 18:57

1 Answers1

1

$\mod n $ is not the remainder operator nor any operation. $a\mod n $ is not a number and it is incorrect to say $14 \mod 8=6$.

It is an equivalent relationship. The correct statements, all of the following $6\equiv 14 (\mod 8)$ and $14\equiv 6(\mod 8) $ and $14\equiv 22(\mod 8) $ aren't numbers. They are statements that the numbers $6,14$ and $22$ are eqivalent when it comes to arithmetic modulo $8$. That is $6,14,22$ all have the same remainder. We don't care about finding the remainder. We only care about stating if two numbers are equivalent under this relation.

It's easy to verify/test/prove that if $a\equiv a'(\mod n) $ and $b\equiv b'(\mod n)$ then $ab\equiv a'b'\pmod n$.

In your example $2\times 3=6$ and $6\equiv 0 \pmod 6$ so all is just fine.

That the actual remainder operation isn't distributive is no surprise as the product of remainders can always be larger than the divisor. That's immaterial. We don't care about the remainder operator. And the remainder of the products of the remainders IS equal to the remainder of the products, anyway.

fleablood
  • 130,341