TITLE: Find all irreducible polynomials of degree $2$ over $\mathbb{Z}_5$
QUESTION [5 upvotes]: Obviously if I write all the possible ones and try the roots I'd get a LOT of polynomials $(125)$ and I'd have to test $5$ roots for each of them, which would be a LOT. Is there any idea?
I must also do it for degree $\le 3$ over $\mathbb{Z}_3$
Do you guys have any ideas to make it easier?
please remember that I'm on a ring theory course

REPLY [2 votes]: There are a few tricks you can use:

A polynomial $p(x)$ is irreducible if and only if $p(x-a)$ is irreducible.
A polynomial $p(x)=p_0+p_1x+\cdots+p_nx^n$ of degree $>1$ is irreducible if and only if its reciprocal
$$\tilde{p}(x)=x^np(\frac1x)=p_n+p_{n-1}x+\cdots+p_1x^{n-1}+p_0x^n$$
is irreducible.
A polynomial $p(x)$ is irreducible if and only if $p(ax), a\neq0$, is irreducible.

Proving these facts is easy (leaving it to you). The point is that these allow you to produce a lot of other irreducible polynomials if you have found one. Normally we are only interested in monic irreducible polynomials. The first trick takes a monic to a monic, but you do need to rescale a polynomial if you use one of the other tricks.
The case of quadratics over $\Bbb{F}_5$ becomes a quickie. You easily that both $x^2-2$ and $x^2-3$ are irreducible. Therefore the ten irreducible ones you are looking for are
$$
p_a(x)=(x-a)^2-2,\quad q_a(x)= (x-a)^2-3
$$
with $a=0,1,2,3,4$. You do need to check for duplicates. In this case that is easy. The coefficients of linear terms within the two families are different. Observe that the polynomials $p_a$ all have discriminant $8\equiv3$ but the polynomials $q_a$ have discriminant $12\equiv2$.
If you are familiar with extension fields you can also think of them as follows. If we view $K=\Bbb{F}_{25}$ as $\Bbb{F}_5[\sqrt2]$, then the elements $a\pm\sqrt2$ have minimal polynomials $p_a(x)$, and because modulo five $\sqrt3=\sqrt8=2\sqrt2$ the polynomials $q_a(x)$ have $a\pm 2\sqrt2$ as their zeros. Those zeros account for all the elements in $K\setminus\Bbb{F}_5$ so we are done.
Finding all the irreducible cubics over $\Bbb{F}_3$ takes more tricks. For cubics you can test for irreducibility by checking the absence of zeros in $\Bbb{F}_3$. So you quickly see that
$$
p(x)=x^3-x+1
$$
is irreducible. However, the first trick doesn't work, because $p(x-a)=p(x)$ for both $a=1,2$. The last trick does give us $q(x):=-p(-x)=x^3-x-1$ as another monic irreducible. We need the second trick as well. Do observe that the first trick does work with the reciprocals $\tilde{p}(x)$ and $\tilde{q}(x)$.
Can you show that there are exactly 8 monic irreducible cubics? Go find them!