Open vs. Closed Sets
Open and closed sets describe how a set sits inside a larger space, and the names suggest opposites, but they are not. An open set contains a small ball around each of its points, so it contains none of its boundary. A closed set contains all of its boundary, and its complement is open. A set can be both, or neither.
Definitions
For all real numbers $a$ and $b$ such that $a < b$, the interval of numbers strictly between $a$ and $b$ is called an open interval, and is written $(a, b)$.
Consider a set $U$ of points on the number line, in the plane, or in space. The set $U$ is open if every point of $U$ has a small ball around it that lies entirely inside $U$.
Consider a set $U$ in a metric space. The set $U$ is open if, for every point $x \in U$, there is an $\varepsilon > 0$ such that
\[B(x, \varepsilon) \subseteq U,\]where $B(x, \varepsilon)$ is the open ball of radius $\varepsilon$ around $x$.
Consider a set $X$ with a topology $\mathcal{T}$. A set $U \subseteq X$ is open if $U \in \mathcal{T}$.
Examples
-
The empty set is open in $\reals$, because it has no points, so the condition on its points holds vacuously.
-
✓ $(0, 1)$The interval $(0, 1)$ is open in $\reals$, because every point of $(0, 1)$ has a small interval around it inside $(0, 1)$.
-
The set $\reals$ is open as a subset of itself, because every interval around a real number is inside $\reals$.
Non-examplesThings that may be mistaken for examples of this term.
-
✗ $[0, 1]$The interval $[0, 1]$ is not open in $\reals$, because every interval around $0$ contains negative numbers, which are not in $[0, 1]$.
-
The interval $[0, 1)$ is not open in $\reals$, because every interval around $0$ contains negative numbers.
-
The set $\rationals$ is not open in $\reals$, because every interval around a rational number contains irrational numbers.
-
The Cantor set is not open, because it contains no interval of positive length, so no point of the Cantor set (such as $0$) has a small interval around it inside the Cantor set.
Properties
- Every union of open sets is open, and every intersection of finitely many open sets is open. An intersection of infinitely many open sets need not be open: the intersection of the intervals $(-1/n, 1/n)$ is $\setdef{0}$.
- A set is open if and only if it equals its interior, and if and only if it contains none of its boundary points.
For all real numbers $a$ and $b$ such that $a < b$, the interval of numbers between $a$ and $b$ including $a$ and $b$ is called an closed interval, and is written $[a, b]$.
Consider a set $F$ of points on the number line, in the plane, or in space. The set $F$ is closed if $F$ contains all of its boundary points.
Consider a set $F$ in a metric space. The set $F$ is closed if $F$ contains the limit of every convergent sequence of points of $F$.
Examples
-
✓ $[0, 1]$The interval $[0, 1]$ is closed in $\reals$, because it contains its boundary points $0$ and $1$.
-
The empty set is closed in $\reals$, because its complement, $\reals$, is open.
-
The set $\reals$ is closed as a subset of itself, because its complement, $\emptyset$, is open.
-
The Cantor set is closed, because it is the intersection of the sets $C_0 = [0, 1]$, $C_1 = [0, \frac{1}{3}] \cup [\frac{2}{3}, 1]$, $C_2$, $\dots$ that remain after each step of the construction. Each $C_n$ is a union of finitely many closed intervals, so each $C_n$ is closed, and every intersection of closed sets is closed.
Non-examplesThings that may be mistaken for examples of this term.
-
The interval $[0, 1)$ is not closed in $\reals$, because it does not contain its boundary point $1$.
-
✗ $(0, 1)$The interval $(0, 1)$ is not closed in $\reals$, because the sequence $1/n$ in $(0, 1)$ converges to $0$, which is not in $(0, 1)$.
-
The set $\rationals$ is not closed in $\reals$, because rational numbers converge to irrational ones, such as $1, 1.4, 1.41, 1.414, \dots \to \sqrt{2}$.
Properties
- Every intersection of closed sets is closed, and every union of finitely many closed sets is closed. A union of infinitely many closed sets need not be closed: the union of the intervals $[1/n, 1]$ is $(0, 1]$.
- In a metric space, the three definitions agree: a set contains its boundary points if and only if it contains the limits of its convergent sequences, if and only if its complement is open.
- “Closed” is not the opposite of “open”: a set can be both (such as $\emptyset$ and $\reals$ in $\reals$) or neither (such as $[0, 1)$).
Examples
| Example | open set | closed set | Why |
|---|---|---|---|
| $(0, 1)$ | ✓ | ✗ | open set: The interval $(0, 1)$ is open in $\reals$, because every point of $(0, 1)$ has a small interval around it inside $(0, 1)$.
closed set: The interval $(0, 1)$ is not closed in $\reals$, because the sequence $1/n$ in $(0, 1)$ converges to $0$, which is not in $(0, 1)$.
|
| $[0, 1]$ | ✗ | ✓ | open set: The interval $[0, 1]$ is not open in $\reals$, because every interval around $0$ contains negative numbers, which are not in $[0, 1]$.
closed set: The interval $[0, 1]$ is closed in $\reals$, because it contains its boundary points $0$ and $1$.
|
| $[0, 1)$, as a subset of $\reals$ | ✗ | ✗ | The interval $[0, 1)$ contains one of its boundary points but not the other, so it is neither open nor closed. |
| The set of real numbers, $\reals$ | ✓ | ✓ | As a subset of itself, $\reals$ is both open and closed, because its complement $\emptyset$ is both open and closed. |
| The empty set $\emptyset$ (definition) | ✓ | ✓ | open set: The empty set is open in $\reals$, because it has no points, so the condition on its points holds vacuously.
closed set: The empty set is closed in $\reals$, because its complement, $\reals$, is open.
|
| $\rationals$, as a subset of $\reals$ | ✗ | ✗ | Every real number is a boundary point of $\rationals$, so $\rationals$ contains some of its boundary points (the rational ones) but not all, and it is neither open nor closed. |
Notes
- Whether a set is open or closed depends on the surrounding space: $[0, 1)$ is neither in $\reals$, but it is open in the space $[0, \infty)$, and closed in the space $(-1, 1)$.
- In a connected space, such as $\reals$, the only sets that are both open and closed are $\emptyset$ and the whole space.