# Is the set of rational number discrete or continuous?

If the set of real numbers $\Bbb{R}$ is continuous, and the set of integer $\Bbb{Z}$ is a discrete set, then is the set of rational number $\Bbb{Q}$ continuous or discrete? My question is stated in the context of analysis. Sorry if I can’t state my problem clear, this question just passed my mind. If it is just a nonsense question, please tell me right away. Thank you very much.

• Please use MathJax to format your posts. Oct 12, 2017 at 3:09
• “It is always possible to find another rational number between any two members of the set of rationals. Therefore, rather counterintuitively, the rational numbers are a continuous set, but at the same time countable.” —Wolfram MathWorld Oct 12, 2017 at 3:15

This depends on the topology that we equip $$\mathbf{Q}$$ with. If it has its usual topology, i.e. the topology inherited from the standard topology on $$\mathbf{R}$$, then it is not discrete. A topological space $$X$$ is said to be discrete if given any $$x\in X$$ there exists an open set $$U$$ containing $$x$$ such that $$U\cap X=\{x\}$$. Given any $$\frac{p}{q}\in \mathbf{Q}$$, and an open neighborhood of radius $$\epsilon$$, we can find another rational $$\frac{m}{n}$$ satisfying $$\lvert \frac{p}{q}-\frac{m}{n}\rvert<\epsilon$$, so that $$\mathbf{Q}$$ is not discrete.
• Maybe a reasonable way to pose the question and maintain its spirit is, “can there exist continuous functions $f: \mathbb{Q} \rightarrow \mathbb{Q}$ ?” Jan 21, 2020 at 19:57
• @kdbanman But the answer to that question is "yes" for every space - the identity function is always continuous. And for a discrete space $X$, every function $X\to X$ is continuous! Jul 13, 2021 at 18:29
• "for a discrete space $X$, every function $X \to X$ is continuous!" Thank you, I didn't realize this. I think this answer points to the right property then (i.e. completeness vs non-completeness.) Jul 13, 2021 at 18:59
• Sounds like the property he's asking for is connectedness. $\mathbb Q$ is not connected -- in fact it's totally disconnected. Jul 10, 2022 at 8:54