The title question says it all: if $X$ is a topological space, then a subset $Z$ of $X$ is a zero set if there is a continuous function $f: X \rightarrow \mathbb{R}$ with $Z = f^{-1}(0)$.
Now I know the following:
- Every zero set is a closed subset.
- Every closed subset is a zero set iff $X$ is perfectly normal, e.g. if $X$ is metrizable.
- Every closed subset is an intersection of zero sets iff $X$ is Tychonoff.
What I want to know is whether there is a similarly clean characterization of topological spaces $X$ such that for every point $x \in X$, there is a continuous function $f: X \rightarrow \mathbb{R}$ vanishing only at $x$. In particular, is there a compact (Hausdorff!) space that does not have this property?
Added: Having gotten some nice answers, maybe I should say a little more about my ulterior motive (which is sort of a motive in a teapot). I was mulling over a recent note of B. Sury in which he shows that in the ring $C([0,1])$ of continuous functions $f: X \rightarrow [0,1]$, for any $c \in [0,1]$, the maximal ideal $\mathfrak{m}_c$ of all functions vanishing at $c$ is not only infinitely generated (as is standard: I think this was a question on a qualifying exam I took as a graduate student!) but uncountably generated. I was thinking of generalizations to rings of continuous functions on other spaces $X$.
There is, it seems to me, a very small gap in his proof: about the function $f$ he constructs, he writes "since $f$ vanishes only at $c$". He hasn't argued for this, and depending on the choices of the sequence $\{f_n\}$, $f$ might vanish at other points. But no problem: if $\mathfrak{m}_c = \langle f_1,\ldots,f_n,\ldots \rangle$, since there is obviously some continuous function on $[0,1]$ which vanishes only on $c$ (e.g. $I(x) = |x-c|$), if $\bigcap_{n=1}^{\infty} f_n^{-1}(0) \supsetneq \{c\}$ then these functions cannot generate $\mathfrak{m}_c$.
If I am not mistaken, the following is a straightforward generalization of Sury's result.
Theorem: Let $X$ be a compact (Hausdorff!) space, and let $c \in X$. Suppose that there is a continuous function $I: X \rightarrow \mathbb{R}$ such that $I^{-1}(0) = \{c\}$. Then the following are equivalent:
(i) The point $c$ is isolated in $X$.
(ii) The ideal $\mathfrak{m}_c$ is principal.
(iii) The ideal $\mathfrak{m}_c$ is finitely generated.
(iv) The ideal $\mathfrak{m}_c$ is countably generated.
Well, this would be a better result without the weird hypothesis about the existence of $I$. Hence the question. (Maybe someone can see a better way to get around this hypothesis or replace it with something more natural...)
By the way, compactness also feels a little too strong here. This is being used to ensure that $C(X)$ is a Banach space under the supremum norm, but maybe there's a way around this as well.