7

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

Thanks in advance!

Najib Idrissi
  • 54,185

4 Answers4

25

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.

Brian M. Scott
  • 616,228
  • Does that mean singletons are neither open nor closed, too? I apologize for following up an old question. – PinkyWay Jun 06 '20 at 09:25
  • 1
    @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 05:06
  • 1
    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 05:12
16

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.

BrianO
  • 16,579
6

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$.

1

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

c.p.
  • 780
  • 1
    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