If $A$ is a domain but not a field, then $(x)$ is not a maximal ideal of $A[x]$?

The question arised when considering the equivalence: $A$ is a field if and only if $A[x]$ is a PID. Now, I know the only if part. The if part should go like this:

For any $a\in A\setminus\{0\}$, let $(a,x)=(p(x))$. Because $a\in (p(x))$ we have $p(x)=b\in A$, besides $x\in (b)$ implies $b\in A^*$ and thus $(a,x)=(b)=A[x]$. In particular $1\in (a,x)$, hence $a\in A^*$. Therefore $A$ is a field.

Is it correct?

But here's the main point of my question. My book mentions a contrapositive approach: if $A$ is a domain but not a field then $A[x]$ is a domain but not a PID, because $x$ is irreducible but $(x)$ is not maximal. How to show this?

The element $x$ is obviously irreducible in any ring $A[x]$, where $A$ is a domain, because proper factors would have degree $0$.
The ideal $(x)$ has the property that $$A[x]/(x)\cong A$$ so $(x)$ is maximal if and only if $A$ is a field.
• To add to this, note that "the integer polynomials with all even coefficients," written formally as $2\mathbb{Z}[x]$, is the ideal generated by 2 and $x$. This should serve to help your intuition. – Tom Gannon Jul 11 '17 at 16:53
• If I'm understanding correctly, $A[x]/(x)=\{[a] | a\in A\}$which is indeed isomorphic to $A$. So if two sets are isomorphic, they have absolutely the same structure? – Richard Jul 11 '17 at 16:54
• @Richard Yes, with respect to properties that can be expressed in the language of rings; in particular, if $A\cong B$, then $A$ is a field if and only if $B$ is a field. – egreg Jul 11 '17 at 17:00
• Sorry, my comment should say "polynomials in $\mathbb{Z}$ with $x^0$ coefficient even". – Tom Gannon Jul 11 '17 at 17:47