Let $(X; d)$ be a compact metric space. For a given $x_0 \in X$, define $C_{x_0}(X,\mathbb{R})$ by
${C}_{x_0} = \{ f \in \mathcal{C}(X,d): f(x_0) = 0 \}$.
I need to prove that $C_{x_0}(X,\mathbb{R})$ is closed in $\mathcal{C}(X,\mathbb{R})$ and that $C_{x_0}(X,\mathbb{R})$ is an ideal of $\mathcal{C}(X,R)$. How do I prove this?
Consider the linear functional $\ell$ given by $\ell(f) = f(x_0)$. Then $\ell$ is continuous and $C_{x_0} = \ell^{-1}(\{0\})$ is closed as the preimage of a closed set under a continuous map.
For the ideal property first note that $C_{x_0}$ is a subspace of $C(X, \mathbb{R})$ (by the point-wise definition of addition and scalar multiplication). Furthermore, we have $(fg)(x_0) = (gf)(x_0) = f(x_0)g(x_0) = 0$ for all $f \in C_{x_0}$ and $g \in C(X, \mathbb{R}$).