Not open and not closed set

Can somebody provide not open and not closed set? I even cannot imagine what does it mean. Also, I'm having a deal with such problem that there is a bounded countable set in R, and I should provide examples of sets that are: opened; closed; not opened and not closed; compact, which means bounded and closed.

• A semi -open (or semi-closed) interval, such as $[0,1)$ should do. – Bernard Apr 23 '15 at 0:10
• Not open and not closed, $1,1/2,1/3,1/4,\dots$. – André Nicolas Apr 23 '15 at 0:12
• $\mathbf{Q} \subset \mathbf{R}$ is neither open nor closed. – scitamehtam Apr 23 '15 at 0:14
• If anyone is curious about a proof to @scitamehtam's claim, see math.stackexchange.com/questions/30468/… – JMoravitz Apr 23 '15 at 0:48
• @JMoravitz ... or my answer to this question :0) [The fact that $\mathbb{Q}$ is not open or closed is equivalent to the fact that the irrationals are not open or closed] – Alex Kruckman Apr 23 '15 at 1:41

Hint:

A bounded countable set in $\mathbb R$ is easy to find if you know that $\mathbb Q$ is a countable set. Can you find a bounded subset of $\mathbb Q$?

All of the other examples can be intervals in $\mathbb R$. Just play around with whether the edge points are included or not.

The interval $[0,1)$ is neither open nor closed in the usual topology on $\mathbb{R}$.

A more interesting example of a subset of $\mathbb{R}$ which is neither open nor closed is the set of irrational numbers. It is not open since it is not the union of open intervals (any open interval $(a,b)$ contains a rational number), and it is not closed, since it does not contain all its limit points (there is a sequence of irrational numbers which limits to $0$, e.g. $\pi$, $\pi/2$, $\pi/3$, $\dots$, $\pi/n$,$\dots$, but $0$ is not irrational).

Perhaps the topological space you're most familiar with is the real numbers $\mathbb{R}$, so you should look there for examples. The standard examples of open sets in $\mathbb{R}$ are open intervals, $(a,b)$, and the standard examples of closed sets are closed intervals, $[a,b]$. Can you put these together to dream up a set that is neither open nor closed?

To find a bounded countable set in $\mathbb{R}$, strictly speaking any finite set will work. But it's more interesting to use a countably infinite set. The natural numbers are your first example of these, so you should try to think of bounded sets that are indexed by natural numbers. The first place to look is fractions.

In $\Bbb R$ with usual topology, $[a,b)$ ($a < b$) is not closed and not open.