Prove that if $p\in \mathbb{Z}$ is irreducible, then it is also prime. The question is: 

Prove that if $p \in \mathbb{Z}$ is irreducible, then $p$ is also prime.



*

*Irreducible is defined as follows: $n \in \mathbb{Z} $ is irreducible iff the only way to write $n=ab$ for some integers $a$ and $b$ is if $a = \pm1$ or $b = \pm1$.

*Prime is defined as follows: an integer $n$ is prime iff whenever $a,b \in \mathbb{Z} $ and $p\mid ab$ then it must be true that $p\mid a$ or $p\mid b$ (or both). 


Hint:
Prove that if $n\mid ab$ but $n$ does not divide $a$, then $\gcd(a,n) = \pm1$. Then use Bézout's theorem and prove $n\mid b$.  
 A: I hope this is a subtle enough hint.
Suppose that $p$ is irreducible and that $p\mid ab$, but $p\nmid a$. If we can show that $p\mid b$, then we have shown that $p$ is prime.
Let $g=(p,a)$. Note that $g\mid p$ and use the irreducibility of $p$ to show that $g=1$.
Therefore, by Bezout's Lemma, we can find $x$ and $y$ so that
$$
ax+py=1\tag{1}
$$
multiply both sides of $(1)$ by $b$. Can you now show that  $p\mid b$ ?
A: $\rm\begin{eqnarray} By\ \ GCDs:\ \, atom\,\ p\nmid a\:&\Rightarrow&\rm\ (p\ \,,\ a)=1,\ &\rm so&\rm\  p\:|\:pb,ab\:&\Rightarrow&\rm\:p\:|\:(pb\ ,\, \ ab) &=&\rm\ (p\, \ ,\ \ a)b &=&\rm b\\
\rm By\ Bezout:\ \, atom\,\ p\nmid a\:&\Rightarrow&\rm\:jp\!+\!ka\,=1,\ &\rm so&\rm\ p\:|\:pb,ab\:&\Rightarrow&\rm \:p\:|\ jpb\!+\!kab &=&\rm (jp\!+\!ka)b &=&\rm b\end{eqnarray}$
Remark $\ $ Note how the GCD proof eliminates the Bezout coefficients $\rm\:j,k\:$ (which only serve to obfuscate the proof) and, further, highlights the key role played by the distributive law for gcds.
A: I will translate my previous answer to a more elementary proof so that the OP can understand.
Let $p \in \mathbb{Z}$ be irreducible.
Let $a \in \mathbb{Z}$ such that $a$ is not divisible by $p$.
Let $I = \{ax + py; x \in \mathbb{Z}, y \in \mathbb{Z}\}$.
Let $c > 0$ be the least positive integer belonging to $I$.
We claim that every element of $I$ is divisible by $c$.
Let $d \in I$.
$d$ can be written as $d = cq + r$, where $q, r \in \mathbb{Z}$, $0 \le r < c$.
Since $cq \in I$, $r = d - cq \in I$.
Hence $r = 0$ as claimed.
Hence, in particular, $a$ and $p$ are divisible by $c$.
Since $p$ is irreducible, $c = 1$.
Hence there exist integers $x, y$ such that $ax + py = 1$.
Hence $ax \equiv 1$ (mod $p$).
Suppose $ab \equiv 0$ (mod $p$).
Then $b \equiv xab \equiv 0$.
Hence $p$ is prime.
A: If $p$ is an integer that is irreducible then suppose has $p$ has factorization $p = ab$. As $p$ is irreducible then either $a=\pm1$ or $b=\pm1$. Suppose $a=\pm1$ then $p=\pm b$ $\implies$ $p|b$. Similarly, if $b=\pm1$ then $p |a$ thus $p$ is prime.
A: Let $p \in \mathbb{Z}$ be irreducible.
Since $\mathbb{Z}$ is a principal ideal domain, $p\mathbb{Z}$ is a maximal ideal.
Hence $p\mathbb{Z}$ is a prime ideal.
Hence $p$ is prime.
