Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I noticed the following statement on a comprehensive exam, and I am having trouble proving it. Can anyone help?

If $X$ is a non-compact metric space, then there exists a continuous function $f: X \rightarrow \mathbb{R}$ such that $f(X)$ is dense in $\mathbb{R}$.

Thanks in advance!

share|improve this question
    
This seems not true because $f:\mathbb{N}\longrightarrow \mathbb{R}$ can not have $F(\mathbb{N})$ dense in $\mathbb{R}$. Notice that $\mathbb{N}$ is not compact with the topology induced by usual metric. –  user29999 Sep 3 '12 at 15:36
1  
@user29999 Fix an enumeration of the rationals $r_n$ define a map $f: \mathbb N \rightarrow \mathbb R$ by $f(n)=r_n$. Since $\mathbb N$ has the discrete topology any map with it as the domain is continuous. Thereby $f$ is a continuous map with dense image. This is also a step in Nate's hint. –  JSchlather Sep 3 '12 at 15:43
add comment

1 Answer 1

up vote 5 down vote accepted

Hint: If $X$ is not compact, it contains an infinite set $E$ with no limit point. Try defining $f : E \to \mathbb{R}$ so that $f(E)$ is dense. Then show that you can extend $f$ continuously to $X$.

share|improve this answer
add comment

Your Answer

 
discard

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.