TITLE: In a principal ideal domain, prove that every non trivial prime ideal is a maximal ideal. What could be wrong in this approach?
QUESTION [19 upvotes]: In a principal ideal domain, prove that every non trivial prime ideal is a maximal ideal
Attempt: Let $R$ be the principal ideal domain. A principal ideal domain $R$ is an integral domain in which every ideal $A$ is of the form $\langle a \rangle = \{ar~~ | ~~r \in R\}$
Let $ \langle a \rangle $ be a prime ideal $\implies R/A $ is an integral domain.
A finite integral domain is a field . Hence, if we prove that $R/A$ is finite, then $R/A$ is a field $\implies A$ is a maximal ideal.
Now, $\langle a \rangle = \{ar~~ | ~~r \in R\}$
Since, R is an integral domain, there are no zero divisors and cancellation is allowed $\implies ar_1 = ar_2 \implies r_1=r_2 \implies ar_i$ maps to a different member of $R$ for each different $r_i \implies \langle a \rangle$ represents the elements of $R$ in some random order.
$\implies \langle a \rangle = R$ and hence, $R/A \approx {0}$ is finite and hence $A$ is maximal.
Is my attempt correct?

REPLY [15 votes]: Your approach can't work. The ring $\mathbb{Q}[x]$, where $\mathbb{Q}$ is the field of rational numbers, is a PID. However, for the prime ideal $P=\langle x\rangle$ the quotient is $\mathbb{Q}[x]/P\cong\mathbb{Q}$, which is infinite.

Suppose $P$ is a nonzero prime ideal and $P=\langle p\rangle$. Now, let $I=\langle a\rangle$ be an ideal such that $\langle p\rangle\subseteq\langle a\rangle$. In particular
$$
p=ab
$$
so $ab\in P$. Therefore, by definition of prime ideal, either $a\in P$ or $b\in P$.
If $a\in P$, then $\langle a\rangle\subseteq\langle p\rangle$, whence $I=P$.
If $b\in P$, then $b=pc$, so $p=ab=apc$ from which $1=ac$ and $a$ is invertible, whence $I=R$.