# Why $\mathbb{Z}[x]$ is not a principal ideal ring (why my example is bad)

We know that $\mathbb{Z} [ x ]$ is not a principal ideal ring, because we can construct the ideal $\langle 2,x \rangle$. Why we couldn't take as an example of non-principal ideal in it all polynomials with the same given root $y$? i.e. $$P(x)=a_nx^n+...+a_1x+a_0=(x-y)\cdot (\dots$$ $$P(x) \cdot Q(x)=(x-y)^2 \cdot \dots$$ $$P(x)+Q(x)=(x-y)(\dots)$$ So, $I$ is the ideal. Am I right?

• But it's principal. – Wojowu Sep 14 '16 at 19:32
• Take $y=0$ and you'll see easily the ideal is principal. – egreg Sep 14 '16 at 19:39

The ideal $I = \{ f \in {\mathbb Z}[x] \mid f(a) = 0 \}$ is principal: $I = \langle x - a \rangle$.