[Math] Prove that every element in $\mathbb{Z}_{p} \setminus \left\{0\right\}$, $p$ prime has a multiplicative inverse

abstract-algebraelementary-number-theorylinear algebramodular arithmeticproof-explanation

$p$ is a prime number. Show that every element in $\mathbb{Z}_{p}
\setminus \left\{0\right\}$ has a multiplicative inverse.

It might base on my previous question I solved yesterday with help of user N. S.: Prove that: If $n \in \mathbb{Z}_{m} \setminus \left\{0\right\}$ has a multiplicative inverse, then this is definitely unique

I don't know.. Maybe it would work via induction? It would be nice if it would.

What I thought but not sure if it will work:

Let $m=p$ be prime number and $x \in Z_{p}$ where $Z_{p} \setminus \left\{0\right\}$.

Then $x$ is not divisible by $p$

$\Rightarrow \text{gcd}(x,p)=1$

Thus, there exists a representation $a \cdot x + b \cdot p=1$, where $a,b$ are integers.

Well actually I can stop here because we got $\text{gcd}(x,p)=1$ which already shows there exists a multiplicative inverse, I think?

But this all sounds very strange, maybe there is another way?

Best Answer

It is true that $(x,y) = 1$ implies that $x$ is invertible in the ring $\mathbb{Z}_y$, and it is related to bezout's theorem. In your answer you failed to make the last jump in showing that Bezout's theorem explicitly gives the inverse.

Indeed, since $(x,p) = 1$ we have some $a,b \in \mathbb{Z}$ such that $a x + b p = 1$. Taking this equation mod $p$, we have $a x = 1$.

Related Question