# Find a continuous function having following properties.

Which of the following statements is/are true?

1. There exists a continuous map $f:ℝ\to ℝ$ such that $f(ℝ)=\mathbb{Q}$.
2. There exists a continuous map $f:ℝ\to ℝ$ such that $f(ℝ)=\mathbb{Z}$.
3. There exists a continuous map $f:ℝ\to ℝ^2$ such that $f(ℝ)=\{(x,y)\in\mathbb{R^2: x^2+y^2=1}\}$.
4. There exists a continuous map $f:[0,1]\cup[2,3]\to \{0,1\}$

So I try to solve and showed that first option is false, by assuming that there exists a continuous map from $f:ℝ\to ℝ$ such that $f(ℝ)=\mathbb{Q}$. If there were, then we could find $a,b ∈ R$ with $f(a) = 1$ and $f(b) = 2$. Either $a < b$ or $b < a$. Let’s suppose $a < b$. Since $f(x)$ is continuous on $R$ it is also continuous on $[a,b]$. By the intermediate value theorem, and the fact that $1 < \sqrt{2} < 2$, there exists a $c ∈ (a,b)$ such that $f(c) = √ 2$. But $\sqrt{ 2} \not \in Q$, hence $f(R)$, which includes $f(c)$, cannot just be $Q$.

Now my concerns are- Can I argue similarly for option 2? My intuition says that option 3 and 4 are correct. But I am unable to find explicit functions so far.

Can anyone help me to clear my doubts? Thanks.

• Did you want $f:\mathbb{R}\to\mathbb{R}^2$ in 3. ? – uniquesolution May 9 '17 at 6:22
• With 2 there is a short cut you can make use of. Since $\mathbb{Z}$ is a subset of $\mathbb{Q}$ if there existed a contentious map for $\mathbb{Z}$ there would exist a map for $\mathbb{Q}$. – Q the Platypus May 9 '17 at 6:28
• Long story short, the image of a connected topological space under a continuous map is again connected. – Vim May 9 '17 at 8:17
• @uniquesolution yes. Sorry for the typo. – Kushal Bhuyan May 9 '17 at 8:58
• @QthePlatypus Can you elaborate? Suppose one existed for $\mathbb{Z}$, call it $f$, then we would have $f(\mathbb{R})=\mathbb{Z}$. In particular $f(\mathbb{R})\subseteq\mathbb{Q}$. But we also need $f(\mathbb{R})\supseteq\mathbb{Q}$ to obtain equality of sets? – Jeppe Stig Nielsen May 10 '17 at 11:41

If $f$ is a continuous function from $X\rightarrow Y$ then $f(X)$ is connected if $X$ is connected . $R$ is connected but $Q$ and $Z$ are not. So the first two are impossible. For third take the map $R\rightarrow R^2$ where $f(t)=(cos (t), sin (t))$ And for the last define $f(x)=0$ if $x\in [0,1]$ and $1$ if $x\in [2,3]$

• Yes but the question requires the image to be entire Z or Q not a mere subset – user379195 May 9 '17 at 6:37
• I did think about the last function you have mentioned. – Kushal Bhuyan May 9 '17 at 9:04

Hints for 3: Don't try to find a bijective function; it doesn't exist. What is the name of the set where $x^2+y^2=1$? Have you studied that set before?

Hints for 4: Don't try to find a nice formula, like a polynomial. You can define a function in English if you want. What do you need the function to do?

• As stated 4 doesn't require $f$ to be surjective, so it is possible to satisfy with a formula. – stewbasic May 9 '17 at 6:33
• @stewbasic Ah, good catch. Well, given the context, that might just be an oversight. – Chris Culter May 9 '17 at 6:35
• The set is for circles. – Kushal Bhuyan May 9 '17 at 8:59
• @KushalBhuyan Right, the set is the unit circle, so that's a hint to think about functions that map to the unit circle. The study of the unit circle is trigonometry, which provides the right functions. – Chris Culter May 10 '17 at 4:38