Why does $I(\overline{S})=I(S)$? Let $S\subset \operatorname{Spec}A$, where $A$ is a commutative ring with $1$. Define $I(S)$ to be the set of functions vanishing on $S$. In other words, $I(S)=\bigcap_{P\in S}P\subset A$. Why is it true that $I(\overline{S})=I(S)$? Here $\overline{S}$ denotes the Zariski closure of $S$.
One inclusion is clear to me. Namely, since $I(\cdot)$ is inclusion reversing, we have $I(\overline{S})\subset I(S)$.
However, why is the reverse inclusion true?
 A: $T\subseteq \operatorname{Spec}A$ is a closed set iff it is of the form
$$
V(J) = \{P \in \operatorname{Spec}A\mid J\subseteq P\}
$$
for some ideal $J\subseteq A$. The closure $\overline S$ is the intersection of all such sets that contain $S$. And we have $S\subseteq V(J)$ iff $J\subseteq \bigcap S=I(S)$.
Now note that for any set $\{I_i\}_i$ of ideals in $A$, we have
$$
\bigcap_iV(I_i) = V\left(\sum_iI_i\right)
$$
So we are after the sum of all ideals that contain the intersection of $S$. But the intersection of $S$ is an ideal. So really, the closure of $S$ is just
$$
V\left(I(S)\right) = \{R\in\operatorname{Spec}A\mid{}I(S)\subseteq R\}
$$
From here, the conclusion follows immediately.
A: Given $f \in I(S)$, then $V(f) \supseteq S$. Since $\overline{S}$ is the smallest closed set containing $S$, then $S \subseteq \overline{S} \subseteq V(f)$. Thus $f \in \mathfrak{p}$ for every $\mathfrak{p} \in \overline{S}$, so $f \in \bigcap_{\mathfrak{p} \in \overline{S}} \mathfrak{p} =  I(\overline{S})$.
