-1

Let $(X,d)$ be a metric space an $p\in X$ be any point. I want to show that a function $f:X\to\mathbb R$ defined by $f(x)=d(x,p)$ is continuous.

My attempt:

Let $G\subseteq\mathbb R$ be open and nonempty. It suffices to show that $U=f^{-1}(G)$ is open. Let $u_0\in U$. We have $u_0\in f^{-1}(G)$, so $f(u_0)\in G$. $f(u_0)$ is an element of the open set $G$. It follows that there is some $r>0$ so that $(f(u_0)-r,f(u_0)+r)\subseteq G$. Then, $u_0\in f^{-1}((f(u_0)-r,f(u_0)+r))\subseteq f^{-1}(G)=U$...

I am not sure what to do after this point. I need to find an open interval that contains $u_0$ and fits in $U$. Any ideas?

  • 1
    Something stronger is true - $d: X \times X \to \Bbb R$ is a continuous function. (In some sense this is what defines the topology of $X$). See discussion here, here, here. – Izaak van Dongen Dec 04 '23 at 23:06
  • "I need to find an open interval that contains $u_0$ and fits in $U$." What is an open interval in a metric space $X$? You need to find an open ball. – Paul Frost Dec 04 '23 at 23:54

1 Answers1

1

assume $G$ to be an open interval: $(a,b)$. now you only need to show $U$ is open. you don't need to consider all open sets since every open set is a union of open intervals, so if you prove the inverse image of an open interval is open, then it follows that the inverse image of any open set is also open. in other words if $V$ is open we have: $$f^{-1}(V) =f^{-1}(\bigcup_{i \in \lambda}(a_i,b_i))=\bigcup_{i \in \lambda} f^{-1}((a_i,b_i))$$

$U=f^{-1}(G)$ consists of $x$ such that $x$ has a distance from $p$ between $a$ and $b$. now try to show that U is open.