Introduction to Modular Arithmetic (Clock Arithmetic)
Modular arithmetic is a system of arithmetic for integers, where numbers "wrap around" upon reaching a certain value called the modulus. A familiar everyday example is the 12-hour clock: if it is 9 o'clock now, then 4 hours later it is 1 o'clock instead of 13. Mathematically, we say $9 + 4 \equiv 1 \pmod{12}$. First formalized by Carl Friedrich Gauss in 1801, modular arithmetic is a cornerstone of discrete mathematics, number theory, computer science, and modern cryptography.
In modular arithmetic, we focus on the remainders of division. Two integers $a$ and $b$ are said to be congruent modulo $n$ if their difference $a - b$ is an integer multiple of $n$. This is written as $a \equiv b \pmod n$. The modulus $n$ must be a positive integer greater than 1. Modular operations behave consistently under addition, subtraction, and multiplication, which allows for simplified evaluations of extremely large numbers.
This calculator evaluates standard modular operations and solves advanced problems. It computes modular addition, subtraction, multiplication, modular exponentiation (which is vital for RSA encryption), modular multiplicative inverses, and linear congruences, visualizing the remainder on a circular modulo clock.