This is in reference to Number Theory/ Modular Arithmetic. In EXAMPLE 11 in the above picture, I cannot understand the proof from the 8th line from "Therefore, there exists...". Why is there a unique $b\in \{1,2,3,\dots,p-1\}$ such that $ab\equiv 1 (\mod p)$? Why $a\neq 1$ or $p-1$ implies that $b\neq 1$ or $p-1$? Can anybody please shed some light on this.
2026-04-02 03:00:50.1775098850
On
Explanation of this example
41 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
0
On
Let $a,r\in \{0,1,2,\cdots ,p-1\}$. We want to argue that there exists some unique $b\in \{0,1,2,\cdots ,p-1\}$ such that $$ab\equiv r\mod p$$Assume by contrary that there exist $b_1$ and $b_2> b_1$ such that $$ab_1\equiv r\mod p\\ab_2\equiv r\mod p$$therefore $$ab_1\equiv ab_2\mod p$$since $\gcd(a,p)=1$ we obtain $$b_1\equiv b_2\mod p$$which yields to the impossible $p|b_2-b_1$ since $b_2-b_1\in\{0,1,2,\cdots ,p-1\}$ and therefore $\gcd(p,b_2-b_1)=1$. This completes the proof of uniqueness of such $b$. Now simply, let $r=1$.

The previous sentence states that if you take the numbers $a, 2a, \ldots, (p-1)a$ and write down their remainders when dividing by $p$, you will get the numbers $1,2,\ldots,p-1$ in some order.
In particular, this implies one of the original numbers $a, 2a, \ldots, (p-1)a$ is equivalent to $1$ modulo $p$. This answers your first question.
So, we have $$ab \equiv 1 \mod p.$$ If $b=1$ and $a \in S$, is this possible? If $b = p-1$ and $a \in S$, is this possible?