I need a very simple example of a set of real numbers (if there is any) that is neither closed nor open, along with an explanation of why it is so.
An example of neither open nor closed set
6 Answers
$[0,1)$
It is not open because there is no $\epsilon > 0$ such that $(0-\epsilon,0+\epsilon) \subseteq [0,1)$.
It is not closed because $1$ is a limit point of the set which is not contained in it.
-
3@MonkeyD.Luffy A finite union of closed sets is closed, an arbitrary intersection of closed sets is closed. DeMorgan's Law gives you the analogous statements for open sets. – 2012-08-24
For a slightly more exotic example, the rationals, $\mathbb{Q}$.
They are not open because any interval about a rational point $r$, $(r-\epsilon,r+\epsilon)$, contains an irrational point.
They are not closed because every irrational point is the limit of a sequence of rational points. If $s$ is irrational, consider the sequence $\left\{ \dfrac{\lfloor10^n s\rfloor}{10^n} \right\}.$
-
0$\mathbb Q$ is exotic? – 2018-09-02
Let $A = \{\frac{1}{n} : n \in \mathbb{N}\}$.
$A$ is not closed since $0$ is a limit point of $A$, but $0 \notin A$.
$A$ is not open since every ball around any point contains a point in $\mathbb{R} - A$.
Take $\mathbb{R}$ with the finite complement topology - that is, the open sets are exactly those with finite complement. Then $[0,1]$ is neither open nor closed. It is not open since $\mathbb{R}\setminus [0,1]=(-\infty,0) \cup (1,\infty)$ is not finite, and it is not closed since its complement, $(-\infty,0) \cup (1,\infty)$, is not open, as just demonstrated.
The interval $\left ( 0,1 \right )$ as a subset of $\mathbb{R}^{2}$, that is $\left \{ \left ( x,0 \right ) \in \mathbb{R}^{2}: x \in \left ( 0,1 \right )\right \}$ is neither open nor closed because none of its points are interior points and $\left ( 1,0 \right )$ is a limit point not in the set.
The rational numbers $\mathbb{Q}$ are neither open nor closed. Recall a subset S of a metric space X space is open if every point x in S has an $\epsilon$-neighborhood $N_{\epsilon}(x)$ that is a proper subset of S. And a set is closed if(and only if) its complement is open. So $\forall (q \in \mathbb{Q},r \in [\mathbb{R} \setminus \mathbb{Q}], \epsilon > 0, \lambda > 0)$ , $N_{\epsilon}(q) \cap [\mathbb{R}\ \setminus\mathbb{Q}]\neq \emptyset$ and $N_{\lambda}(r) \cap \mathbb{Q} \neq \emptyset$. So $\mathbb{Q}$ is not open since every $\epsilon$-neighborhood or a rational number contains irrationals. But its complement $ [\mathbb{R}\ \setminus\mathbb{Q}]$, the set of irrational numbers, is also not open since no $\epsilon$-neighborhoods or irrationals contain exclusively irrationals. But the complement of the rationals is not open, so $\mathbb{Q}$ cannot be closed either. Therefore, the set of rationals is neither open nor closed.
Might I add: most of the previous examples are of sets that are both open and closed(like the half-open intervals of the real line [0,1) for example).