Tutorials › Real Analysis › Open Sets in Metric Spaces

Metric Spaces · Tutorial 657 of 1000

Open Sets in Metric Spaces

Learn how metric balls define open sets and why open sets provide a flexible way to describe the geometry of a metric space.

Advanced 9 min read

What You'll Learn

  • State the pointwise ball condition that defines an open set
  • Prove that every open ball in a metric space is open
  • Verify that arbitrary unions and finite intersections of open sets are open
  • Distinguish openness in a space from openness in a larger space
  • Characterize open sets in a subset with the restricted metric
  • Apply the definitions to Euclidean and discrete metric spaces

From Metric Balls to Open Sets

A metric ball describes a region around one chosen point. Open sets extend that idea: a set is open when every point in it has some ball around it that stays inside the set. The radius may depend on the point, so an open set need not have a uniform margin from its boundary. This local condition is one of the basic ways a metric turns distances into a useful description of the space.

The previous tutorial established that a smaller ball around a point of a ball can be kept inside the original ball. We will use that result to show that balls themselves are open. We will then prove that arbitrary unions and finite intersections preserve openness, and examine what happens when a metric is restricted to a subset.

Definition: Let \((X,d)\) be a metric space. A set \(U\subseteq X\) is open in \(X\) if, for every \(x\in U\), there exists \(r>0\) such that $$ B_r(x)\subseteq U. $$ The ball \(B_r(x)\) is then called an open ball around \(x\) contained in \(U\). The radius is allowed to depend on \(x\).

The requirement concerns every point of \(U\), not just one selected point. If \(U\) is empty, the condition holds because there are no points in \(U\) for which it could fail. The whole space \(X\) is open because, for any \(x\in X\), every ball centered at \(x\) is a subset of \(X\).

Openness is always relative to a particular metric space. The same subset may be open in one space but not in a larger space containing it. We will return to this distinction after establishing the basic results.

Every Metric Ball Is Open

The definition says that a set is open if each of its points has room for a smaller ball inside it. A point in a metric ball has exactly such room: the difference between the original radius and the point’s distance from the center is positive.

Theorem (Open Balls Are Open): Let \((X,d)\) be a metric space, \(x\in X\), and \(r>0\). Then \(B_r(x)\) is open in \(X\).

Proof. Take any \(z\in B_r(x)\). By definition, \(d(x,z)<r\), so \(r-d(x,z)>0\). Set \(t=r-d(x,z)\). The result “A Smaller Ball Around an Interior Point” from the previous tutorial gives $$ B_t(z)\subseteq B_r(x), $$ because \(t\leq r-d(x,z)\), with equality in this choice. Thus every point \(z\) of \(B_r(x)\) has a positive-radius ball around it contained in \(B_r(x)\). This is precisely the definition of openness. \(\square\)

The strict inequality in the definition of the original ball matters: it ensures that \(r-d(x,z)\) is positive at every point inside the ball. A point at distance exactly \(r\) would have no positive margin of this kind.

Worked Example: An Open Interval as a Metric Ball

Use the usual metric \(d(x,y)=|x-y|\) on \(\mathbb{R}\). For \(a\in\mathbb{R}\) and \(r>0\), membership in the ball means $$ x\in B_r(a) \quad\Longleftrightarrow\quad |x-a|<r \quad\Longleftrightarrow\quad a-r<x<a+r. $$ Therefore \(B_r(a)=(a-r,a+r)\), an open interval. For instance, \(B_{2/3}(4)=(10/3,14/3)\). The theorem shows, in particular, that this interval is open in \(\mathbb{R}\).

The definition also verifies openness directly. If \(z\in(a-r,a+r)\), then \(|z-a|<r\), so \(t=r-|z-a|>0\). For every \(w\in B_t(z)\), the triangle inequality gives $$ |w-a|\leq |w-z|+|z-a|<t+|z-a|=r. $$ Hence \(w\in(a-r,a+r)\), and \(B_t(z)\subseteq(a-r,a+r)\).

Unions and Finite Intersections

Open sets can be combined in useful ways. A point in a union belongs to at least one of the sets being united, so it can use a ball from that set. For an intersection of finitely many open sets, a point has a suitable ball for each set; choosing the smallest of the finitely many radii gives a ball that works for all of them.

Theorem (Unions and Finite Intersections of Open Sets): In a metric space \(X\), the union of any collection of open sets is open. The intersection of finitely many open sets is open. In particular, \(\varnothing\) and \(X\) are open.

Proof. Let \(\{U_i:i\in I\}\) be any collection of open subsets of \(X\), and put \(U=\bigcup_{i\in I}U_i\). If \(U\) is empty, it is open by the definition. Otherwise, take \(x\in U\). There is some index \(i\in I\) for which \(x\in U_i\). Since \(U_i\) is open, there is an \(r>0\) such that \(B_r(x)\subseteq U_i\). Because \(U_i\subseteq U\), it follows that \(B_r(x)\subseteq U\). Thus \(U\) is open.

Now let \(U_1,\ldots,U_n\) be open sets, where \(n\geq1\), and let \(x\in\bigcap_{j=1}^n U_j\). For each \(j\), openness gives a radius \(r_j>0\) such that \(B_{r_j}(x)\subseteq U_j\). Since there are finitely many radii, their minimum \(r=\min\{r_1,\ldots,r_n\}\) exists and is positive. If \(y\in B_r(x)\), then \(d(x,y)<r\leq r_j\) for every \(j\), so \(y\in B_{r_j}(x)\subseteq U_j\) for every \(j\). Consequently, $$ B_r(x)\subseteq\bigcap_{j=1}^n U_j. $$ Every point of the intersection therefore has a ball contained in it, proving that the intersection is open. If the intersection is empty, it is open as already noted. Finally, \(X\) is open because \(B_1(x)\subseteq X\) for every \(x\in X\). The empty set is open by the vacuous condition in the definition. \(\square\)

The finiteness condition for intersections is essential to this proof: for infinitely many radii, their infimum can be zero, so there may be no positive radius that works for all sets at once. In \(\mathbb{R}\), for example, every set \(U_n=(-1/n,1/n)\), for \(n\geq1\), is open, but their intersection is \(\{0\}\), which is not open. Indeed, every ball around \(0\) contains nonzero real numbers.

Worked Example: A Union of Balls With Different Centers

In \(\mathbb{R}\) with its usual metric, consider $$ U=B_1(-2)\cup B_{1/2}(3). $$ The two balls are \((-3,-1)\) and \((5/2,7/2)\), respectively, so $$ U=(-3,-1)\cup(5/2,7/2). $$ To check openness using the definition, take \(x\in U\). If \(x\in(-3,-1)\), then \(x\in B_1(-2)\), which is open by the theorem on open balls; hence some positive-radius ball centered at \(x\) is contained in \(B_1(-2)\), and therefore in \(U\). If \(x\in(5/2,7/2)\), the same reasoning uses \(B_{1/2}(3)\). These two cases cover every point of \(U\), so \(U\) is open.

Openness in a Subset

Suppose \(A\subseteq X\) is given the restricted metric, as in the previous tutorial. A ball in \(A\) is the intersection of \(A\) with the corresponding ball in \(X\). This relationship leads to a precise description of open sets in the subset: they are intersections of \(A\) with open sets of the larger space.

Theorem (Open Sets in a Restricted Metric): Let \(A\) be a nonempty subset of a metric space \((X,d)\), equipped with the restricted metric. A set \(V\subseteq A\) is open in \(A\) if and only if there is an open set \(U\subseteq X\) such that $$ V=A\cap U. $$

Proof. First suppose \(V\) is open in \(A\). For each \(x\in V\), there is a radius \(r_x>0\) such that \(B_{r_x}^{A}(x)\subseteq V\). Define the subset of \(X\) $$ U=\bigcup_{x\in V}B_{r_x}^{X}(x). $$ Each ball in this union is open in \(X\), and arbitrary unions of open sets are open by the theorem just proved. Thus \(U\) is open in \(X\). For each \(x\in V\), \(x\in B_{r_x}^{X}(x)\), so \(V\subseteq A\cap U\). Conversely, if \(y\in A\cap U\), then for some \(x\in V\) we have \(y\in B_{r_x}^{X}(x)\). As \(y\in A\), the restricted-metric identity for balls gives \(y\in B_{r_x}^{A}(x)\subseteq V\). Therefore \(A\cap U=V\).

For the reverse implication, suppose \(U\) is open in \(X\) and \(V=A\cap U\). Take \(x\in V\). Then \(x\in U\), so some \(r>0\) satisfies \(B_r^{X}(x)\subseteq U\). The restricted-metric identity gives $$ B_r^{A}(x)=A\cap B_r^{X}(x)\subseteq A\cap U=V. $$ Thus every point of \(V\) has a ball in \(A\) contained in \(V\), so \(V\) is open in \(A\). If \(V\) is empty, it is open in \(A\) by definition, and the first implication holds with \(U=\varnothing\). This also covers that edge case. \(\square\)

Worked Example: A Set Open on an Interval but Not in the Line

Let \(A=[0,1]\subseteq\mathbb{R}\) with the restricted usual metric. The set \([0,1)\) is not open in \(\mathbb{R}\): every ball around \(0\) contains negative real numbers, which do not belong to \([0,1)\). But it is open in \(A\), since $$ [0,1)=A\cap(-1,1), $$ and \((-1,1)\) is open in \(\mathbb{R}\). The restricted-metric theorem therefore implies that \([0,1)\) is open in \(A\).

The ball condition verifies this directly as well. At \(x=0\), the relative ball \(B_{1/2}^{A}(0)\) is \([0,1/2)\), which is contained in \([0,1)\). At any \(x\in(0,1)\), choose \(r=(1-x)/2>0\). If \(y\in B_r^{A}(x)\), then \(y\in A\) and \(y<x+r=(1+x)/2<1\), so \(y\in[0,1)\). Thus every point of \([0,1)\) has a suitable ball in \(A\).

Worked Example: Every Subset in the Discrete Metric

Let \(X\) carry the discrete metric \(\delta\), which assigns distance \(1\) to distinct points and \(0\) to identical points. For any \(x\in X\), the ball \(B_{1/2}(x)\) is \(\{x\}\): the point \(x\) has distance \(0<1/2\), while each \(y\ne x\) has distance \(1\not<1/2\). Now take any subset \(S\subseteq X\). For every \(x\in S\), the ball \(B_{1/2}(x)=\{x\}\) is contained in \(S\). Hence \(S\) is open. If \(S=\varnothing\), openness holds vacuously. This example shows that the metric determines which subsets are open; in a discrete metric, there is no restriction on the choice of subset.

Why the Local Definition Matters

The ball condition is local: at each point, it asks for some positive radius, but it does not require one radius to work everywhere. For example, the interval \((0,1)\) is open in \(\mathbb{R}\). At a point \(x\in(0,1)\), the radius $$ r=\frac{1}{2}\min\{x,1-x\} $$ is positive. If \(|y-x|<r\), then \(y>x-r\geq x/2>0\) and \(y<x+r\leq (x+1)/2<1\), so \(y\in(0,1)\). But these radii get smaller as \(x\) approaches either endpoint; there is no single positive radius that works at every point.

A common mistake is to decide whether a set is open by looking only at its boundary or by using a familiar picture from the real line. The definition works in any metric space and depends on its metric. The restricted-metric example illustrates a second common pitfall: a set can fail to be open in the larger space and still be open in a subset. Always identify the space in which openness is being tested.

The results also explain why open sets are a natural language for metric spaces. Balls are open, unions of open sets remain open even when there are infinitely many of them, and finite intersections remain open. These facts allow complicated regions to be assembled from simple local pieces while preserving the ball condition.

Takeaway: A subset of a metric space is open when every one of its points has a positive-radius ball contained in the set. Metric balls are open, arbitrary unions and finite intersections preserve openness, and openness in a restricted metric is relative to the subset.

Check Your Understanding

Use the definition and results above to answer the following questions.

  1. Why does every point \(z\in B_r(x)\) have a positive margin available for a smaller ball around it?
  2. In proving that a finite intersection of open sets is open, why can the radii be replaced by their minimum?
  3. Give an example in \(\mathbb{R}\) of an infinite intersection of open sets that is not open.
  4. How can a set fail to be open in \(\mathbb{R}\) but be open in a subset with the restricted metric?
  5. Why is every subset of a space with the discrete metric open?