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

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$ ?


$\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.


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.