Is the polynomial $x^2+x+4$ irreducible over $\mathbb{Z}_5[x]\ $? Given $$f(x)=x^2+x+4$$
I need to either prove this is irreducible over $\mathbb{Z}_5[x]$ or give a counterexample. I have yet to find a counterexample, but can't seem to prove it on my own. Would love any advice/help! Thank you! 
 A: You already know how to factor quadratic polynomials over the integers. If you were to have $$x^2+x+4 =(x+a)(x+b)$$ you would need $ab=4$ and $a+b=1$.  In the integers this doesn't happen because $ab=4$ implies either $\{a,b\}=\{1,4\}$ or $a=b=2$ and in neither case is $a+b=1$.
But what about in $\Bbb Z_5$?  $(x+a)(x+b) =x^2 +(a+b)x+ab$ just as in the integers or in any other ring.  So your analysis can be the same, except that $a$ and $b$ must be elements of $\Bbb Z_5$ instead of integers. What could $a$ and $b$ be? Can you have both $ab=4$ and $a+b=1$? There are not that many choices for  $a$ and $b$, so it would not take too long even if you were to just check all of them.
A: $\mathbb{Z}_5$ is a field, $\deg p(x)=2$. So $p(x)$ is irreductible if and only if $p(x)$ has no root in $\mathbb{Z}_5$. Since $p(2)=0$ in $\mathbb{Z}_5$, hence $p(x)$ is not irreducible.
A: You may even use the familiar formula for solving a quadratic, since the characteristic is not $2$.
Here $a = b = 1$, and $c = 4 \equiv -1 \pmod{5}$.
Thus the formula yields
$$
\frac{-b \pm \sqrt{b^{2} - 4 a c}}{2}
=
\frac{-1 \pm \sqrt{1 - (-1)(-1)}}{2}
=
\frac{-1}{2}
=
2,
$$
as $2 \cdot 2 = 4 \equiv -1 \pmod{5}$.
