I am not that great at abstract algebra, so I need some feedback on whether my way of thinking is right or wrong. I have this one exercise that reads:
Find an irreducible polynomial of degree $2$ over $\mathbb{Z}_{7}$
Which sounds simple. Additionally, class materials contain the following theorem:
Let $w$ be an element of order $n$ in a finite Abelian field $\mathbb{F}_{q}$ of characteristic $p$, and let $m$ be the order of $p$ in $\mathbb{Z}^{*}_{n}$. Then the coefficients of the $m$th degree polynomial $f(x) = \displaystyle\prod_{i=0}^{m-1} \left(x-{w^{p}}^{i}\right)$ are field integers. Furthermore, $f$ is irreducible in $\mathbb{Z}_{p}[x]$.
Now I wasn't really sure how to go about this thing, but from what I can tell, both order and characteristic are $7$ for the case of $\mathbb{Z}_{7}$, and since we are looking for polynomial of degree $2$, $m=2$ so the product formula will take the following form:
$$\displaystyle\prod_{i=0}^{1} \left(x-{w^{7}}^{i}\right)$$
So for some element, say 3, I would get:
$$(x-1)(x-3^7) \equiv (x-1)(x-3)\mod 7$$
Which equals to $x^2 - 4x + 3$. Which I guess is a irreducible polynomial of degree $2$ over $\mathbb{Z}_{7}$.
My question here is whether or not I am right, or rather just how wrong I am and which part did I misunderstand. It would be much appreciated if someone could explain this a bit to me, since I am still confused by the materials I went through and that I found online.
The easiest way is this: Irreducible polynomials of degree 2 or 3 are irreducible iff they have no roots (this is true over any field). So just find some $x^2+a$ with no roots.