TITLE: A commutative ring $A$ is a field iff $A[x]$ is a PID
QUESTION [16 upvotes]: Wikipedia says that a commutative ring $A$ is a field iff $A[x]$ is a PID. 

The "only if" part is easy: we just apply the Euclidean algorithm. I've stumbled trying to prove the "if" part, though.
$\newcommand{\aa}{\mathfrak{a}}$
My best attempt so far: suppose $\aa$ is an ideal of $A$, and $\aa'$ is the ideal of $A[x]$ spanned by $i(\aa)$, where $i: A \hookrightarrow A[x]$ is the natural embedding. $i^{-1}(\aa') = \aa$ for grading reasons ($i(A) = A[x]^0$, and multiplication by a non-zero degree polynomial takes us out of $i(A)$, because $A \cong i(A)$ is integral). $A[x]$ is a PID so $\aa' = (a')$, where $a' = i(a)$ for some $a \in A$. Therefore, $\aa = (a)$, and thus $A$ is also a PID.
That's the best way to use the fact that $A[x]$ is a PID that I've found so far. Now I feel like there must be a trick to show that if $a \neq 0$ then $a = 1$, but I don't know how to do this. Any hints?

REPLY [5 votes]: $1=\dim(A[x]) \geq \dim(A)+1$ gives $\dim(A)=0$, and $A$ is an integral domain, thus $A$ is a field.
The same proof a little bit more detailed: If $A$ is not a field, choose a prime ideal $\mathfrak{p} \neq 0$, then $0 \subseteq \mathfrak{p} \subseteq \mathfrak{p}[x]$ is a proper chain of prime ideals of $A[x]$. In a PID every prime ideal $\neq 0$ is maximal. Hence $A[x]$ is not a PID.