I have just started learning about schemes, so please do not be too harsh with me. I am trying to do Exercise I-5 of Eisenbud-Harris, "The geometry of schemes".
Suppose $X$ is the topological space $\{0,1\}$, topologized with its discrete topology. The authors say that $X$ is in fact $\text{spec}(R)$ for some rings $R$, and ask us to give examples of such rings.
I have no idea of how to do this. I think there must be some identification of the prime ideals to be made, in order to only get 2 elements in the underlying topological space, but I can not see how to proceed. Would be grateful to any help.
Take $R = k\times k$ where $k$ is any field. Then $R$ has exactly two prime ideals : $k\times \{0\}$ and $\{0\}\times k$, and they are clearly maximal. So $Spec(R)$ consists of two closed points.
In general, $Spec(R_1\times R_2) = Spec(R_1)\coprod Spec(R_2)$, so you can easily build affine schemes having the connected components you want.