Friday, 21 November 2025

Exercise (3.3).14

Show that the linear congruence $ax ≡ b \pmod n$ where $\gcd (a, n) = 1$ has the unique solution given by $x ≡ a^{−1}b \pmod n$.

Determine $9^{−1} \pmod {21}$.


By proposition (3.21), since $\gcd(a,n)=1$ then $a \pmod n$ has a unique inverse.

$$ aa^{-1} \equiv 1 \pmod n $$

Multiplying by $b \pmod n$ gives us

$$ aa^{-1}b \equiv b \pmod n $$

This is of the form $ax \equiv b \pmod n$ where $x \equiv a^{-1}b \pmod n$. This $x$ is a unique solution because $\gcd(a,n)=1$.


$x = 9^{-1} \pmod{21}$ would be the unique solution to the linear congruence

$$ 9x \equiv 1 \pmod {21}$$

Here $g = \gcd(21,9)=3$ and $g$ does not divide 1, and so there is no solution.

That is, $9^{-1} \pmod{21}$ does not exist. Alternatively, 9 does not have a multiplicative inverse in modulo 21.