In a proof of Wilson's theorem, I read this identity and just wondered how to prove it:
When $1\leq a\leq p-1$, we have $(a,p)=1$, so there exists a unique $\overline{a}$ with $a\overline{a}\equiv 1\pmod{p}$
Why is this the case?
In a proof of Wilson's theorem, I read this identity and just wondered how to prove it:
When $1\leq a\leq p-1$, we have $(a,p)=1$, so there exists a unique $\overline{a}$ with $a\overline{a}\equiv 1\pmod{p}$
Why is this the case?
On
Since $(a,p)=1$, there exist integers $r,s$ such that $ar+sp=1$ (see Bézout's identity). So $ar\equiv 1 \pmod p$.
If $p$ is a prime, its divisors are $1$ and $p$. Hence, if any $1 \le a \le p-1$ is given, the greatest common divisor of $a$ and $p$ is $1$ (as the other divisor of $p$, $p$ is greater than $a$, and hence not a divisor of $a$). So $(a,p) = 1$.
If $(a,p) = 1$, there are $c,d \in \mathbf Z$ with $ca + dp = 1$, reducing modulo $p$, we get $ca \equiv 1 \pmod p$.