0

With a prime number p and a not equal to 0, how can I prove that there exists an integer b such that ab is congruent to 1 (mod p)?

What I have done so far is I know that the GCD(p,a) is either 1 if p does not divide a or it is p if p does divide a. I am able to take GCD(p,a) = 1 to the end by using the fact that ab + pk = 1 and manipulating that to show that ab is congruent to 1 (mod p), but am stuck on how to move forward if the GCD(p,a) = p and p divides a.

  • 2
    If the the GCD is equal to $p$ then $a$ is a multiple of $p$ and $ab \equiv 0\pmod p$ always. The necessary condition is not just that $a \ne 0$ but $\gcd(a,p) =1$. It is NOT possible if $\gcd(p,a)=p$. Ever. – fleablood Apr 02 '20 at 05:23
  • 1
    Simple oversight on my part, this cleared things up a ton. Thanks so much. – george_foremann Apr 02 '20 at 05:25

0 Answers0