TITLE: If $R$ is an integral domain, then $R[[x]]$ is an integral domain
QUESTION [14 upvotes]: While solving another problem (specifically Exercise 7.2 in Atiyah & Macdonald's Introduction to  Commutative Algebra), I got stuck in the following step:

If $R$ is an integral domain, how I can prove that $R[[x]]$ is an
  integral domain?

Here $R[[x]]$ is the set of all formal series in $x$ with coefficients in $R$. So typical element of $R[[x]]$ would have the form $a_0+a_1x+a_2x^2+\cdots$ where $a_i\in R$.
So I need to prove that if
$$
(a_0+a_1x+a_2x^2+\cdots)(b_0+b_1x+b_2x^2+\cdots)=0
$$
then $a_i=0$ and $b_i=0$ for all $i\ge 0$. Now, I am not particularly fond of opening up those brackets :( Is there any slick way of proving this?

REPLY [27 votes]: Choose $f,g \in R[[x]]$ that are non-zero. With $f = a_0 + a_1x + \ldots$ and $g = b_0 + b_1x + \ldots$ let $a_i$ and $b_j$ be respectively the coefficients of the smallest non-zero terms in $f$ and $g$. Then $fg = a_ib_jx^{i+j} + \text{(higher order terms)}$ and thus is non-zero. Done.