Find all irreducible polynomials of degree $2$ over $\mathbb{Z}_5$ 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 
 A: You can use this proposition: The polynomial $x^{p^{n}}-x$ is precisely the product of all the distinct irreducible polynomials in $\mathbb{F}_{p}[x]$ of degree $d$ where $d$ runs through all divisors of $n$. Then $x^{25}-x$ is the product of all irreducible polynomials over $\mathbb{F}_{5}$ of degree $1$ and $2$. The degree $1$ one's are: $x, x+1,\cdots, x+4$. Factor $x^{25}-x$ into irreducible polynomials and collect the degree $2$ terms.
\begin{equation}
\begin{split}
&x^{25}-x
=x(x^{24}-1)
=x(x^{12}+1)(x^{12}-1)
=x(x^{12}-4)(x^{12}-1)\\
&=x(x^{6}+2)(x^{6}-2)(x^{6}+1)(x^{6}-1)\\
&=x(x^{6}-2^{3})(x^{6}+2^{3})(x^{6}-4)(x^{6}-1)\\
&=x(x^{2}-2)(x^{4}+2x^{2}-1)(x^{2}+2)(x^{4}-2x^{2}-1)\\
&\quad(x^{3}-2^{3})(x^{3}+2^{3})(x^{3}-1)(x^{3}+1)\\
&=x(x^{2}-2)(x^{4}+2x^{2}-1)(x^{2}+2)(x^{4}-2x^{2}-1)\\
&\quad(x-2)(x^{2}+2x-1)(x+2)(x^{2}-2x-1)\\&\quad(x-1)(x^{2}+x+1)(x+1)(x^{2}-x+1)\\
\end{split}
\end{equation}
We now factor $x^{4}+2x^{2}-1$. Let $x^{4}+2x^{2}-1=(x^{2}+ax+b)(x^{2}+cx+d)$. Compare $x^{3}$ term, $c=-a$. $a\neq 0$, otherwise $b\neq 1,-1$, since $x^{2}+1$, $x^{2}-1$ reduce. $b\neq 2,-2$ since $x^{2}+2$ and $x^{2}-2$ are already in the list. Compare $x$ term, $ad=ab$, $d=b$. So $x^{4}+2x^{2}-1=(x^{2}+ax+b)(x^{2}-ax+b)$. $b^{2}=-1$, $b=2,-2$. If $b=2$, compare $x^{2}$ term, $-a^{2}-1=2$, $a^{2}=2$. No such $a$ exists. So $b=-2$. $-a^{2}=1$. $a=2, -2$. Both cases gives: $x^{4}+2x^{2}-1=(x^{2}+2x-2)(x^{2}-2x-2)$.
Now, let $x^{4}-2x^{2}-1=(x^{2}+ax+b)(x^{2}-ax+b)$. $b=2, -2$. If $b=-2$, $-a^{2}+1=-2$, $a^{2}=-2$, impossible. $b=2$, $a=1$. $x^{4}-2x^{2}-1=(x^{2}+x-2)(x^{2}-x-2)$. 
All the degree $2$ irreducible polynomials are: 
\begin{equation}
x^{2}-2,x^{2}+2,x^{2}+2x-1,x^{2}-2x-1,x^{2}+x+1,x^{2}-x+1,x^{2}+2x-2,x^{2}-2x-2,x^{2}+x-2,x^{2}-x-2.
\end{equation}
A: Let $ax^2 + bx + c$ be a polynomial of degree $2$ over $\mathbb Z_5$. Then $a \neq 0$, so we can multiply by $a^{-1}$ to get $x^2 + Bx + C$. There are $5$ choices for $B$ and $C$, so there are only $25$ polynomials of this form.
On the other hand, a reducible monic polynomial will be of the form $(x - \alpha)(x - \beta)$, and there are ${5 \choose 2} + 5 = 15$ such polynomials. If you list these, there will be $25-15=10$ that are not listed, and these will be irreducible. (And then for any irreducible polynomial, you can multiply it by a nonzero constant to get another.)
A: 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!
