prime spectrum
1 Spec as a set
Let $R$ be any commutative ring with identity^{}. The prime spectrum $\mathrm{Spec}(R)$ of $R$ is defined to be the set
$$\{P\u228aR\mid P\text{is a prime ideal of}R\}.$$ 
For any subset $A$ of $R$, we define the variety^{} of $A$ to be the set
$$V(A):=\{P\in \mathrm{Spec}(R)\mid A\subset P\}\subset \mathrm{Spec}(R)$$ 
It is enough to restrict attention to subsets of $R$ which are ideals, since, for any subset $A$ of $R$, we have $V(A)=V(I)$ where $I$ is the ideal generated by^{} $A$. In fact, even more is true: $V(I)=V(\sqrt{I})$ where $\sqrt{I}$ denotes the radical^{} of the ideal $I$.
2 Spec as a topological space
We impose a topology^{} on $\mathrm{Spec}(R)$ by defining the sets $V(A)$ to be the collection^{} of closed subsets of $\mathrm{Spec}(R)$ (that is, a subset of $\mathrm{Spec}(R)$ is open if and only if it equals the complement^{} of $V(A)$ for some subset $A$). The equations
$\bigcap _{\alpha}}V({I}_{\alpha})$  $=$  $V\left({\displaystyle \bigcup _{\alpha}}{I}_{\alpha}\right)$  
$\bigcup _{i=1}^{n}}V({I}_{i})$  $=$  $V\left({\displaystyle \bigcap _{i=1}^{n}}{I}_{i}\right),$ 
for any ideals ${I}_{\alpha}$, ${I}_{i}$ of $R$, establish that this collection does constitute a topology on $\mathrm{Spec}(R)$. This topology is called the Zariski topology^{} in light of its relationship to the Zariski topology on an algebraic variety (see Section^{} 4 below). Note that a point $P\in \mathrm{Spec}(R)$ is closed if and only if $P\subset R$ is a maximal ideal^{}.
A distinguished open set of $\mathrm{Spec}(R)$ is defined to be an open set of the form
$$\mathrm{Spec}{(R)}_{f}:=\{P\in \mathrm{Spec}(R)\mid f\notin P\}=\mathrm{Spec}(R)\setminus V(\{f\}),$$ 
for any element $f\in R$. The collection of distinguished open sets forms a topological basis for the open sets of $\mathrm{Spec}(R)$. In fact, we have
$$\mathrm{Spec}(R)\setminus V(A)=\bigcup _{f\in A}\mathrm{Spec}{(R)}_{f}.$$ 
The topological space $\mathrm{Spec}(R)$ has the following additional properties:
 •

•
A subset of $\mathrm{Spec}(R)$ is an irreducible^{} closed set if and only if it equals $V(P)$ for some prime ideal^{} $P$ of $R$.

•
For $f\in R$, let ${R}_{f}$ denote the localization^{} of $R$ at $f$. Then the topological spaces $\mathrm{Spec}{(R)}_{f}$ and $\mathrm{Spec}({R}_{f})$ are naturally homeomorphic^{}, via the correspondence sending a prime ideal of $R$ not containing $f$ to the induced prime ideal in ${R}_{f}$.

•
For $P\in \mathrm{Spec}(R)$, let ${R}_{P}$ denote the localization of $R$ at the prime ideal $P$. Then the topological spaces $V(P)\subset \mathrm{Spec}(R)$ and $\mathrm{Spec}({R}_{P})$ are naturally homeomorphic, via the correspondence sending a prime ideal of $R$ contained in $P$ to the induced prime ideal in ${R}_{P}$.
3 Spec as a sheaf
For convenience, we adopt the usual convention of writing $X$ for $\mathrm{Spec}(R)$. For any $f\in R$ and $P\in {X}_{f}$, let ${\iota}_{f,P}:{R}_{f}\u27f6{R}_{P}$ be the natural inclusion map^{}. Define a presheaf^{} of rings ${\mathcal{O}}_{X}$ on $X$ by setting
$${\mathcal{O}}_{X}(U):=\left\{({s}_{P})\in \prod _{P\in U}{R}_{P}\right\text{}\text{U has an open cover { X f \alpha } with elements \u2208 s \alpha R f \alpha such that = s P \u2062 \iota f \alpha , P ( s \alpha ) whenever \u2208 P X f \alpha}\text{}\},$$ 
for each open set $U\subset X$. The restriction^{} map ${\mathrm{res}}_{U,V}:{\mathcal{O}}_{X}(U)\u27f6{\mathcal{O}}_{X}(V)$ is the map induced by the projection map
$$\prod _{P\in U}{R}_{P}\u27f6\prod _{P\in V}{R}_{P},$$ 
for each open subset $V\subset U$. The presheaf ${\mathcal{O}}_{X}$ satisfies the following properties:

1.
${\mathcal{O}}_{X}$ is a sheaf.

2.
${\mathcal{O}}_{X}({X}_{f})={R}_{f}$ for every $f\in R$.

3.
The stalk ${({\mathcal{O}}_{X})}_{P}$ is equal to ${R}_{P}$ for every $P\in X$. (In particular, $X$ is a locally ringed space.)

4.
The restriction sheaf of ${\mathcal{O}}_{X}$ to ${X}_{f}$ is isomorphic^{} as a sheaf to ${\mathcal{O}}_{\mathrm{Spec}({R}_{f})}$.
4 Relationship to algebraic varieties
$\mathrm{Spec}(R)$ is sometimes called an affine scheme^{} because of the close relationship between affine varieties^{} in ${\mathbb{A}}_{k}^{n}$ and the $\mathrm{Spec}$ of their corresponding coordinate rings. In fact, the correspondence between the two is an equivalence of categories, although a complete^{} statement of this equivalence requires the notion of morphisms of schemes and will not be given here. Nevertheless, we explain what we can of this correspondence below.
Let $k$ be a field and write as usual ${\mathbb{A}}_{k}^{n}$ for the vector space ${k}^{n}$. Recall that an affine variety $V$ in ${\mathbb{A}}_{k}^{n}$ is the set of common zeros of some prime ideal $I\subset k[{X}_{1},\mathrm{\dots},{X}_{n}]$. The coordinate ring of $V$ is defined to be the ring $R:=k[{X}_{1},\mathrm{\dots},{X}_{n}]/I$, and there is an embedding^{} $i:V\hookrightarrow \mathrm{Spec}(R)$ given by
$$i({a}_{1},\mathrm{\dots},{a}_{n}):=({X}_{1}{a}_{1},\mathrm{\dots},{X}_{n}{a}_{n})\in \mathrm{Spec}(R).$$ 
The function $i$ is not a homeomorphism, because it is not a bijection (its image is contained inside the set of maximal ideals of $R$). However, the map $i$ does define an order preserving bijection between the open sets of $V$ and the open sets of $\mathrm{Spec}(R)$ in the Zariski topology. This isomorphism^{} between these two lattices of open sets can be used to equate the sheaf $\mathrm{Spec}(R)$ with the structure sheaf of the variety $V$, showing that the two objects are identical in every respect except for the minor detail of $\mathrm{Spec}(R)$ having more points than $V$.
The additional points of $\mathrm{Spec}(R)$ are valuable in many situations and a systematic study of them leads to the general notion of schemes. As just one example, the classical Bezout’s theorem is only valid for algebraically closed fields, but admits a scheme–theoretic generalization^{} which holds over non–algebraically closed fields as well. We will not attempt to explain the theory of schemes in detail, instead referring the interested reader to the references below.
Remark. The spectrum $\mathrm{Spec}(R)$ of a ring $R$ may be generalized to the case when $R$ is not commutative^{}, as long as $R$ contains the multiplicative identity^{}. For a ring $R$ with $1$, the $\mathrm{Spec}(R)$, like above, is the set of all proper prime ideals of $R$. This definition is used to develop the noncommutative version of Hilbert’s Nullstellensatz.
References
 1 Robin Hartshorne, Algebraic Geometry^{}, Springer–Verlag New York, Inc., 1977 (GTM 52).
 2 David Mumford, The Red Book of Varieties and Schemes, Second Expanded Edition, Springer–Verlag, 1999 (LNM 1358).
 3 Louis H. Rowen, Ring Theory, Vol. 1, Academic Press, New York, 1988.
Title  prime spectrum 

Canonical name  PrimeSpectrum 
Date of creation  20130322 12:38:07 
Last modified on  20130322 12:38:07 
Owner  CWoo (3771) 
Last modified by  CWoo (3771) 
Numerical id  16 
Author  CWoo (3771) 
Entry type  Definition 
Classification  msc 14A15 
Related topic  Scheme 
Related topic  Sheaf 
Related topic  ZariskiTopology 
Related topic  LocallyRingedSpace 
Defines  distinguished open set 