Prime Spectrum of A Ring I was given the definition that the spectrum of a ring R, denoted Spec R, is the set of the prime ideals of R. Then for an arbitrary subset $S \subseteq R$, then $V(S) = \{P \in SpecR | S \subseteq R \}$. 
I am confused by what a set of ideal would mean. Here it seems that this is a variety--but that does not make sense to me. Could someone please explain? 
Thank you!
 A: The spectrum originated in algebraic geometry. Suppose $f(X_1,X_2,\dots,X_n)$ is an irreducible polynomial in $n$ variables over the field $k$ and let $I$ be the principal ideal generated by $f$. Then the ring $R=k[X_1,X_2,\dots,X_n]/I$ “encodes” the hypersurface defined by the polynomial.
A point $(a_1,a_2,\dots,a_n)\in k^n$ belonging to this hypersurface corresponds to the maximal ideal 
$$
\frac{(X_1-a_1,X_2-a_2,\dots,X_n-a_n)}{I}
$$
whereas a prime ideal in $R$ corresponds to an irreducible subvariety of the hypersurface. So the spectrum not only encodes points of the variety, but also its irreducible subvarieties.
The arbitrary subset $S\subseteq R$ can be substituted by the ideal $(S)$ generated by $S$ and $V(S)=V((S))$. By Hilbert's basis theorem $(S)$ is generated by a finite number of polynomials, so it corresponds to a non necessarily irreducible subvariety and so $V((S))$ is the set of irreducible subvarieties contained in this subvariety.
Of course this can be generalized starting from any irreducible variety, not only a hypersurface, in exactly the same fashion.
It was Grothendieck's intuition, surely influenced by earlier studies by Zariski, that this encoding could be fruitful, connecting algebraic geometry to topology (because the space of irreducible subvarieties or, equivalently, of prime ideals can be given a topology using the sets $V(S)$ as closed sets) and indeed it has been, leading to the theory of schemes.
