Rationals in an interval $[a,b] \in \Bbb R$

36 Views Asked by At

(i) For which real values $a$ and $b$, ($a < b$), is the set $[a,b] \cap \Bbb Q$ open in $(\Bbb Q, d)$, (where $d(x,y)= \lvert x-y \rvert$)?

(ii)For which real values $a,b$ is the set $[a,b] \cap \Bbb Q$ closed in $(\Bbb Q, d)$?

Firstly I'd like to ask if it's correct to understand that any ball of finite size around any point on the real line encloses some points in $\Bbb Q$. If this is true, then for (i) I know this much: $a,b$ cannot be rationals since any ball around either $a$ or $b$ is not a subset of $[a,b] \cap \Bbb Q$. But other than that are there more restrictions to what $a,b$ can be that I have overlooked?

For (ii), the complement $S^c=[(-\infty,a) \cap \Bbb Q] \cup [(b,\infty) \cap \Bbb Q]$. This looks open to me for all real values of $a,b$. Yes?