Modular Arithmetic
Mod, modular inverse, and properties
17 mod 5 · a⁻¹ such that a · a⁻¹ ≡ 1 (mod 5)
a mod m
2
Least non-negative residue, in the range 0 to m − 1
gcd(a, m)
1
Coprime
Yes — a is invertible modulo m
Modular inverse a⁻¹ (mod m)
3
a · a⁻¹ ≡ 1 (mod m)
Bézout identity
17·(-2) + 5·(7) = 1