[Math] Multiplicative group of integers modulo $p$ (inverses)

abstract-algebragroup-theory

I wanna show that the non-zero elements of $\mathbb Z_p$ ($p$ prime) form a group of order $p-1$ under multiplication, i.e., the elements of this group are $\{\overline1,\ldots,\overline{p-1}\}$. I'm trying to prove that every element is invertible in the following manner:

Proof (a)

By Bézout's lemma given $\bar a\in\mathbb Z_p$, there are $x,y \in
\mathbb Z$ such that

$ax+py=1\implies\overline {ax+py}=\overline 1\implies \overline a
\overline x+\overline p\overline y=\overline1\implies \overline a
\overline x+\overline 0=\overline1\implies \overline a\overline
x=\overline1$

There are two problems with this proof, first $\overline 0$ is not defined, because $\overline 0$ is not defined because isn't in $\{\overline 1,\ldots \overline {p-1}\}$ secondly the sum is not defined, because I'm using multiplication in this case.

Proof (b)

By Fermat's little theorem, for each $\overline a \in \mathbb Z_p$, we
have:

$a^{p-1}\equiv 1$ (mod $p$), then $\overline {a^{p-2}}$ is an inverse
to $\overline a$.

My problem with this proof is why $\overline {a^{p-2}}\in
\{\overline1,\ldots,\overline{p-1}\}$.

I've already known these proofs, but with a little bit more experience, I found these lacks of rigor.

Thanks in advance.

Best Answer

With respect to (a) first:

Why isn't $\bar0$ defined? It seems you're working in $\mathbb{Z}/p\mathbb{Z}$ and not only the group of units; thus $\bar{0}$ is defined just fine. Secondly, it seems you are deliberately forgetting that $\mathbb{Z}/p\mathbb{Z}$ is a ring and not just a group, i.e. that you have both addition and multiplication. Perhaps you thought in both cases that you were working in the group of units instead of the ring of integers mod $p$?

What you should do is work in the ring, realize $a$ has a (non-zero unital) inverse, and conclude that $a$ is in the group of units. This angle is the one espoused by (a), and is what makes it fine.

With respect to (b):

I like this one a lot less because standard proofs of Fermat's little theorem use (often explicitly) the size of the group of units (and Lagrange's theorem). Or they use the size of the group of units and then multiply them all together, do a little cancellation (maybe with Wilson's theorem), and get the result. But in both cases, you use the size of the group of units, so there is danger of self-referentiality.

But there are ways of proving Fermat's little theorem avoiding knowing the size of the group of units; so let's assume we've done that.

A priori, you only know that $a^{p-2} \in \mathbb{Z}/p\mathbb{Z}$, i.e. that it could be $0$. Well, is it $0$? If it were $0$, this means that $p \mid a^{p-2}$. But $p$ is prime, so if $p \nmid a$ then $p \nmid a^{x}$. So $a^{p-2} \neq 0$, and thus is in $1, \ldots, p-1$. (I stopped using bars, but every number here is in $\mathbb{Z}/p\mathbb{Z}$).

Related Question