Prove that $X$ is Hausdorff Hello I have problems with this exercise
Let $X$ a space topology such that for each $x \in{X}$ there is a continuous function:
$$f_x : X \longrightarrow{\mathbb{R}}$$
such that $f_x(0)^{-1} = \{ x \}$. Prove that $X$ is Hausdorff.
My attempt
Let $y\neq x$, if $f_x(y)=a$ we have that $f_x^{-1}((a-|a|/3,a+|a|/3))$ (How do I check this?) and $ f_x^{-1}((-|a|/3,|a|/3))$ are open sets $x$ , $y$
Thanks
 A: Hint. There is an obvious continuous map
$$X \to \prod_{f : X \to \mathbb{R} \text{ continuous}} \mathbb{R}.$$
which is injective by assumption. Then use the following easy facts:

*

*Products of Hausdorff spaces are Hausdorff.

*Any space which admits an injective continuous map into a Hausdorff space is also Hausdorff.

A: Your proof is absolutely correct. You know that $f_x(y) \ne 0 = f_x(x)$ if $y \ne x$. Now there is no need to specify explicitly disjoint open neighborhoods of $f_x(y)$ and $f_x(x)$; since $\mathbb R$ is Hausdorff, we know that there exist such. Their preimages under $f_x$ are then disjoint open neighborhoods of $y$ and $x$.
A: The proof in your question is a perfectly good solution to the task.
The two open intervals you have written are clearly disjoint and contain $f_x(x)$ and $f_x(y)$, respectively, and by definition of $f_x$ being continuous, their preimages must be open in $X$.
A: Let $x \in X$, $y \in X \smallsetminus \{x\}$, and let $a = f(y)$.  Observe $a \neq 0$ because $y \not\in f_x^{-1}(0)$.  If $a < 0$,
$$  a - |a|/3 < a + |a|/3 < -|a|/3 < |a|/3  \text{,}  $$
and if $a > 0$,
$$  -|a|/3 < |a|/3 < a - |a|/3 < a + |a|/3  \text{.}  $$
So $I' = (-|a|/3 , |a|/3)$ and $J' = (a - |a|/3, a + |a|/3)$ are disjoint, nonempty open intervals in $\Bbb{R}$.  Let $I = f_x^{-1}(I')$ and $J = f_x^{-1}(J')$.
Since $f$ is continuous, $I$ and $J$ are open in $X$.  Since $I'$ and $J'$ are disjoint, $I$ and $J$ are disjoint.  Notice $x \in I$ and $y \in J$, so $I$ and $J$ are disjoint open neighborhoods of $x$ and $y$, respectively, in $X$.  Therefore, $X$ is Hausdorff.
