# Proving that every non-zero prime element can be written as a power of g

Let $$p\geq 2$$ be a prime and let g be an element of order $$p-1$$ in $$\Bbb Z_p$$. Prove that every non-zero element of $$\Bbb Z_p$$ can be written as a power of $$g$$.

So i wanted to start this proof by proving the the elements $$[g],[g]^2,[g]^3,...,[g]^{p-1}$$ are all distinct. But im a bit uncertain on how do this . I thought it could be something with inverses since we are in $$\Bbb Z_p$$ but that didn't really workout.

• If those elements are not distinct then two of them are the same. Deduce that the order of $g$ must then be lower than $p-1$.
– lulu
May 21 '19 at 18:20
• @lulu well the order is the smallest number m such that $g^m \equiv\ 1\ mod\ p$. So if two elements are the same then there exist a k and y such that $[g]^y = [g]^k$ but these y and k don't say anything about the order, correct? they just say that two powers give the same result with the base g. May 21 '19 at 18:32
• If $g^y=g^k$ with $y>k$ then $g^{y-k}=1$.
– lulu
May 21 '19 at 18:36