What is the difference between Modular Arithmetic and Modulo Operation ?

1.8k Views Asked by At

Trying to rub the dust from my math knowledge, I am trying to understand, or perhaps recall, the Modular Arithmetic and Modulo Operation but I kinda can't get what the differences are between these two is ? From Wikipedia :

This section is about the (mod n) notation. For the binary mod operation, see modulo operation.

The link here

2

There are 2 best solutions below

2
On

The modulo operation (I will use $\%$ for that here) is an operation, like addition, subtraction, multiplication and division. It is something you do to two numbers to get a result. For instance, $12\mathbin\%10 = 2$.

Modular arithmetic uses a relation, like equals, less-than and divides. It is something you do to compare two numbers. For instance, $12\equiv 2\pmod{10}$. Note that $\pmod{10}$ here is part of the $\equiv$. It might be clearer if we write something like $12\equiv_{10}2$, although that's not standard notation.

Arithmetic modulo $10$ means, somewhat simplified, "Use ${}\mathbin\%10$ on everything, all the time, before you compare them with $=$."

0
On

Modular arithmetic is a different kind of arithmetic where your operation is a modulo operation. When you look at the clockface you count modulo $12$. When we count the weeks of a year we count modulo $52$. Modular arithmetic utilizes this "wrapping around" idea, after you reached the greatest element comes the smallest. So modular arithmetic is a sort of a mindset.

A binary operation is an operation which combines two elements, for example addition is a binary operation since it combines two elements. Even when you add three things together you always do it by twos, that is $$ 3+4+5=7+5=12 $$ you always operate only on two numbers.

So to recap $(\bmod n)$ means that whenever you operate on elements so you will set the $n$th element equal to the first. And a binary modulo operation is the operation itself you use.

Hope this helps.