Proof (equivalence of maximal ideal, prime ideal, prime element, irreducible element in PID)

Recall in a general ring, we have the chain of implication for $r\neq 0$ $$ \begin{align*} \text{$(r)$ maximal ideal} \implies \text{$(r)$ prime ideal} \iff \text{$r$ prime element} \implies \text{$r$ irreducible}. \end{align*} $$ So it suffices to prove

Irreducible $\implies$ maximal

Suppose $(r) \subseteq I \lhd R$. Since $R$ is a principal ideal domain, let $I = (s)$. Then $s\mid r$ and so $r = sx$ for some $x\in R$. But $r$ is irreducible, so either

Irreducible $\implies$ prime element

(We'll prove this for extra)

Let $r\in R$ be irreducible and $r\mid xy$. We will show $r\mid x$ or $r\mid y$.

The ideal $(r,x)\lhd R$ is principal, so let $(r,x) = (z)$ for some $z\in R$. Then $z\mid r$ and $z\mid x$.

Write $r = qz$ for some $q\in R$. Since $r$ is irreducible, either $q$ is a unit or $z$ is a unit.