Show that $x^2+1$ is irreducible over the integers mod $7.$
My solution goes as follows:
Let $R$ be a commutative ring with unit element. An element $p(x)$ in $R[x]$ is said to be an irreducible element in $R[x]$ if whenever $p(x)=a(x)b(x)$, either $a(x)$ or $b(x)$ is a unit in $R[x]$, or in other words, either $a(x)$ or $b(x)$ are constant (,i.e having degree equal to $0$) that are units in $R$.
With this definition in mind, we can say that $p(x)=x^2+1$ is irreducible in $\Bbb Z_7[x].$ This is because if possible, let $\exists$ a factorization of $p(x)$ as $p(x)=a(x)b(x)$ such that the degree of neither $a(x)$ nor $b(x)$ equals $0.$ Then, it means that, we have the $\deg (a(x))=\deg (b(x))=1$ as the only possibility.
Let $a(x)=px+q,b(x)=rx+s,$ where $p,q,r,s\in \Bbb Z_7.$ So, $p(x)=prx^2+(ps+qr)x+sq=x^2+1.$ This further means that $pr=1,ps+qr=0,$ and $sq=1.$
Since, $pr=sq=1$ we have the following possibilities listed below:
- $p=4,r=2,s=4,q=2:$ In this case, $ps+qr=6$
- $p=4,r=2,s=2,q=4:$ In this case, $ps+qr=2$
- $p=2,r=4,s=4,q=2:$ In this case, $ps+qr=2$
- $p=2,r=4,s=2,q=4:$ In this case, $ps+qr=6$
So, in all these cases we have seen that $ps+qr\neq 0$ for any possible solutions of the equations $pr=sq=1$ over $\Bbb Z_7.$
So, the system of equation $pr=1,ps+qr=0,$ and $sq=1$ is inconsistent. Hence, our assumption that $p(x)=a(x)b(x)$ such that the degree of neither $a(x)$ nor $b(x)$ equals $0$ is wrong. This means, $p(x)$ is irreducible over $\Bbb Z_7.$
I hope the above solution is correct. (If not, please do point out the error.)
But, I have seen another approach which checks for roots of $p(x)=x^2+1$ from the numbers $1,2,3,...,6$ and then verifies that if $x=1,2,3,...,6$ then $x^2+1\not\equiv 0\pmod 7.$ Then it says that, "Hence, $ p(x)$ is irreducible over $\Bbb Z_7.$"
This makes me wonder about the justification of this last approach from the book. This is because, say we have a ring $\Bbb Z_n$ and a polynomial $p(x)$ such that $\deg (p(x))=k\geq 2.$ If we find that, $\exists a\in \{0,1,...,n-1\}$ such that $p(a)\equiv 0\pmod n$ then we can say that $p(x)=(x-a)g(x),$ where $g(x)\in \Bbb Z_n[x]$ and $\deg (g(x))=k-1\geq 1.$ This automatically implies $p(x)$ is reducible in $\Bbb Z_n.$ So, if "things" turn out like this we have no problem and our approach helps us determine correctly the reducibility of the given polynomial. But, what if, things don't come up like this: Let's say, that $n=7$ and $p(x)=x^4+2x^2+1=(x^2+1)^2.$ In this case as well, for every $a\in \{0,1,2,...,6\},$ $p(x)\not\equiv 0\pmod 7.$ But, $p(x)$ is not irreducible as, $p(x)=(x^2+1)^2.$ So, this approach doesn't make any sense! Just because that for every $a\in \{0,1,2,...,6\},$ $p(x)\not\equiv 0\pmod 7,$ we cannot claim that $p(x)$ is irreducible and in fact it is not so. So, the approach given in the book is wrong.
Am I correct with my understandings?