# Discrete metric and continuity equivalence

Homework Statement .

Prove that a metric space X is discrete if and only if every function from X to an arbitrary metric space is continuous.

The attempt at a solution.

I didn't have problems to prove the implication discrete metric implies continuity. Let f:(X,δ)→(Y,d) where (Y,d) is an arbitrary metric space. Let V be an open set in (Y,d). Every set in X is open so, in particular, f^-1(V) is an open set. This proves f is continuous.
I don't know how to prove the other statement: if every function from the metric space X to some arbitrary metric space Y is a continuous function, then X is discrete.

## Answers and Replies

pasmith
Homework Helper
Homework Statement .

Prove that a metric space X is discrete if and only if every function from X to an arbitrary metric space is continuous.

The attempt at a solution.

I didn't have problems to prove the implication discrete metric implies continuity. Let f:(X,δ)→(Y,d) where (Y,d) is an arbitrary metric space. Let V be an open set in (Y,d). Every set in X is open so, in particular, f^-1(V) is an open set. This proves f is continuous.
I don't know how to prove the other statement: if every function from the metric space X to some arbitrary metric space Y is a continuous function, then X is discrete.

Proof by contrapositive: Suppose X is not discrete. Then there exists a function from X to {0,1} which is not continuous.

• 1 person
Proof by contrapositive: Suppose X is not discrete. Then there exists a function from X to {0,1} which is not continuous.

Thanks for the advice. I've come up with this idea but I want to check if it is ok:
Suppose X is not discrete. Take (Y,d') to be the Y={0,1} and d'=δ distance. By definition of discrete space, if X is not discrete then there exists some x for which for all ε>0, the ball B(x,ε) contains other point y different from x. Define f to be f(x)=0 and f(y)=1 for all y in X with y≠x. If f is continuous, in particular, is continuous at the point x. Take ε'=1/2. Then, for all ε, there is some y such that d(x,y)<ε but δ(f(x),f(y))=δ(1,0)=1>1/2=ε'. But this is absurd since f was continuous. Then X must be discrete.

I have a question regarding the concept of discrete space. If the derived set of some metric space is empty, is this equivalent to say that X is discrete? I think it is but I'm not 100% sure. If this equivalence holds, I have a similar proof to the original problem:
Suppose X is not discrete, then there exists x in X'. Take (Y,d')=({0,1},δ) and define f(x)=0 and f(y)=1 for all y in X-{x}. By definition of derived set, there exists a sequence {x_n} in X such that x_n→x when n→∞. The function f is continuous, so f(x_n)→f(x) when n→∞. But f(x_n)=1≠0=f(x), which is absurd. It follows that X must be discrete.

Dick
Science Advisor
Homework Helper
Thanks for the advice. I've come up with this idea but I want to check if it is ok:
Suppose X is not discrete. Take (Y,d') to be the Y={0,1} and d'=δ distance. By definition of discrete space, if X is not discrete then there exists some x for which for all ε>0, the ball B(x,ε) contains other point y different from x. Define f to be f(x)=0 and f(y)=1 for all y in X with y≠x. If f is continuous, in particular, is continuous at the point x. Take ε'=1/2. Then, for all ε, there is some y such that d(x,y)<ε but δ(f(x),f(y))=δ(1,0)=1>1/2=ε'. But this is absurd since f was continuous. Then X must be discrete.

I have a question regarding the concept of discrete space. If the derived set of some metric space is empty, is this equivalent to say that X is discrete? I think it is but I'm not 100% sure. If this equivalence holds, I have a similar proof to the original problem:
Suppose X is not discrete, then there exists x in X'. Take (Y,d')=({0,1},δ) and define f(x)=0 and f(y)=1 for all y in X-{x}. By definition of derived set, there exists a sequence {x_n} in X such that x_n→x when n→∞. The function f is continuous, so f(x_n)→f(x) when n→∞. But f(x_n)=1≠0=f(x), which is absurd. It follows that X must be discrete.

That sounds fine. Both of those proofs are really the same. Why are you not 100% sure that the set of all limit points of a metric space is empty if and only if the space is discrete? You should be able to prove that. And for your first proof, since you have 'if and only if' you still have to prove any function on a discrete space is continuous. But that should be pretty easy. Actually, I see you've already gotten that part. Nevermind.

Last edited:
• 1 person
pasmith
Homework Helper
Thanks for the advice. I've come up with this idea but I want to check if it is ok:
Suppose X is not discrete. Take (Y,d') to be the Y={0,1} and d'=δ distance. By definition of discrete space, if X is not discrete then there exists some x for which for all ε>0, the ball B(x,ε) contains other point y different from x. Define f to be f(x)=0 and f(y)=1 for all y in X with y≠x. If f is continuous

You don't need to derive a contradiction; you can show directly that f as defined is not continuous at x:

If $\epsilon < d'(0,1)$ then for every $\delta > 0$ there exists $y \in B(x,\delta)$ with $d'(f(x),d(y)) > \epsilon$ and thus $f$ is not continuous at $x$.

That's sufficient to complete the proof: the object is to show that if X is not discrete then there exists a metric space Y such that there exists a function from X to Y which is not continuous, which is equivalent to showing that if every function from X to an arbitrary metric space is continuous then X is discrete.

A direct proof would probably start with the observations that if every function from X to an arbitrary metric space is continuous then every function from X to {0,1} is continuous, and that every such function can be written as
$$f : x \mapsto \left\{\begin{array}{rc} 0 & \mbox{ if } x \in U \\ 1 & \mbox{ otherwise} \end{array} \right.$$
for some $U \subset X$.

You're right. I've messed up with logic. We've shown that the contrapositive is true, so the statement is true.