# Can a set be neither open nor closed?

Can a set be neither open nor closed? An example would do. I cant think of any.

• $[0,1)$ in the usual topology on $\Bbb R$. – Brian M. Scott Oct 12 '15 at 19:55
• @Brian M. Scott why not make that an answer? – Jason Oct 12 '15 at 19:56
• Now I want to encourage the author to think of sets that are both open and closed at the same time. – Ivan Neretin Oct 12 '15 at 20:03
• @IvanNeretin I know those. $\Bbb R$ for example – Jennie Durham Oct 12 '15 at 20:08
• Fun fact: a topology in which every set is either open, closed, or both is called a door space. en.wikipedia.org/wiki/Door_space – Wojowu Oct 12 '15 at 20:21

One very familiar example is the set $[0,1)$ in the usual topology of $\Bbb R$: it’s not open, because it does not contain any nbhd of $0$, and it’s not closed, because $1$ is in its closure.

• Does that mean singletons are neither open nor closed, too? I apologize for following up an old question. – Invisible Jun 6 '20 at 9:25
• @Invisible I believe (in the usual topology of $\Bbb R$), singleton sets $\{r\}$ for some $r \in \Bbb R$ are equivalent to closed intervals $[r, r]$, which are closed but not open. – Scott Olson Jul 14 '20 at 5:06
• In particular $\{r\}$ is not open because it does not contain any nbhd of $r$, and it is closed because its complement $(-\infty,r) \cup (r,\infty)$ is open because it's a union of open sets. – Scott Olson Jul 14 '20 at 5:12

Another example: the rationals $\mathbb{Q}$ as a subset of $\mathbb{R}$ with the usual topology. It's not open, because every interval contains irrationals. It's not closed, because every irrational is a limit of rationals.

As the other answers have already pointed out, it is possible and in fact quite common for a topology to have subsets which are neither open nor closed. More interesting is the question of when it is not the case. A door topology is a topology satisfying exactly this condition: every subset is either open or closed (just like a door).

Conversely, we can ask whether subsets can be both open and closed, and this is the more well-known property of connectedness: a connected space is one where the only closed-and-open sets (clopen sets) are $\emptyset$ and $X$, which are always clopen in any topology. Thus in a connected door topology, you have $A$ is open iff $A$ is not closed, except for $A=X$ or $A=\emptyset$, where $A$ is both open and closed.

The most common door topology one comes across is the discrete topology, where every subset is both open and closed. A nontrivial example of a connected door topology is given by the collection of open sets $\scr U\cup\{\emptyset\}$ given any ultrafilter $\scr U$.

Any non-empty, proper subset of a topological space endowed with the indiscrete topology.

• Clarification: "trivial" here meaning indiscrete, not discrete - arguably both are trivial, although the former is somehow more trivial. – Noah Schweber Oct 12 '15 at 21:24