Why do we need prime ideals in the spectrum of a ring?

The historical genesis of algebraic geometry is considering the solutions of some finite collection of polynomials inside $k^n$ for $k$ an algebraically closed field. One can check that in this scenario that the irreducible closed sets which are given by the vanishing locus of a finite collection of polynomials exactly correspond to the prime ideals of $k[x_1,\cdots,x_n]$. So if we want to try and generalize beyond $k^n$, this would be a good avenue to explore. More details on wikipedia and probably in every algebraic geometry book.

To see why taking the closed subsets of $\operatorname{Spec} A$ to be $V(I):=\{\mathfrak{p}\in A\mid I\subset \mathfrak{p}\}$ behaves appropriately under arbitrary intersection, let $\{I_t\}_{t\in T}$ be a family of ideals of $A$. Then $\bigcap_{t\in T} V(I_t)$ is the collection of prime ideals which contain all of these $I_t$, which is equivalent to the prime ideals containing the sum $\sum_{t\in T} I_t$. Since the sum of ideals is always an ideal, we see that the sets of the form $V(I)$ are closed under arbitrary intersection and $\bigcap_{t\in T} V(I_t)=V(\sum_{t\in T} I_t)$. On the other hand, they do not behave correctly under arbitrary union: if $\{I_t\}_{t\in T}$ is as before but we take $\bigcup_{t\in T} V(I_t)$, we now want to think about the prime ideals which contain the intersection of all $I_t$. As mentioned in another answer, the ideals $I_t=(z-t)$ for $A=\Bbb C[z]$ and $t\in T=\Bbb Z$ have intersection zero, which is not equal to $\bigcup_{t\in T} V(I_t)$. So $\bigcup_{t\in T} V(I_t)\neq V(\bigcap_{t\in T} I_t)$ and it would be inappropriate to choose $V(I)$ to be the open subsets.

(I should also point out that your "proof" contains a couple rather serious mistake: the correct way to put ideals together is to take their sum, not their union. Also, the correct way to intersect ideals is to take their intersection, not their product. Both ideas work correctly in some cases but fail badly in general, and one should do the correct thing.)

For #3, the symbol "$V$" stands for "vanishing set". This started as a hold-over from the old days of algebraic geometry, because we would literally ask about where our collection of polynomials all vanished in $k^n$. In the modern language of schemes, in order to say that $\mathfrak{p}\in V(I)$, we can ask about when all elements of $I$ vanish in the ring $A_{\mathfrak{p}}/\mathfrak{p}$, the residue field at the point $\mathfrak{p}$ (where $\mathfrak{p}$ is a prime ideal). NB: once you start thinking about more than just sets, you'll need to be a little more careful here - see this recent answer of mine for more details if you wish.


It is not true that the union of an infinite family of sets of the form $V(I)$ is necessarily of the form $V(I)$. For example, let $R = \mathbb{C}[x]$ and let $I_n$ be the principal ideal generated by $(x-n)$. Then the intersection of all the $I_n$ as $n$ varies over the integers is zero (no nonzero polynomial has infinitely many roots), but the union of the $V(I_n)$ isn't all of $\text{Spec}(R)$ (since the polynomial $(x - 1/2)$ isn't in any of them for example).