TITLE: Can the completion of a domain be a non-domain?
QUESTION [11 upvotes]: Suppose $R$ is a domain, finitely generated over an algebraically closed field, and $\mathfrak{m}\subset R$ is a maximal ideal. Is $\underleftarrow{\lim} R/\mathfrak{m}^n$ necessarily a domain?

REPLY [10 votes]: The two examples given by Qiaochu are singular points, one gives rise to a domain when passing to the completion but not the other. What makes the difference ? 
Consider the normalization morphism of $\mathrm{Spec}(R)$. In both cases the normalization is the affine line parametrized by $t:=y/x$. For the first curve, there are two points in the affine line lying over the singular point $x=y=0$: they are given by $t=1$ and $t=-1$. In the second case, there is only one point $t=0$ lying over the singular point. This actually characterizes the integrality: 

Let $A$ be a noetherian integral domain. Suppose $A$ is excellent (e.g. $A$ is a localization of a finitely generated algebra over either a field or $\mathbb Z$). Let $B$ be the integral closure of $A$. Let $m$ be a maximal ideal of $A$. Then the $m$-adic completion $\hat{A}$ is a domain if and only if there is only one maximal ideal of $B$ lying over $m$.  

Proof. By the excellent hypothesis, $B$ is finite over $A$. Let $m_1, \dots, m_n$ be the maximal ideals of $B$ lying over $A$. A second fact resulting from the excellent hypothesis is that $B$ is excellent, and the normalization commutes with the completion. In particular, the ($m_i$-adic) completion of $B_{m_i}$ is integrally closed. It is an integral domain because it is integrally closed and connected (it is a local ring). 
Let $K=\mathrm{Frac}(A)$. Then $B\subseteq K$. By the flatness of $A\to \hat{A}$, we have 
$$\hat{A}\subseteq \hat{A}\otimes_A B\subseteq \hat{A}\otimes_A K\subseteq \mathrm{Frac}(\hat{A})$$
where the last Frac denotes the total ring of fractions. We conclude that $\hat{A}$ is a domain if and only if $\hat{A}\otimes_A B$ is a domain. 
Finally, as a general fact, there is a canonical isomorphism 
$$ \hat{A}\otimes_A B \simeq \hat{B}=\prod_{1\le i\le n} \widehat{(B_{m_i})}$$
where $\hat{B}$ denotes the $mB$-adic completion of $B$. Therefore,  $\hat{A}\otimes_A B$ (hence $\hat{A}$) is a domain if and only if $n=1$.