Give an example or argue that an example is impossible. A nonempty open set that contains all rational numbers.
This was a question on my undergrad Real Analysis exam. There is a similar question that has been asked on the site but I don't understand the answer given. We have not discussed topology at length. I want to say that it is impossible since I think $\mathbb{Q}$ is neither open nor closed. But I'm not sure how to explain this. Any help would be appreciated, thanks
It's kind of hard to talk about open sets without some conception of topology, so I'll try to give a crash course. A set is open iff there is an open ball around every element in the set. An open ball of radius $r$ centered at $x_0$ is the set of all $x$ st $\lvert x_0 - x \rvert < r$. In particular, all the open balls in $\mathbb R$ are the open intervals. For instance, the open interval (a, b) is an open ball centered around $\frac{a + b}{2}$ with radius $\frac{b-a}{2}$.
Now to answer your question, we are trying to find an open set- a set such that every point in the set is enclosed by an open interval- that contains all the rational numbers. That's why some of the answers are suggesting the real number line, which itself is open. Or, as pre-kidney suggested, take $\mathbb R$ and remove a point in $\mathbb Q$\ $\mathbb R$, like $\mathbb R$ \ $\sqrt2$. Then every point on $\mathbb R$ has an open interval around it except for $\sqrt{2}$, which isn't in the set anyways, so the set is open and contains all the rational numbers.