0

Why 134 mod -26 is equal 22?

I found an explanation, which says: 134 = (-26 * -6) - 22

However, 134 = (-26*-5)+4, so why 134 mod -26 is not equal 4

if 134=(26*5)+4 => 134 mod 26=4

All i could find, is about a situation, if i take a modulo of negative number (-134 mod 26), but that is not what i want.

J. W. Tanner
  • 60,406

1 Answers1

1

The first sentence in the post is wrong. $-136$ in not congruent to $22$ modulo $-26$. It is congruent to $-22$.

In the second sentence you had an error (now fixed). You mean $-26 \times -5$.

$4$ and $-22$ are the same answer modulo $-26$ since they differ by a multiple of $-26$.

Arithmetic modulo $m$ is essentially the same as arithmetic modulo $-m$.

Sometimes you want to require an answer that lies between $0$ and the positive value $|m|-1$, sometimes any equivalent answer will do.

If you are working with or writing a computer program to do modular arithmetic the program will make a choice - usually the representative between $0$ and $|m|-1$.

Ethan Bolker
  • 95,224
  • 7
  • 108
  • 199