# Factor $x^3-x^2+2$ in $\mathbb Z_{3}[x]$

Factor $x^3-x^2+2$ in $\mathbb Z_{3}[x]$ and explain why the factors are irreducible.

So the factor is supposed to be:

$x^3-x^2+2 = 2(x + 1)(2x^2 + 2x + 1)= (x + 1)(x^2 + x + 2)$.

But I don't really see how. What I see:

$x^3-x^2+2 \equiv x^3+2x^2+2$ in $\mathbb Z_{3}[x]$.
And I suppose it can factor to $x^2(x+2)+2$ ? I don't see where $2(x + 1)(2x^2 + 2x + 1)$ comes from.

-
Since the degree is $3$ is enough to check for roots. – Sigur Nov 7 '12 at 10:39

Factoring means: Write your polynomial as a product of irreducible ones. $x^2(x+2) + 2$ is no factorisation. To find the linear factors of a polynomial, first find it's roots. So we plug in $0$, $1$ and $2$ into $p(x) = x^3 - x^2 + 2$, and get \begin{align*} p(0) &= 2\\ p(1) &= 2\\ p(2) &= 8 - 4 + 2 = 6 \equiv 0 \end{align*} So $2 \in \mathbb Z_3$ is a root. That means that $p$ has a factor $(X - 2) = (X+1) \in \mathbb Z_3[X]$, polynomial long division gives $X^3 - X^2 + 2 = (X+1) \cdot (X^2 + X + 2)$ as $q(X)= X^2 + X + 2$ has no zeros in $\mathbb Z_3$, it is (as a polynomial of degree two) irreducible and $p(X) = (X+1)\cdot (X^2 + X + 2)$ is the factorization of $p$ into irreducible factors you aimed for.

-
Is there any reason why you choose $0,1$ and $2$ specifically? – Arvin Nov 7 '12 at 10:54
@Arvin: What else is there to choose? – Chris Eagle Nov 7 '12 at 10:58
@Arvin These are all the elements of $\mathbb Z_3$. – martini Nov 7 '12 at 10:58
ahhh of course.. oh me.. – Arvin Nov 7 '12 at 11:02

Let $P(x)=x^3-x^2+2$. Observe that $P(-1)=0$, hence $x-(-1)=x+1$ is a factor.

-

The polynomial has $-1$ as root. If you divide by $x+1$ you obtain the factorization.

A polynomial $f(x) \in \mathbb{F}[x]$ ($\mathbb{F}$ field) with $\operatorname{deg}(f)\leq 3$ is irreducible iff it has no roots in $\mathbb{F}.$ If it has a root $a$ then is divisible by $x-a$.

-

Notice that $$x^3-x^2+2=x^3+2x^2-1=x^3+x^2+x^2-1=x^2(x+1)+(x+1)(x-1)=(x+1)(x^2+x-1)$$

-
You should really try to write mathematics in this site with LaTeX, otherwise things come up as above in your answer and it is very hard to understand them. – DonAntonio Nov 7 '12 at 10:47
@Amr all you need to do to make it a lot better is surround the whole equation with dollar signs (\\$) – Arvin Nov 7 '12 at 11:05