# Closed Sets

In topology, a **closed set** is a set whose complement is open. Many topological properties which are defined in terms of open sets (including continuity) can be defined in terms of closed sets as well. In the familiar setting of a metric space, closed sets can be characterized by several equivalent and intuitive properties, one of which is as follows: a closed set is a set which contains all of its boundary points. They can be thought of as generalizations of closed intervals on the real number line.

## Formal Definition

In all but the last section of this wiki, the setting will be a general metric space \((X,d).\) Those readers who are not completely comfortable with abstract metric spaces may think of \(X\) as being \({\mathbb R}^n,\) where \(n=2\) or \(3\) for concreteness, and the distance function \(d(x,y)\) as being the standard Euclidean distance between two points.

A closed set in a metric space \( (X,d)\) is a subset \(Z\) of \(X\) with the following property: for any point \( x \notin Z,\) there is a ball \(B(x,\epsilon)\) around \(x\) \((\text{for some } \epsilon > 0)\) which is disjoint from \(Z.\)

Recall that a *ball* \( B(x,\epsilon)\) is the set of all points \(y\in X\) satisfying \(d(x,y)<\epsilon.\) The definition of an open set makes it clear that this definition is equivalent to the statement that the complement of \(Z\) is open.

## Distance and Boundary Points

An alternative formulation of closedness makes use of the distance function.

Let \(S\) be a subset of a metric space \((X,d),\) and let \(x \in X\) be a point. Then define \[ d(x,S) = \inf_{s \in S} d(x,s). \] Here \(\inf\) denotes the infimum or greatest lower bound.

Given this definition, the definition of a closed set can be reformulated as follows:

A subset \(Z\) of a metric space \((X,d)\) is closed if and only if, for any point \(x \notin Z,\) \(d(x,Z)>0.\)

Indeed, if there is a ball of radius \(\epsilon\) around \(x\) which is disjoint from \(Z,\) then \(d(x,Z)\) has to be at least \(\epsilon.\)

Another equivalent definition of a closed set is as follows: \(Z\) is closed if and only if it contains all of its boundary points. This follows from the complementary statement about open sets (they contain none of their boundary points), which is proved in the open set wiki. Indeed, the boundary points of \(Z\) are precisely the points which have distance \(0\) from both \(Z\) and its complement.

## Properties

**Trivial closed sets:** The empty set and the entire set \(X\) are both closed. This is because their complements are open.

Important warning:These two sets are examples of sets that are both closed and open. "Closed" and "open" are not antonyms: it is possible for sets to be both, and it is certainly possible for sets to be neither. For instance, the half-open interval \( [0,1) \subset {\mathbb R}\) is neither closed nor open.

**Unions and intersections:** The intersection of an arbitrary collection of closed sets is closed. The union of finitely many closed sets is closed.

These properties follow from the corresponding properties for open sets. Note that the union of infinitely many closed sets may not be closed:

Let \( I_n\) be the closed interval \(\left[\frac{1}{2^n},1\right]\) in \(\mathbb R.\) Then \( \bigcup\limits_{n=1}^\infty I_n = (0,1],\) which is not closed, since it does not contain its boundary point \( 0.\)

**Limit points:** A point \(x\) in a metric space \(X\) is a *limit point* of a subset \(S\) if \(\lim\limits_{n\to\infty} s_n = x\) for some sequence of points \(s_n \in S.\) Here are two facts about limit points:

1. A point \(x\) is a limit point of \(S\) if and only if every open ball containing it contains at least one point in \(S\) which is not \(x.\)

2. A subset of a metric space \(X\) is closed if and only if it contains all its limit points.

If \(x\) is a limit point of \(S,\) so that there is a sequence \(s_n\) converging to it, then any open ball around \(x\) must contain some (indeed, all but finitely many) of the \(s_n.\) On the other hand, if any open ball around \(x\) contains some points of \(S\) not equal to \(x,\) then construct \(s_n \in S\) by taking \(s_n\) to be a point in \(S\) inside \(B\big(x,\frac1n\big).\) Then \(\lim\limits_{n\to\infty} s_n = x\) because \(d(s_n,x)<\frac1n\) for all \(n.\)

If \(Z\) is closed and \(x\) is a limit point of \(Z\) which is not in \(Z,\) then by the above discussion, \(d(x,Z)\) is some positive number, say \(\epsilon.\) But there is a sequence \(z_n\) of points in \(Z\) which converges to \(x,\) so infinitely many of them lie in \(B(x,\epsilon),\) i.e. their distance to \(x\) is \(<\epsilon.\) This is a contradiction.

On the other hand, if \(Z\) is a set that contains all its limit points, suppose \(x\notin Z.\) Then there is some open ball around \(x\) not meeting \(Z,\) by the criterion we just proved in the first half of this theorem. This is the condition for the complement of \(Z\) to be open, so \(Z\) is closed.

Consider the metric space \(\mathbb{R}^2\) equipped with the standard Euclidean distance

\[d\big((x_1, x_2), (y_1, y_2)\big) = \sqrt{(x_1 - y_1)^2 + (x_2 - y_2)^2}.\]

How many of the following subsets \(S \subset \mathbb{R}^2\) are closed in this metric space?

- \(S = \{(x,y) \, : \, x^2 +y^2 = 1\}\)
- \(S = \{(x,y) \, : \, x^2 +y^2 \le 1\}\)
- \(S = \{(x,y) \, : \, x \in \mathbb{Q}, y \in \mathbb{Q} \}\)
- \(S = \{(x,0) \, : \, x\in \mathcal{C}\}\), where \(\mathcal{C} \subset \mathbb{R}\) is the middle-thirds Cantor set

**Continuity:** A function \(f \colon {\mathbb R}^n \to {\mathbb R}^m\) is continuous if and only if \( f^{-1}(Z)\subset {\mathbb R}^n\) is closed, for all closed sets \(Z\subseteq {\mathbb R}^m.\) This follows directly from the equivalent criterion for open sets, which is proved in the open sets wiki.

Note that these last two properties give ways to make notions of limit and continuity more abstract, without using the distance function. In abstract topological spaces, limit points are defined by the criterion in 1 above (with "open ball" replaced by "open set"), and a continuous function can be defined to be a function such that preimages of closed sets are closed.

## Closure

The **closure** \( \overline S \) of a set \(S\) is defined to be the smallest closed set containing \(S.\) Here are some properties, all of which are straightforward to prove:

\(\overline S\) equals the intersection of all the closed sets containing \(S.\)

\(S\) is closed if and only if it equals its closure.

If \( S^c\) denotes the complement of \(S,\) then \( {\overline S} = \big(\text{int}(S^c)\big)^c,\) where \(\text{int}\) denotes the interior.

\( \overline S\) is the union of \(S\) and its boundary.

\( \overline S\) equals the set of limit points of \(S.\)

\( \overline S\) equals the set of points \(x\) such that \(d(x,S) = 0.\)

The closure of the interval \( (a,b) \subseteq {\mathbb R}\) is \( [a,b].\) This also equals the closure of \( (a,b], [a,b),\) and \([a,b].\)

What is the closure of the set \(\mathbb Q\) of rational numbers in \( \mathbb R\) (with the Euclidean distance metric)?

Every real number is a limit point of \( \mathbb Q,\) because we can always find a sequence of rational numbers converging to any real number. One way to do this is by truncating decimal expansions: for instance, to show that \(\pi\) is a limit point of \(\mathbb Q,\) consider the sequence \(3,\, 3.1,\, 3.14,\, 3.141,\, 3.1415, \ldots\) of rational numbers. This sequence clearly converges to \(\pi.\) So the closure of \(\mathbb Q\) inside \(\mathbb R\) is \(\mathbb R.\)

Here are three statements about the closure \(\overline S\) of a set \(S\) inside a metric space \(X.\)

I. Let \(S,T\) be subsets of \(X.\) Then \(\overline{S \cap T} = {\overline S} \cap {\overline T}.\)

II. Let \(S,T\) be subsets of \(X.\) Then \( \overline{S \cup T} = {\overline S} \cup {\overline T}.\)

III. If \( {\overline S} = X,\) then \(S=X.\)

Which of these statements is/are true?