I am going through my number theory notes and have got on to the bit about the ring $\mathbb{Z}_p[x]$, where $p$ is prime, and unique factorisation domains. The example I am looking at is to do with irreducible and reducible polynomials. It says
e.g in $\mathbb{Z}_3[x]$, $x^2 + x + 1 = (x + 2)(x+2) = (x-1)(x-1)$ because $x^2 + x + 1 = x^2 - 2x + 1$. So $x^2 + x + 1$ is reducible in $\mathbb{Z}_3[x]$. But $x^2 + x + 1$ is irreducible in $\mathbb{Z}_2[x]$ or $\mathbb{Z}_2[x]$ (for example).
I don't get how my lecturer has done this. How can she write $x^2 + x + 1 = (x + 2)(x + 2)$ when $(x + 2) (x+2) = x^2 + 4x + 4$ and how can she say that $x^2 + x + 1 = x^2 - 2x + 1$? Also, why does this only work in $\mathbb{Z}_3[x]$ and not say $\mathbb{Z}_2[x]$ or $\mathbb{Z}_5[x]$?
EDIT: In case it helps, my definition of $\mathbb{Z}_p[x]$ is given by:
The proof of the Primitive Element Theorem uses the fact that if $p \in \mathbb{Z}_+$ is prime, then the ring $\mathbb{Z}_p[x] = \{a_0 + a_1x + \cdots + a_nx^n: n \in \mathbb{Z}, a_i \in \mathbb{Z}_p, 0 \leq i \leq n\}$ is a unique factorisation domain (UFD). This means that $\mathbb{Z}_p[x]$:
- is a commutative ring with identity
- has no zero divisors
- has unique factorisations into irreducibles - which are also primes sinc this is a UFD. The "units" in $\mathbb{Z}_p[x]$ are the constant polynomials $a_0 \in \mathbb{Z}_p^*$.