TITLE: Prove that if $f(x_n) \rightarrow f(x)$ for every continuous real-valued function in the metric space M, $x_n \rightarrow x$ on M.
QUESTION [5 upvotes]: The problem goes like: Suppose that we are given a point $x$ and a sequence $x_n$ in a metric space $M$, and suppose that  $f(x_n) \rightarrow f(x)$ for every continuous real-valued function $f$ on $M$. Prove that $x_n \rightarrow x$ in $M$.
I was thinking that since the $f(x_n) \rightarrow f(x)$ for EVERY $f$, then we can find one with a continuous inverse (could it just be $f(x) = x$?). Then since both $f$ and $f^{-1}$ are continuous and also $f$ is bijective, it is a homeomorphism. Therefore, the preimage converges based on the fact that $f$ being a homeomorphism. Is this correct?

REPLY [9 votes]: $M$ is a metric space. Therefore it has a distance function, $d$, which is continuous if we fix one variable. Hence
$$ d_x(y) := d(x,y) $$
is a continuous function in $y$. But then $d_x(x)=0$, and $x_n \to x$ iff $d_x(x_n) \to 0$.