Ideal in $C(X)$ Let $X$ be a compact Hausdorff space, and $C(X)$ the space of complex-valued continuous functions with maximum-norm.
The following problem is driving me little nuts. I want to show that every closed Ideal $J\subset C(X)$ is of the form $J_Y = \{f\in C(X)| Y\subset f^{-1}(0)\}$ where $Y\subset X$ is some closed set. It seems that $Y=\bigcap_{f\in J}f^{-1}(0)$ is the only logical choice. Then $J\subset J_Y$ is obvious, but $J_Y\subset J$ is not so obvious. 
It seemed logical to me that if $f\in J$ then $J_{f^{-1}(0)} \subset J$, but I can't prove it. If this would be true I thought of finding a $g\in J$ such that $g^{-1}(0)=Y $ would then be sufficient. Maybe constructing a sequence of functions $g_n\in J_n\subset J$ that is 0 on some $Y_n\supset Y$ and using the fact that $J$ is closed to show $g_n\to g\in J$.
Does someone have any suggestions? I'm little stuck. 
 A: A very clean way to prove this is by invoking the Stone-Weierstrass theorem.  First note that $J$ is closed under conjugation: if $f\in J$ and $\epsilon>0$ we can take a function $g\in C(X)$ of norm $1$ which agrees with $\bar{f}/f$ everywhere that $|f|\geq\epsilon$.  Then $\|gf-\bar{f}\|\leq 2\epsilon$ and $gf\in J$, and taking $\epsilon\to 0$ we conclude that $\bar{f}\in J$.
Now let $A=\mathbb{C}+J$, the set of functions which can be written as a constant plus an element of $J$.  Every element of $A$ is constant on the set $Y$, and so we can naturally consider $A$ as a subalgebra of $C(X/Y)$, where $X/Y$ is the quotient space obtained by identifying all elements of $Y$ to a point.  Moreover, $A$ separates points of $X/Y$.  Indeed, if $x\in X\setminus Y$ we can find $f\in J$ such that $f(x)\neq 0$, separating $x$ from $Y$, and if $x,y\in X\setminus Y$ are distinct then we can find $f\in J$ not vanishing on $x$ and then multiply by $g\in C(X)$ which vanishes at $y$ but not $x$ to get $fg\in J$ separating $x$ and $y$.  Since $J$ is closed under conjugation, $A$ is thus a closed unital *-subalgebra of $C(X/Y)$ which separates points and so is all of $C(X/Y)$ by Stone-Weierstrass.
In other words, every function on $X$ which is constant on $Y$ can be written as a constant plus an element of $J$.  In particular, every function which vanishes on $Y$ must be in $J$.
A: Note that we somehow need to use that $J$ is a closed ideal in $C(X)$.
Let $V$ be open with $Y\subset V$. For any $t\in X\setminus V$, there exists $g_t\in J$ with $g_t(t)\ne0$. Let $h_t=|g_t|^2=\overline{g_t}\,g_t\in J$; then  $h_t(t)>0$ on some open set $V_t$. As $X\setminus V$ is compact, there exists a finite cover $V_{t_1},\ldots,V_{t_m}$; so $g_1=\sum_{j=1}^m h_{t_j}\in J$, and $g_1(t)>0$ for all $t\in X\setminus V$. As $X\setminus V$ is compact, there exists $k>0$ with $g_1(t)>k$ for all $t\in X\setminus V$. So the function $g_2:t\mapsto \frac1{g_1(t)}$ is continuous on $X\setminus V$.
Now we extend $g_2$ to all of $X$, using Tietze, and still call it $g_2$. Let $g_V=g_1g_2\in J$ (since $g_1\in J$). The function $g_V$ has the property that $g_V=1$ on $X\setminus V$, $g_V=0$ on $Y$, and $|g_V|\leq1$.
Now let $f\in J_Y$. Fix $\varepsilon>0$. We have $f(y)=0$ for each $y\in Y$, so there exist open neighbourhoods $V_y$ such that $|f|<\varepsilon$ on $V_y$. As $Y$ is compact (closed subset of a compact), it is covered by some finite choice of the $V_y$; the union of these furnishes an open $V$ with $|f|<\varepsilon$ on $V$. As $J$ is an ideal, $fg_V\in J$.
For any $t\in X\setminus V$, $|f(t)-f(t)g_V(t)|=0$ (as $g_V(t)=1$). For $t\in V$, $$|f(t)-f(t)g_V(t)|<2|f(t)|<2\varepsilon$$ (as $|g_V|\leq1$ everywhere and $|f|<\varepsilon$). This shows that
$$
\|f-fg_V\|<2\varepsilon.
$$
As we can do this for any $\varepsilon>0$, we have shown that $f$ belongs to the closure of $J$, i.e. $f\in J$. So $J_Y\subset J$.
What we are doing here is an explicit example of the fact that a closed ideal of a C$^*$-algebra has a quasicentral approximate identity (i.e. an approximate unit that is approximately central for the whole algebra).
