The latter makes perfect sense to me, but what's the skinny with the former? I researched but couldn't understand the drift. TIA
Modulo operation: Why does -1 = 59 (mod 60), whereas 1 = 1(mod 60)?
166 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail AtThere are 6 best solutions below
On
Actually, both (-1 mod 60) ≡ 59 and (-1 mod 60) ≡ -1 are correct.
The result of modulo operation is congruence classes. [-1] and [59] are simply equal.
On
Welcome to Maths SX! I suppose you're asking why $-1\bmod 60\equiv 59$? This is is because $59+1\equiv 0\bmod 60$, so in the ring $\;\mathbf Z/60\mathbf Z$, the opposite of the congruence class of $1$ is the congruence class of $59$, by definition of the opposite of an element (i.e. its additive inverse).
On
Mod 60:
$$\begin{array} {ccc|c|ccc} \cdots & -120 & -60 & 0 & 60 & 120 & \cdots\\ \cdots & -119 & -59 & 1 & 61 & 121 & \cdots \\ \cdots & -118 & -58 & 2 & 62 & 122 & \cdots \\ & \vdots & \vdots & \vdots & \vdots & \vdots \\ \cdots &-63 & -3 & 57 & 117 & 177 & \cdots \\ \cdots &-62 & -2 & 58 & 118 & 178 & \cdots \\ \cdots &-61 & -1 & 59 & 119 & 179 & \cdots \\ \end{array}$$
All the values in the horizontal rows are treated as equal $\pmod {60}$. When you use the modulus as an operator, you typically just select the value from that middle row. E.g. $$-118 \text{ % } 60 = -58 \text{ % } 60 = 2 \text{ % } 60 = 62 \text{ % } 60 = 122 \text{ % } 60 = 2$$
On
Consider the Number line marked with integers. Now, Paste the integer $60$ over $0$ and wrap around the entire number line over the circle formed as above.
Now, we see that when we count on the above number line constructed by the above procedure, the integer $-1$ coincides with the integer $59$. This is called Modular Arithmetic.
Remarks:
$1$. The above construction can be generalized to any positive integer $n$ by replacing $60$ with $n$.
$2$. In general, while doing Modular arithmetic, we look for a solution inside the set $\{0,1,2,...,n-1\}$. But we can consider any set containing "$n$" consecutive integers.
Note: You can refer to any Elementary Number Theory Book. It will be more helpful.
This video Link might be useful for the above-said construction
I hope this answers your questions.
See here:
So
-1 % 60must return a nonnegative (the same sign as 60) integer that is less than 60 in absolute value, and is congruent to -1 modulo 60. The unique integer satisfying that is 59. If you instead did-1 % -60you would get-1.