# Connected subset of Spec R

Does anyone know of an example of a commutative ring R s.t. Spec(R) has a subset X which is NOT connected, but the closure of X is?

### This post is like 3 years ago

This post is like 3 years ago. But I will answer this one, because it is easy :) Take any local ring R with $\sharp Spec(R)=2$ (for instance $\Z_{2}$). Suppose $M$ is the maximal ideal of $R$ and then take the fiber product $R\times_{{R/M}}R$ then this ring has 3 ideals two of which are minimal and one is (the only) maximal ideal containing these two minimal prime ideal. If you take $X$ to be the subset of $Spec(R)$ containing these two minimal prime ideals then you have your example.