TITLE: What does the topology on $\operatorname{Spec}(R)$ tells us about $R$?
QUESTION [35 upvotes]: Let $R$ be a commutative ring with a unit. $\newcommand{\spec}{\operatorname{Spec}}\spec(R)$ denotes the set of all prime ideals in $R$, and it can be topologized using the Zariski topology.
Last year I took a course in commutative algebra, and we had some exercises proving that $\spec(R)$ is always $T_0$, and sometimes is or is not $T_1$. And I had spent a good deal of brain cycles in understanding how convergence looks like in $\spec(\Bbb Z)$ (not because anyone asked, I just wanted to figure this out). We never really went anywhere deeper than a few homework questions about the possible topological structure of $\spec(R)$ and $\spec_\max(R)$.
But now I am wondering, what does the topology tell us about $R$? Does the fact that a certain net of ideals converges tells us anything useful? Or are there general constructions in algebra which exploit certain properties of the topology on $\spec(R)$ for one thing or another?

REPLY [10 votes]: The simplest answer is that, when $R=k[x_1,\ldots,x_n]$, $k$ algebraically closed, we can identify $\newcommand{\spec}{\operatorname{Spec}}\spec R$ with $k^n$. The elements of $\operatorname{max}\spec(R)$ correspond to the points themselves, while other primes correspond to irreducible algebraic sets; that is, zero-loci of irreducible polynomials.
In short, $\spec$ turns rings into geometric objects, and both geometric intuition and geometric proofs can hold even when $R$ is not a finitely-generated algebra over a field. For example, as a number theorist, I'm always looking at rings of integers, which are Dedekind rings, and I can imagine them as curves $\spec k[x]$, where primes correspond to points. (Taking the analogy further, and thinking of archimedean absolute values as those points not on the curve but on its projective closure leads down another very fruitful avenue, but too far astray from the present conversation.)
If we think of $\spec$ in this way, we get a rather coarse, quasi-compact topological space, which is just fine enough to say things like "a homomorphism $A\to B$ induces a continuous map $\spec B\to \spec A$.
Here's one example of how this can be useful: when $A$ is a domain, open sets in $\spec A$ are dense, and the image of a continuous map on a dense set determines the image of that map everywhere. Since a basis of open sets can be given by $\spec A[\frac{1}{f}]$, this is already enough to prove the universal property of localization. These sorts of density arguments appear all the time in algebraic geometry.