**Proof plan.** Given an irreducible $p$ with $p \mid ab$ and $p \nmid a$, use the PID hypothesis to write $(p, a) = (d)$ and show $d$ must be a unit; this gives a Bézout-type relation $1 = rp + sa$, and multiplying by $b$ forces $p \mid b$.
We already know that primes are irreducible in any [integral](/page/Integral) domain. We prove the converse for PIDs.
**Step 1: The ideal $(p, a)$ is principal.**
Let $p \in R$ be irreducible, and suppose $p \mid ab$ with $p \nmid a$. Since $R$ is a PID, $(p, a) = (d)$ for some $d \in R$.
**Step 2: $d$ is a unit.**
[claim: d Is a Unit]
The generator $d$ of $(p, a)$ is a unit.
[/claim]
[proof]
Since $d \mid p$ and $p$ is irreducible, either $d$ or $p/d$ is a unit. If $d$ is a unit, done. Suppose instead that $d$ is not a unit, so $p/d$ (i.e. the $q_1$ with $p = q_1 d$) is a unit, meaning $d$ and $p$ are associates: $(d) = (p)$. But then $(p, a) = (p)$, which would mean $p \mid a$, contradicting $p \nmid a$. So $d$ must be a unit.
[/proof]
**Step 3: Bézout relation and conclusion.**
[claim: p Divides b]
$p \mid b$.
[/claim]
[proof]
Since $(d) = (p, a) = R$ (as $d$ is a unit), we can write $1_R = rp + sa$ for some $r, s \in R$. Multiplying by $b$:
\begin{align*}
b = rpb + sab.
\end{align*}
Now $p \mid rpb$ trivially, and $p \mid ab$ by hypothesis so $p \mid sab$. Hence $p \mid b$.
[/proof]
Since $p \mid ab$ implies $p \mid a$ or $p \mid b$, the element $p$ is prime. $\square$