Negative Value in Modular Arithmetic

829 Views Asked by At

How can $ -2 \mod 26 = 24$? I can not understand it properly.

In my view point:

-2 mod 26 = .7.What is totally wrong. the real out put is 24, but how can anybody explain it clearly?

3

There are 3 best solutions below

0
On BEST ANSWER

If you have an analog clock, there are $12$ numbers on it. If there are $2$ more hours before you reach $12$, what is the time now? $$12-2=10.$$

Now let's travel to another planet, there are $26$ numbers on it. There are $2$ more hours before you reach $26$, what is the time now? $$26-2=24.$$

Rather than going clockwise, go anti-clockwise for negative number.

0
On

Definition. Let $n$ be a positive integer. Let $a, b$ be integers. Then $a$ and $b$ are said to be congruent modulo $n$, denoted $a \equiv b \pmod{n}$, if and only if $a - b = kn$ for some $k \in \mathbb{Z}$.

Since $-2 - 24 = -26 = (-1)26$, we obtain $-2 \equiv 24 \pmod{26}$.

0
On

Well, $26 - 2 = 24$. The numbers of the form $26m - 2$ are $$\ldots, -106, -80, -54, -28, -2, 24, 50, 76, 102, \ldots$$

So $-2 \bmod 26$ means a number that is 2 to the "left" of a multiple of 26, or 24 to the "right" of a multiple of 26.

Happy Friday the 26th.