Map to localization is injective on spectra

Set-theoretic statement
Suppose $$R$$ is a commutative unital ring, $$U$$ is a multiplicatively closed subset of $$R$$ and $$S = U^{-1}R$$ is the localization of $$R$$ at the multiplicatively closed subset $$U$$. Then the induced map on spectra:

$$Spec(S) \to Spec(R)$$

is injective. In fact:


 * The image of this map is those primes $$P$$ that are disjoint from $$U$$
 * The inverse image of a prime ideal $$P$$ is precisely the prime ideal $$U^{-1}P$$ i.e. the extension of $$P$$ to $$S$$

Topological statement
Further, it is also true that the topology on $$Spec(S)$$ is such that if we give the subspace topology to its image in $$Spec(R)$$, the map is a homeomorphism.

Some preliminary observations

 * The extension of an ideal $$I$$ of $$R$$, to the ring $$S = U^{-1}R$$, is the ideal $$U^{-1}I$$ of $$S$$
 * If any ideal of $$R$$ intersects the multiplicatively closed subset $$U$$, then its extension to $$S = U^{-1}R$$ is the whole ring $$U^{-1}R$$. Hence, it does not occur as the contraction of any ideal of $$S$$

Proof: If $$I$$ is an ideal of $$R$$ such that $$I \cap U$$ is nonempty, then pick $$u \in I \cap U$$. Clearly, we have:

$$1 = \frac{u}{u} \in U^{-1}I = I^{e}$$

Thus, $$1$$ is in the extension of $$I$$ to $$S$$.
 * The converse is not true for arbitrary ideals; however, it is true for prime ideals (it is true for all ideals if $$U$$ is a saturated subset). Formally, if $$P$$ is a prime ideal of $$R$$ such that $$U \cap P$$ is empty, then the extension of $$P$$ to $$S$$ is not the whole ring. Moreover, $$P$$ equals the contraction of its extension to $$S$$.

Proof: Consider the ideal $$U^{-1}P$$. We need to show that it contracts back to precisely $$P$$ (that'll also show that it is proper). Suppose $$a/1 \in U^{-1}P$$. We want to show that $$a \in P$$.

There exists $$b \in P, c \in U$$ such that $$a/1 = b/c$$, which in turn means there exists $$s \in U$$ such that $$acs = bs$$. The right side is in $$P$$, so the left side must also be in $$P$$. Since $$c,s \in U$$, we get $$cs \in U$$. Further, since $$U \cap P$$ is empty, we get $$cs \notin P$$, so by primeness of $$P$$, we have $$a \in P$$, as desired.