Let $X$ be an arbitrary topological space. If $X$ is locally compact and Hausdorff, then $C_0 (X)$ (space of continuous functions vanishing at infinity) is a $C^*$-sub-algebra of $C^b (X)$ (space of all bounded continuous functions).
Now, my question is how necessary these conditions "locally compact" and "Hausdorff" are for the above statement to be true.
If we take $X= \mathscr{H}$, an infinite dimensional Hilbert space, and consider the closed unit ball $B(0,1)\subset \mathscr{H}$, then the following function $$f(x)= \frac{1}{||x||},\, x\in B(0,1)^c\\ =1,\,x\in B(0,1)$$ is in $C^b (X)$, but not in $C_0 (X)$.
But it merely shows the proper containment of $C_0 (X)$ in $C^b (X)$. I think it is a right direction, but really I am confused here. I actually need an example of a topological space $X$ such that $C_0 (X)$ is not a $C^*$-sub-algebra of $C^b (X)$.
Thank you.
As Eric Wofsey noted here, $C_0(X)$ is still a $C^\ast$ algebra for any $X$.
In the development of a useful theory it is quite important that $X$ be locally compact Hausdorff because this ensures that we have enough functions in $C_0(X)$ to be useful, e.g. if we only assume $X$ to be some $T_3$ topological space, it could happen that $C(X)$ only contains constant functions so is just $\mathbb R$ essentially and $C_0(X)$ would only be $\{0\}$. So in order to be able to prove useful facts in$C^\ast$-algebras conditions on $X$ have to be imposed. Local compactness plus Hausdorff ensures enough functions and the existence of a one-point compactification that allows us sometimes to switch (to understand $C_0(X)$) to the classical best-understood case of $C(\alpha X)$ for $\alpha X$ compact Hausdorff (which has nice duality theorems etc.)