WWikiLLemmasA residue class is a unit exactly when its representative is coprime to n
Lemma·L78
A residue class is invertible modulo n exactly when its representative is coprime to n.
In words
The class of a is a unit modulo n exactly when a and n are coprime: they share no common factor beyond 1.
Never needed: F10 · A03 · A04 · A05 · A07 · A09 (computed from the citation graph, not asserted).
Proof
- 1Coprime implies unit. Suppose . As , the pair is not both , so T25 gives with .
- 2
- 3
- 4
- 5
∎
Remarks
This identifies
with the classes of residues coprime to
, the bridge between the ring structure and number theory. The forward direction is the source of modular inverses: the extended Euclidean algorithm computes the inverse
. When
is prime, every
with
satisfies
(a prime's only divisors are
and
, D031), so every nonzero class is a unit, which is exactly why
is a field. Counting the coprime residues gives Euler's totient
.