= Unit modulo n
For a positive <integer modulus> $n$, a <residue class> $[a]_n$ is a <unit> when it has a <modular multiplicative inverse>: some <integer> $u$ satisfies $au\equiv1\pmod n$. Modulo twelve, the <units> are exactly
$$
[1]_{12},\quad[5]_{12},\quad[7]_{12},\quad[11]_{12}.
$$
In particular, five is its own <modular inverse>, since $5\cdot5=25\equiv1\pmod{12}$. Multiplying all twelve <residue classes> by five gives a <permutation>; multiplying the outputs by five recovers the inputs. By contrast, multiplying by six gives only zero and six, with six inputs for each output. It cannot be reversed.
\Image[/modular-multiplication-units-and-zero-divisors.png]
{title=Multiplication by five permutes all twelve residue classes, whereas multiplication by six merges distinct inputs}
In general, the exact criterion is
$$
[a]_n\text{ is a unit}\iff\gcd(a,n)=1.
$$
For the forward direction, $au-kn=1$ implies every common <divisor> of $a,n$ divides one. Conversely, if their <greatest common divisor> is one, <Bézout's identity> supplies $ua+vn=1$, so $u$ is a <modular inverse>. The <extended Euclidean algorithm> computes these coefficients. The <units> form the <unit group> $(\mathbb Z/n\mathbb Z)^\times$ under <multiplication>. https://ocw.mit.edu/courses/18-200-principles-of-discrete-applied-mathematics-spring-2024/mit18_200_s24_lec15.pdf[Ankur Moitra, MIT 18.200, Lecture 15 (2024), pp. 3–4: inverses, coprimality and the unit group]{ref}
<Multiplicative cancellation> while keeping the same <integer modulus> is valid for a <unit modulo n>: from $ca\equiv cb\pmod n$, multiply by a <modular inverse> of $c$ to get $a\equiv b\pmod n$. A nonunit cannot be cancelled as a general rule. For example, $6\cdot0\equiv6\cdot2\pmod{12}$, yet $0\not\equiv2\pmod{12}$. Thus <division> by six cannot undo this <multiplication>; solving a <linear congruence> instead keeps track of all possible classes.
This distinction marks the boundary between <commutative rings> and <fields>. Modulo a <prime number> $p>1$, every nonzero <residue class> is a <unit>, so $\mathbb Z/p\mathbb Z$ is a <finite field>. Modulo twelve it is a <commutative ring> with <zero divisors>, and is not a <field>. For $n=1$, the sole class satisfies $[0]_1=[1]_1$ and is a <unit>; this one-element <zero ring> is not a <field>. https://ocw.mit.edu/courses/18-200-principles-of-discrete-applied-mathematics-spring-2024/mit18_200_s24_lec15.pdf[Moitra, MIT 18.200, Lecture 15, pp. 8–9: the prime-modulus field criterion]{ref}
Back to article page