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.
- 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{.}\)
- A set \(F \subseteq X\) is called closed if the complement \(X \setminus F\) is open.
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{.}\)
- 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{.}\)
- 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{.}\)
- 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{.}\)
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.
Lemma 1.21.
Let \((X,d)\) be a metric space. Let \(x_0 \in X\) and \(r \gt 0\text{.}\) Then \(B_r(x_0)\) is open.
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.
Theorem 1.22.
Let \(S\) be a subset of a metric space \((X,d)\text{.}\) Then
- \(S^\circ\) is open, and
- if \(U \subseteq S\) is open, then \(U \subseteq S^\circ\text{.}\)
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.
Theorem 1.23.
Let \(S\) be a subset of a metric space \((X,d)\text{.}\) Then
- \(\overline S\) is closed, and
- if \(F \supseteq S\) is closed, then \(F \supseteq \overline S\text{.}\)
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.
Theorem 1.24.
Let \(S\) be a subset of a metric space \((X,d)\text{.}\) Then \(\partial S = \overline S \setminus S^\circ\text{.}\)
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.
Theorem 1.25.
In any metric space \((X,d)\text{,}\)
- \(\varnothing\) and \(X\) are open;
- if \(\set{U_\lambda}{\lambda \in \Lambda}\) is any collection of open sets, then the union \(\bigcup_{\lambda \in \Lambda} U_\lambda\) is open; and
- if \(\{U_1, \dotsc, U_N\}\) is a finite collection of open sets, then the intersection \(\bigcap_{n=1}^N U_n\) is open.
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{.}\)
Theorem 1.26.
In any metric space \((X,d)\text{,}\)
- \(\varnothing\) and \(X\) are closed;
- if \(\set{F_\lambda}{\lambda \in \Lambda}\) is any collection of closed sets, then \(\bigcap_{\lambda \in \Lambda} F_\lambda\) is closed; and
- if \(\{F_1, \dotsc, F_N\}\) is a finite collection of closed sets, then \(\bigcup_{n=1}^N F_n\) is closed.
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*}
Corollary 1.27. Open sets are unions of balls.
A subset of a metric space is open if and only if it can be written as a (possibly infinite) union of open balls.
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.
Lemma 1.28. Open sets in metric subspaces.
Let \((Y,d')\) be a metric subspace of a metric space \((X,d)\text{.}\)
- For any centre \(y \in Y\) and radius \(r \gt 0\text{,}\) the associated open balls \(B_r(y)\) in \((X,d)\) and \(B_r'(y)\) in \((Y,d')\) are related by \(B_r'(y) = B_r(y) \cap Y\text{.}\)
- A subset \(V \subseteq Y\) is open in \((Y,d')\) if and only if it can be written as \(V = U \cap Y\) where \(U\) is an open subset of \((X,d)\text{.}\)
Proof.
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.
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.