Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following question reads as

enter image description here

i) Given an example of infinite metric spaces $(X,d)$ and $(Y,\delta)$ such that every function $f\colon X\to Y$ is continuous.

ii) Is it possible to give an example where no functions $f\colon X \to Y$ are contiuous? (Or very few???)

I originally thought to have an understanding on sets and their coupled metrics. But now I am struggling to imagine what is going on here.

For question (i) I realise that I want to show that every function, $f:X \to Y$ is continuous INDEPENDENT of what $f$ actually is. Therefore, given any open set $U$ in $Y$, I am required to show that $f^{-1}(U)=V$ is always be open. Given this, I think that the metric on $Y$ is irrelevant to the open-ness of $X$. If I assign the discrete metric on $X$, I see that no matter what $f^{-1}(U)$ yields, I should always be able to have a ball of radius $\frac{1}{2}$ around each $x \in f^{-1}(U)$. Thus $f^{-1}(U)$ is open. In addition, the infinite sets I pick, can they be anything since they'll always be separated by 1? Does $\mathbb{R}$ suffice?

For question (ii) I realise that I must possibly find the opposite. That is, find the metric that will have every $f^{-1}(U)$ closed. Does $d(x,y)=0$ for all $x,y \in X$ work? I am also a little confused by the use of plurals in the question. "Possible to give EXAMPLES", "or very few"? I am assuming there is something going on that I am missing.

Thank you in advanced for you help.

share|cite|improve this question
For 1) to happen you need discrete topology (every subset of $X$ is an open set) on $X$. 2) Second one is impossible, as you can always construct a cts function. – DiffeoR Mar 27 '14 at 10:00
But I don't know what metric will induce discrete topology on $X$. – DiffeoR Mar 27 '14 at 10:04
Yes, I forgot to mention the first answer holds when Y has any topology. – DiffeoR Mar 27 '14 at 10:06
Topology means : you precisely say which sets you call open sets in $X$. And these open sets satisfy property like countable union of them and finite intersection of them is open again. When you say a metric space : it automatically determines which sets will be called open. You first say all open balls of radius 'r' for all r > 0 are the open sets first and then apply finite intersections and countable unions of them to obtain the other open sets. So a metric determines a topology but the other way round is not true always. – DiffeoR Mar 27 '14 at 10:11
The cts function in the second case I was talking about is the constant function, i.e $f(X) = \{y_0\}$. – DiffeoR Mar 27 '14 at 10:15
up vote 1 down vote accepted

For your second example (with only few continuous functions), let $X$ be $\mathbb{R}^n$ with the euclidean metric and $Y$ be $\mathbb{R}^n$ with the discrete metric. Then the only continuous functions are the constant ones. To see this, let $y\in Y$. The set $\{y\}$ is open and closed, so for a continuous function $f:X\rightarrow Y$, the set $f^{-1}(\{y\})$ is open and closed. But in euclidean space, the only sets that are open and closed are the empty set and the whole space. So $f$ must be constant.

share|cite|improve this answer
If you read the comments on my post you'll see another discussion on this question. Is it correct? Furthermore, are all constant functions continuous independent of the metric and sets? After reading your answer, would I thus conclude that - "No, there is no way to do blah blah blah" – Gustavo Montano Mar 27 '14 at 14:34
@eXtremiity Yes, the constant function is always continuous. To see this, let $f$ be constant and $y$ the value it takes. Let $U\subset Y$ be open. If $y\in U$, then $f^{-1}(U)=X$, which is open. If $y\not\in U$, then $f^{-1}(U)=\emptyset$, which is also open. – Vincent Boelens Mar 27 '14 at 14:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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