# Factoring $x^8-1$ into a product of irreducibles over $\mathbb{Z}$ and $\mathbb{Z_2}$

I want to factor $$x^8-1$$ into a product of irreducibles over $$\mathbb{Z}$$ and $$\mathbb{Z_2}$$ and then EXPLAIN how i know that polynomials I obtain are irreducible.

So over $$\mathbb{Z}$$, $$x^8-1=(x^4+1)(x^4-1)=(x^4+1)(x^2+1)(x^2-1)=(x^4+1)(x^2+1)(x+1)(x-1)$$.

And then it looks like it would factor the same way over $$\mathbb{Z_2}$$, with $$-1=1$$ of course. Is this correct? Perhaps there is a way to factor the quartic term but i'm not sure. Anyway, my lack of sureness surely reflects a lack of some insight that i'm missing. Can anyone help me out here? I'd appreciate it!

• Note that $x^2+1$ has two roots over $\Bbb{F}_2$. – Dietrich Burde Sep 24 '18 at 19:28
• $x^4+1=\Phi_8(x)$ is never irreducible over a finite field. – Jack D'Aurizio Sep 24 '18 at 19:38

Hint: $$a^2+b^2=(a+b)^2$$ over $$\mathbb{Z}_2$$.
Solution: $$x^8-1=x^8+1=(x+1)^8$$
Since $$-1=1$$ in $$\mathbb{Z_2}$$, $$x^4+1=x^4-1$$ and $$x^2+1=x^2-1$$.