Skip to main content

Section 1.2 Open and Closed Sets

Balls in Euclidean spaces are defined in terms of distances. This means that they have a natural generalisation to metric spaces. The concepts of open and closed sets are are closely related to this.

Definition 1.17.

Let \((X,d)\) be a metric space. Let \(x_0 \in X\) and \(r \gt 0\text{.}\) Then
\begin{equation*} B_r(x_0) = \set{x \in X}{d(x_0,x) \lt r} \end{equation*}
is called the open ball in \(X\) of radius \(r\) and centre \(x_0\text{.}\)

Definition 1.18.

Let \((X,d)\) be a metric space.
  1. A set \(U \subseteq X\) is called open if for every \(x \in U\) there exists \(r \gt 0\) such that \(B_r(x) \subseteq U\text{.}\)
  2. A set \(F \subseteq X\) is called closed if the complement \(X \setminus F\) is open.
Figure 1.4. The inclusions \(B_r(x) \subseteq U \subseteq X\) in Part i of Definition 1.18.
Figure 1.5. The inclusions \(B_r(x) \subseteq (X \setminus F) \subseteq X\) in Part ii of Definition 1.18.
This does not mean that ‘closed’ is the opposite of ‘open’. A set in a metric space can be neither open nor closed and some sets are open and closed at the same time.

Example 1.19.

Let \(a \lt b\text{.}\) The interval \((a,b)\) is open in \(\R\) and \([a,b]\) is closed (because \((-\infty,a) \cup (b,\infty)\) is open), but \((a,b]\) and \([a,b)\) are neither open nor closed.

Definition 1.20.

Let \((X,d)\) be a metric space and \(S \subseteq X\text{.}\)
  1. The interior \(S^\circ\) of \(S\) is the set of all \(s \in S\) with the property that there exists \(r \gt 0\) such that \(B_r(s) \subseteq S\text{.}\)
  2. The closure \(\overline S\) of \(S\) is the set of all \(x \in X\) such that \(B_r(x) \cap S \ne \varnothing\) for any \(r \gt 0\text{.}\)
  3. The boundary \(\partial S\) of \(S\) is the set of all \(x \in X\) such that \(B_r(x) \cap S \ne \varnothing\) and \(B_r(x) \setminus S \ne\varnothing\) for any \(r \gt 0\text{.}\)
Figure 1.6. The point \(x_1\) lies in the interior \(S^\circ\) because \(B_{r_1}(x_1) \subseteq S\) for some \(r_1 \gt 0\text{.}\) The point \(x_2\text{,}\) on the other hand, lies in \(\partial S\) because \(B_{r_2}(x_2)\) has nonempty intersections with both \(S\) and \(X \setminus S\) no matter how small the radius \(r_2 \gt 0\) is. Finally, there exists \(r_3 \gt 0\) such that \(B_{r_3}(x_3)\) does not intersect \(S\) at all, and so \(x_3 \in X \setminus \overline S\text{.}\)
It is clear that \(U \subseteq X\) is open if and only if it satisfies \(U = U^\circ\text{.}\) Not quite as obvious, but still true, is the corresponding statement for closed sets: a set \(F \subseteq X\) is closed if and only if it satisfies \(F = \overline{F}\text{.}\) This is proved in Exercise 1.2.3.

Proof.

Let \(x \in B_r(x_0)\text{.}\) Set \(s = r - d(x,x_0)\text{.}\) Then \(s \gt 0\text{.}\) Moreover, \(B_s(x) \subseteq B_r(x_0)\) (see Exercise 1.2.1). It follows that \(B_r(x_0)\) is open.
We can summarise this theorem as follows: the interior of \(S\) is the largest open set contained in \(S\text{.}\)

Proof.

Part ii.

Let \(U \subseteq S\) be open. If \(x \in U\) is an arbitrary point, then there exists \(r \gt 0\) such that \(B_r(x) \subseteq U \subseteq S\text{.}\) So \(x \in S^\circ\text{.}\)

Part i.

Let \(x \in S^\circ\text{.}\) Then there exists \(r \gt 0\) such that \(B_r(x) \subseteq S\text{.}\) By Lemma 1.21, we know that \(B_r(x)\) is open. Using (ii), we infer that \(B_r(x) \subseteq S^\circ\text{.}\) Hence \(S^\circ\) is open.
In other words, the closure \(\overline S\) is the smallest closed set containing \(S\text{.}\)

Proof.

Part ii.

Suppose that \(F \supseteq S\) is closed. Then \(X \setminus F\) is open. Thus any point \(x \in X \setminus F\) has some \(r \gt 0\) with \(B_r(x) \subseteq X \setminus F\) and hence \(B_r(x) \cap S = \varnothing\text{.}\) We conclude that \(x \not\in \overline S\text{.}\) Hence \(X \setminus F \subseteq X \setminus \overline S\text{,}\) which means that \(F \supseteq \overline S\text{.}\)

Part i.

Consider a point \(x \in X \setminus \overline S\text{.}\) Then by the definition of \(\overline S\text{,}\) there exists \(r \gt 0\) such that \(B_r(x) \cap S = \varnothing\text{.}\) By Lemma 1.21, the set \(B_r(x)\) is open; so \(X \setminus B_r(x)\) is closed. Since \(S \subseteq X \setminus B_r(x)\text{,}\) (ii) implies that \(\overline S \subseteq X \setminus B_r(x)\text{.}\)
That is, we have shown that \(B_r(x) \subseteq X \setminus \overline S\text{,}\) and it follows that \(X \setminus \overline S\) is open and \(\overline S\) is closed.

Proof.

Suppose that \(x \in X\text{.}\) We know that \(x \in \overline S\) if and only if \(B_r(x) \cap S \ne \varnothing\) for any \(r \gt 0\text{.}\) Furthermore, \(x \not\in S^\circ\) if and only if \(B_r(x) \not\subseteq S\) for any \(r \gt 0\text{,}\) which in turn means that \(B_r(x) \setminus S \ne \varnothing\) for any \(r \gt 0\text{.}\) Combining these two facts, we obtain the desired statement.

Proof.

Part i.

The condition for openness is trivial for the empty set. Moreover, for every \(x \in X\text{,}\) it is clear that \(B_1(x) \subseteq X\text{,}\) so \(X\) is open.

Part ii.

Let \(x \in \bigcup_{\lambda \in \Lambda} U_\lambda\text{.}\) Then there exists \(\lambda \in \Lambda\) such that \(x \in U_\lambda\text{.}\) As \(U_\lambda\) is open, there exists \(r \gt 0\) such that \(B_r(x) \subseteq U_\lambda\text{,}\) and then \(B_r(x) \subseteq\bigcup_{\lambda \in \Lambda} U_\lambda\text{.}\)

Part iii.

Let \(x \in \bigcap_{n=1}^N U_n\text{.}\) Since every \(U_n\) is open, there exist \(r_1,\dotsc,r_N \gt 0\) with \(B_{r_n}(x) \subseteq U_n\) for \(n=1, \dotsc, N\text{.}\) Define \(r = \min\{r_1,\dotsc,r_N\}\text{.}\) Then
\begin{equation*} B_r(x) \subseteq B_{r_n}(x) \subseteq U_n, \quad n=1,\dotsc,N\text{,} \end{equation*}
and hence \(B_r(x) \subseteq \bigcap_{n=1}^N U_n\text{.}\)

Proof.

This follows immediately from Theorem 1.25, as
\begin{equation*} X \setminus \bigg(\bigcap_{\lambda \in \Lambda} F_\lambda\bigg) = \bigcup_{\lambda \in \Lambda} (X \setminus F_\lambda) \quad \text{and} \quad X \setminus \bigg(\bigcup_{n=1}^N F_n\bigg) = \bigcap_{n=1}^N (X \setminus F_n)\text{.} \end{equation*}

Proof.

Any union of balls is automatically open by Theorem 1.25, so we only prove the other direction. Let \(U\) be an open set in a metric space \((X,d)\text{.}\) Then for any \(x \in U\) we can find \(r_x \gt 0\) such that \(B_{r_x}(x) \subseteq U\text{.}\) Thus the union \(\bigcup_{x \in U} B_{r_x}(x) \subseteq U\text{.}\) The reverse inclusion is clear, and so we conclude that \(\bigcup_{x \in U} B_{r_x}(x) = U\text{.}\)
The following lemma can be extremely useful when working in metric subspaces.
Figure 1.7. The intersection \(B_r'(y) = B_r(y) \cap Y\) appearing in the first part of Lemma 1.28.
Figure 1.8. The intersection \(V = U \cap Y\) appearing in the second part of Lemma 1.28.

Exercises Exercises

1. (PS3) Inclusions of balls.

Let \((X,d)\) be a metric space and let \(x_0, y_0 \in X\) and \(r, s \gt 0\text{.}\)
(a)
Show that \(B_s(y_0) \subseteq B_r(x_0)\) if \(s + d(x_0, y_0) \le r\text{.}\)
(b)
Show that the converse is not true in general. That is, give an example of a metric space \((X,d)\) where there exist \(x_0, y_0 \in X\) and \(r, s \gt 0\) with \(B_s(y_0) \subseteq B_r(x_0)\) but \(s+ d(x_0, y_0) \gt r\text{.}\)
Hint.
To simply things, search for a counterexample with \(x_0=y_0\text{.}\)

2. (PS3) Open sets in metric subspaces.

(a)
Prove the first part of Lemma 1.28.
Hint.
Write down a detailed definition of the balls \(B_r(y)\) and \(B_r'(y)\text{.}\)
(b)
Prove the second part of Lemma 1.28.
Hint 1.
Being open in \((X,d)\) or \((Y,d')\) is defined in terms of the balls \(B_r(y)\) and \(B_r'(y)\) from Part a, and so Part a is very useful.
Hint 2.
The reverse implication is not so bad once you unpack the definitions, but the forward direction requires some more thought. Given an open subset \(V\) of \((Y,d')\) you need to ‘cook up’ and appropriate open subset \(U\) of \((X,d)\text{.}\) Here you can look at the proof of Corollary 1.27 for some inspiration.
(c)
Consider the interval \(X=(0,3]\) as a metric subspace of \(\R\) (Convention 1.16). Show that, in this metric space, \((2,3]\) is open while \((0,1]\) is closed. (Notice that this differs from what we would get with \(X=\R\text{!}\))
Hint.
While it is not so hard to argue directly, using Lemma 1.28 is much faster.

3. Closed vs. closure.

Suppose that \((X,d)\) is a metric space. Let \(S \subseteq X\) be a subset. Show that \(S\) is closed if and only if it satisfies \(\overline S = S\text{.}\)

4. Interior, closure, and set operations.

Consider a metric space \((X,d)\) and two subsets \(S, T \subseteq X\text{.}\) Prove the following statements.
(a)
If \(S \subseteq T\text{,}\) then \(S^\circ \subseteq T^\circ\) and \(\overline S \subseteq \overline T\text{.}\)
(b)
\((S \cap T)^\circ = S^\circ \cap T^\circ\) and \(\overline{S \cap T} \subseteq \overline S \cap \overline T\text{.}\)
(c)
\((S \cup T)^\circ \supseteq S^\circ \cup T^\circ\) and \(\overline{S \cup T} = \overline S \cup \overline T\text{.}\)

5. Open and closed sets in \(C^0([a,b])\).

Let \(a,b \in \R\) with \(a \lt b\text{,}\) and consider the normed space \(\big(C^0([a,b]),\n\blank_{\sup}\big)\) from Example 1.13 and the two subsets
\begin{align*} U \amp= \{ f \in C^0([a,b]) : f(t) \gt 0 \, \forall t \in [a,b] \},\\ F \amp= \{ f \in C^0([a,b]) : f(a) = 0 \}\text{.} \end{align*}
(a)
Show that for all \(f \in U\text{,}\) \(\inf_{t \in [a,b]} f(t) \gt 0\text{,}\) and use this to prove that \(U\) is open.
(b)
Show that \(F\) is closed.