Is it necessarily true that if a polynomial is irreducible in $\mathbb Z_n$ ($n$ is prime) then it is irreducible in $\mathbb{Q}$? I have played around with a couple examples and I've consistently seen a pattern where the polynomials that are irreducible in $\mathbb{Z}_n$ are irreducible in $\mathbb{Q}$. Can anyone challenge this statement? How about in the reals - that is if a polynomial is irreducible in $\mathbb Z_n$  does the same hold in $\mathbb{R}$? I have not taken a formal course in abstract algebra, but I am curious as an outsider what the reasoning is like from a mathematician's point of view.
 A: Edit: I am interpreting $\mathbb Z_n$ as $\mathbb Z/n\mathbb Z$, is this the case here?
This is indeed true if the leading coefficient of the polynomial is equal to $1$ and the coefficients are in $\mathbb Z$: if $p$ is reducible over $\mathbb Q$, then $p=qr$, and the leading coefficients of $q$ and $r$ is $1$, and so $q$ and $r$ are nonconstant in $\mathbb Z_n$, so $p$ is reducible in $\mathbb Z_n$.
If the leading coefficient is not $1$, then this is not always true: $2x^2+3x+1$ is irreducible over $\mathbb Z_2$, but not irreducible over $\mathbb Q$, since it is equal to $(2x+1)(x+1)$.
Finally, $x^2-2$ is irreducible in $\mathbb Z_3$, but not in $\mathbb R$.
A: There is a neat theorem, called the localization principle, which may be what you're looking for:
Suppose that $f= a_0 + a_1 x + ... + a_n x^n$ and that $a_0, a_1, ... , a_n$ are relatively prime. Suppose that $p$ is a prime which does not divide $a_n$. If $\bar{f}$ is irreducible in $\mathbb{Z_p}$, then $f$ is irreducible in $\mathbb{Z}$.
