Moduloimisen
Moduloimisen, or modular arithmetic, is a branch of number theory that studies integers through their residues modulo a fixed positive integer n. For integers a and n with n > 0, the remainder r = a mod n is the unique integer with 0 ≤ r < n such that a ≡ r (mod n). Equivalently, a ≡ b (mod n) means n divides a−b. The set of residues modulo n forms a ring Z/nZ under addition and multiplication.
Operations are performed modulo n: (a ± b) mod n and (a × b) mod n. Congruence respects
Inverses exist with the caveat: an integer a has a multiplicative inverse modulo n if and only
Applications include cryptography (RSA and elliptic-curve cryptography rely on modular exponentiation), computer algorithms, hashing, and clock
Historically, modular arithmetic was developed in the 19th century, with significant contributions from Gauss. Today it