# Roots of Unity and Primitive roots

For $\mathbb{Z}/13$, I want to find its primitive roots and 4th roots of unity.

For $g$ to be a primitive root, we must have that $g^6 \neq 1 \pmod{13}$ and $g^4 \neq 1 \pmod{13}$. $2$ satisfies this. Do I just go through all the numbers $0,1,2, \cdots, 12$ and check this? I'm not too clear what a primitive root is.

Then for the 4th roots of unity, do we just go through each number raised to the fourth power and see what gets us $1$?

So, $1,5, 8, 12$ are the 4th roots of unity.

• The command \bmod (or \pmod, depending on your preferences) renders the mod notation nicely. – Travis Mar 2 '15 at 6:14
• Thank you. I've edited the post appropriately. – aldnoah.Algebra Mar 2 '15 at 6:21
• Note that if $g$ is a primitive root then $g^3$ and its powers are 4th roots of unity. – Gerry Myerson Mar 2 '15 at 6:27
• Yes, this is a very small field, you can check the 12 non-zero elements by hand, just multiply and reduce mod 13 as you go. A primitive root of unity for $\mathbb Z/13\mathbb Z$ is one where its powers give you all 12 non-zero elements. It's enough to raise it to the 6th power, if none of those are one then it must be primitive. – Gregory Grant Mar 2 '15 at 6:33
• if $(i,\phi(n))=1$and g is a primitive roots $g^i$is primitive roots and they are all primitve roots – ali Mar 2 '15 at 18:14