# Finding a multiplicative inverse for $\mathbb{Z}_p^*.$

Let $$p$$ be a prime and let $$\mathbb{Z}_p^* = \{1,2...p-1 \}$$.

Let $$a\in \mathbb{Z}_p^*$$. Find $$a^{-1}a =1$$ for $$a^{-1} \in \mathbb{Z}_p^*$$.

So $$a^{-1}a = 1\pmod{p} \iff a^{-1}a + pr =1$$ , for some $$r\in \mathbb{Z}$$

Since $$a$$ and $$p$$ are coprime: $$\gcd(a,p) =1$$ and $$\alpha a + \beta p =1$$ has a solution for $$\alpha , \beta \in \mathbb{Z}$$ by Bezout's lemma.

Plugging in we get $$\alpha a = 1 \pmod{p} \iff \alpha a = 1$$, so $$a=\alpha^{-1}$$ with $$\alpha = a^{-1}$$.

Now $$a= (a^{-1})^{-1} = a$$

(Is this sufficient/enough?)

• This problem is related to this one – Juniven Mar 17 '17 at 12:46
• Yes, the proof is correct. – freakish Mar 17 '17 at 15:02

Your proof is correct, although the $$a= (a^{-1})^{-1} = a$$ at the end is not necessary.