# Does every non-trivial element of $\mathbb{Z}_p$ generate the group?

This just popped up in my head and I just wanted to make sure if I'm right.

Every element (except the identity element $0$) of the group $\mathbb{Z}_p$ (under addition and $p$ is prime) is a generator for the group. For example, $\mathbb{Z}_5 = \langle 1 \rangle = \langle 2 \rangle = \langle 3 \rangle = \langle 4 \rangle$.

Thanks!

Yes!

$$nm\equiv 0\iff m\equiv 0 \text{ or } n\equiv 0$$

Thus shows that $m,2m,\ldots, pm$ are distinct which is what you needed.

• Another way to see it: By Lagrange's theorem, every element must have order that divides $p$. Only $0$ may have order $1$, so the other elements must have order $p$ (since it is prime). An element whose order is the order of the group generates the group, so we're done. – Yoni Rozenshein Apr 22 '13 at 19:26

Yes. In general, the generators of $\mathbb{Z}_n$ are those integers $m$ such that $\gcd(m,n) = 1$.

• The question wasn’t about integers suitable for generation of the group. It was about an element of the group as the generator. – Incnis Mrsi Dec 21 '14 at 10:29
• @IncnisMrsi I did commit the sin of denoting a congruence class by one of its representatives, but this is harmless here as the property of being relatively prime to $n$ makes sense on the quotient. – Alex Provost Dec 21 '14 at 19:21

You can show that $\mathbb{Z}_p$ is a field, so if $H= \langle h \rangle$ with $h \neq 0$, $1 \in H$ since $h$ is invertible; you deduce that $H= \mathbb{Z}_p$, ie. $h$ is a generator.