Skip to main content
calcu
.lol
Search
Ctrl K
Language
EN
English
English
EN
简体中文
ZH
Español
ES
العربية
AR
Português (Brasil)
PT
日本語
JA
Français
FR
Deutsch
DE
Home
›
Math & Algebra
›
Modular Arithmetic
Modular Arithmetic
Mod, modular inverse, and properties
Favorite
Print
Integer a
Modulus m
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
Copy link
Modular Arithmetic
A clock face with m evenly spaced positions. Counting a steps around the clock lands on the highlighted residue position a mod m.
0
1
2
3
4
17 mod 5 =
2