There's a question on which I am really stuck, but probably the answer might be very easy. Here is the statement. Consider ($\mathbb{R}^{n},d)$ [where $d$ is the Euclidean metric]. Let $x_{1}$ and $x_{2}$ be two distinct vectors in $\mathbb{R}^{n}$. The question is to show that there's a continuous map $f:\mathbb{R}^{n} \to [0,1]$ (with the absolute value metric) such that $f(x_{1})=0$ and $f(x_{2})=1$. Any hint?

  • 1
    $\begingroup$ Use a scaling operation to make $x_1$ and $x_2$ a distance of $1$ away from each other and then rotate the line between them to line up with the $x$ axis. Then contract the space down to the $x$ axis. By the $x$ axis I mean the $x_1$ out of $x_1 ... x_n$. $\endgroup$ – John Douma Sep 12 '15 at 3:02

Let $r = d(x_1, x_2)$. Then set $$ f(x) = \begin{cases} 1 - \frac{2d(x,x_2)}{r} \quad (d(x,x_2) < \frac{r}{2}) \\ 0 \quad \text{otherwise} \end{cases} $$ This works in arbitrary metric spaces.

  • $\begingroup$ Nice answer and thank you for your comment! $\endgroup$ – Rudy the Reindeer Sep 12 '15 at 3:38

Another way:


This also works in general metric spaces, and also works if $x_1$ and $x_2$ are replaced with closed disjoint sets. This is called a Urysohn Function.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.