Ideals in $C(X)$ Let $X$ be a Hausdorf Compact topological space.  Please help me to show, for the purpose of understanding an example in some of my lecture notes, that the closed ideals in $C(X)$ are of the following form:
$I_C=\{f|f(C)={0\}}$ and $C$ is a closed set.
What I have done so far is to show that $I_C$ is a closed ideal, and that if $I$ is an ideal, then I should define $C$ to be the vanishing set of $I$, which is closed.  I can then see that $I$ is contained in $I_C$.  I then try to do a sort of urysohn/partition of unity argument to show that if $f$ is in $I_C$ i.e. it vanishes on C that I can write it in terms of things in I.  That's where I struggle.
Thanks.
 A: I suppose this is the analysts' version of Hilbert's nullstellensatz.  Here's a proof that I think I learned from one of the standard analysis books, though I don't remember which one:
Let $f$ be a function which vanishes on the vanishing locus of $I$.  Fix $\epsilon > 0$ and let $U$ denote the set of all points $x$ where $|f(x)| < \epsilon$.  $U$ is open, so its complement $K$ is closed and hence compact.  Note that $U$ contains the vanishing locus of $f$ which contains the vanishing locus of $I$, so for every $y$ in $K$ there is a function $g_y$ in $I$ such that $g_y$ is nonvanishing on a neighborhood $V_y$ of $y$.  The open sets $V_y$ cover $K$, so there is a finite subcover $V_{y_1}, \ldots, V_{y_n}$.  Define a new function $g$ in $I$ by $g(x) = g_{y_1}(x)^2 + \ldots + g_{y_n}(x)^2$.  
Notice that for each integer $n$ the function $1 + ng$ is nowhere vanishing and hence $1/(1 + ng)$ is a continuous function on $X$.  Thus $f_n := f \frac{ng}{1 + ng}$ is a sequence of functions in $I$; I claim that $f_n$ is within $2\epsilon$ of $f$ for $n$ sufficiently large.  Indeed, for $x \in U$ we have $|f(x) - f_n(x)| < 2 \epsilon$ for all $n$ since $|f(x)| < \epsilon$ and $0 \leq \frac{ng}{1 + ng} \leq 1$.  For $x \in K$ we have that $|f(x) - f_n(x)| < 2 \epsilon$ for $n$ sufficiently large (independent of $x$) since $\frac{ng}{1 + ng}$ converges uniformly to $1$ on $K$.  This completes the proof.
