# Factoring $x^5-1$ over $\mathbb{Z_5}$

How do I completely factor $$x^5-1$$ over $$\mathbb{Z_5}$$?

I saw one was a root so I divided by $$x-1$$ and got $$(x-1)(x^4+x^3+x^2+x+1)$$ which duh is the 5th cyclotomic polynomial and this is the same factorization over the integers. Do I just look for roots from here or is there a better way to go about this? I mean I know I could try to factor it as arbitrary quadratics also, but i'm wondering if there was a more fundamental insight that i'm missing that would make this simpler. Thanks!

• \begin{eqnarray*} (x-1)^5 \equiv x^5-1 \pmod{5}. \end{eqnarray*} Oct 8, 2018 at 0:45
• If the comment by @DonaldSplutterwit seems cryptic, try expanding it in $\mathbb{Z}$ and notice something about all of the coefficients besides the two outer ones. Oct 8, 2018 at 0:49
• right, binomial expansion, duh, thanks Oct 8, 2018 at 0:50
• before jumping to the binomial expansion, notice that $x^4 + x^3 + x^2 + x + 1$ has a root $\pmod 5,$ namely $1.$ This means we can factor it as $(x-1) \cdot \mbox{cubic}$ and see how the cubic behaves. I got $x^3 + 2 x^2 + 3x + 4.$ Naturally, $1$ is a root again Oct 8, 2018 at 1:11

Since $$1$$ is a root, we can divide out $$x-1$$ by the factor theorem: $$x^5-1=(x-1)(x^4+x^3+x^2+x+1)$$.
$$1$$ is a root of $$x^4+x^3+x^2+x+1$$, so we can divide it out again: $$x^4+x^3+x^2+x+1=(x-1)(x^3+2x^2+3x+4)$$
$$x^3+2x^2+3x+4=(x-1)(x^2+3x+1)$$.
Lastly, $$x^2+3x+1=(x-1)(x-1)$$. So we can write $$x^5-1$$ as the product $$(x-1)^5$$ in $$\mathbb{Z}[x]$$.