Find which numbers, $0$ to $20$ have a multiplicative inverses$\mod20$ ?
I know how to find the multiplicative inverse of a number ($\mod x$ ) but am not sure how to do this.
Thanks!
Find which numbers, $0$ to $20$ have a multiplicative inverses$\mod20$ ?
I know how to find the multiplicative inverse of a number ($\mod x$ ) but am not sure how to do this.
Thanks!
A number $n$ has a multiplicative inverse $\mod p$ if and only if $\text{gcd}(n,p) = 1$ (do you know why?). So we can check the elements in the set $\{0,1,2, \ldots, 19\}$ if they have greatest common divisor $1$ with $20$. Doing so, we find that $\{1, 3, 7, 9, 11, 13, 17, 19\}$ are the set of numbers having a multiplicative inverse.
$\textbf{EDIT}$: The reason why a number $n$ only has a multiplicative inverse $\mod p$ if and only if $\text{gcd}(n,p) = 1$ is the following:
If $n$ has a multiplicative inverse $\mod p$, this means that there exists $s, k \in \mathbb{Z}$ such that $sn = 1 + kp$. This implies that $sn - kp = 1$ and because of the theorem of Bézout-Bachet, we have that $\text{gcd}(n,p) = 1$.
Conversely, let $\text{gcd}(n,p) = 1$. Once again because of Bézout-Bachet, we have that $1 = sn + kp$, for $s, k \in \mathbb{Z}$. Hence we have that ($\mod p$): $sn \equiv 1 \mod p$, so $s = n^{-1}$ modulo $p$.
Hint $ $ By Bezout we know $n$ is invertible mod $20$ iff $n$ is coprime to $20$ or, equivalently, iff $n$ is coprime to $2$ and $5$, i.e. $n$ is odd and not divisible by $5$. Below $20$ they are $\,1,3,7,9,11,13,17,19,$ i.e. sieve by crossing out multiples of $2$ and $5$ as in Eratosthenes prime sieve.