Modulo Reduction

From #Modular Arithmetic, \(b\) is a residue of \(a \mod n\) as it could be written in \(a = qn + b\). Finding the next in line residue is by choosing the smallest positive remainder from the equation as residue. Such process is similar to the following example:

$$ -12 \mod 7 \equiv -5 \mod 7 \equiv 2 \mod 7 \equiv 9 \mod 7 $$

You will notice that from the above example, the next in line residue could be found by \(a - n\) (in this case, \(9 - 7\), which become \(2\)) or \(a + n\) (\(-12 + 7 = 5\)).

Links to this page
  • Modular Arithmetic

    We could get the next in line congruent residue by Modulo Reduction#. Based on this, we could do addition and multiplication, then modulo reduce the answer when doing Modular Arithmetic with any group of integers (that is Set# \(\mathbb{Z}_n = \{ 0, 1, \ldots, n - 1 \}\)). Additionally, the largest number in Modular Arithmetic (take note on doing addition and multiplication) would be \(n -1\) as it is a clock arithmetic. There are some properties of Modular Arithmetic that need to take note:

#math