Tutorials › Topology (Undergraduate) › Testing Candidate Sets for Metric Openness

Metric Spaces and Open Balls · Tutorial 55 of 799

Testing Candidate Sets for Metric Openness

Practice deciding metric openness in Euclidean, discrete, and finite metric spaces by checking the balls around points.

Beginner 10 min read

What You'll Learn

  • Apply the ball criterion for openness to specified subsets.
  • Find a radius that keeps a ball inside an interval or half-plane.
  • Disprove openness by finding points outside a set arbitrarily close to one of its points.
  • Explain why every subset of a finite metric space is open.
  • Check openness in the discrete metric using its ball structure.

Testing a Set One Point at a Time

A set can look open or closed in a picture, but the definition of metric openness asks a precise local question: around each point of the set, can we fit a ball that stays inside it? To prove a set open, we must answer yes at every one of its points. To prove it is not open, it is enough to find one point where every positive-radius ball reaches outside.

Let \((X,d)\) be a metric space. Its open ball of radius \(r>0\) centered at \(x\in X\) is \(B_d(x,r)=\{y\in X:d(x,y)<r\}\). The topology induced by \(d\) consists of the metric-open subsets of \(X\). The real line \(\mathbb{R}\) below has its standard metric \(d(x,y)=|x-y|\); \(\mathbb{R}^2\) has the Euclidean metric.

Definition: A subset \(A\subseteq X\) is open in the metric topology if for every \(x\in A\), there is a real number \(r>0\) such that \(B_d(x,r)\subseteq A\). For \(A=\varnothing\), this condition holds because there are no points \(x\in A\) to check.

The quantifiers are important: the radius may depend on the point \(x\). A single radius that works for every point is not required. Conversely, testing just one convenient point does not establish openness; every point of the set must have a suitable ball.

Open and Half-Open Intervals

Proposition: If \(a<b\) are real numbers, then \((a,b)\) is open in \(\mathbb{R}\), while \([a,b]\) and \([a,b)\) are not open in \(\mathbb{R}\).

Proof. First let \(x\in(a,b)\). Both \(x-a\) and \(b-x\) are positive, so \(r=\frac12\min(x-a,b-x)>0\). If \(y\in B(x,r)\), then \(|y-x|<r\), which gives \(y>x-r\geq x-\frac12(x-a)=\frac12(x+a)>a\). Also \(y<x+r\leq x+\frac12(b-x)=\frac12(x+b)<b\). Thus \(B(x,r)\subseteq(a,b)\), proving openness.

For \([a,b]\), the point \(a\) belongs to the set. Given any \(r>0\), put \(y=a-r/2\). Then \(|y-a|=r/2<r\), so \(y\in B(a,r)\), but \(y<a\), hence \(y\notin[a,b]\). No ball centered at \(a\) is contained in \([a,b]\). The same point \(a\) belongs to \([a,b)\), and the same calculation shows that no ball centered there is contained in \([a,b)\). Therefore neither set is open. \(\square\)

Worked Example: Finding Radii Inside an Open Interval

Test whether \(A=(-2,3)\) is open in \(\mathbb{R}\). The proposition already gives a general method, but applying it at particular points shows how the radius changes with the point.

At \(x=0\), the distances to the endpoints are \(0-(-2)=2\) and \(3-0=3\). Choose \(r=\frac12\min(2,3)=1\). Then \(B(0,1)=(-1,1)\), which is contained in \((-2,3)\).

At \(x=\frac52\), the endpoint distances are \(\frac52-(-2)=\frac92\) and \(3-\frac52=\frac12\). Choose \(r=\frac12\min(\frac92,\frac12)=\frac14\). Then \(B(\frac52,\frac14)=(\frac94,\frac{11}4)\), and \(-2<\frac94\) and \(\frac{11}4<3\), so this ball is also contained in \(A\).

For an arbitrary \(x\in(-2,3)\), take \(r=\frac12\min(x+2,3-x)\). Both quantities in the minimum are positive. The proposition’s proof shows that every \(y\) with \(|y-x|<r\) satisfies \(-2<y<3\). Thus a suitable ball exists at every point, and \(A\) is open.

Check: at \(x=\frac52\), the proposed radius gives \(\frac52-\frac14=\frac94>-2\) and \(\frac52+\frac14=\frac{11}4<3\), verifying both endpoints of the ball lie inside the interval.

Worked Example: A Set That Fails at Its Included Endpoint

Test \(A=[0,2)\) in \(\mathbb{R}\). The point \(0\) belongs to \(A\). For an arbitrary radius \(r>0\), choose \(y=-r/2\). Then \(|y-0|=r/2<r\), so \(y\in B(0,r)\); but \(y<0\), so \(y\notin A\). Therefore every ball centered at \(0\) contains a point outside \(A\), and \(A\) is not open.

For a concrete radius, if \(r=\frac12\), then \(B(0,\frac12)=(-\frac12,\frac12)\). The point \(-\frac14\) is in this ball because \(|-\frac14-0|=\frac14<\frac12\), but it is not in \([0,2)\). This illustrates why checking only that the interval extends to the right of \(0\) is insufficient: a real-line ball also contains points to the left.

Testing a Half-Plane in the Euclidean Metric

In \(\mathbb{R}^2\), a ball is not an interval but a disk. The same test applies, with the Euclidean distance \(\|(u,v)-(x,y)\|=\sqrt{(u-x)^2+(v-y)^2}\).

Proposition: The upper half-plane \(H=\{(u,v)\in\mathbb{R}^2:v>0\}\) is open in the Euclidean metric, while \(F=\{(u,v)\in\mathbb{R}^2:v\geq0\}\) is not open.

Proof. Let \((u,v)\in H\), so \(v>0\). Set \(r=v/2>0\). For any \((s,t)\in B((u,v),r)\), the Euclidean distance condition gives \(\sqrt{(s-u)^2+(t-v)^2}<r\), and therefore \(|t-v|<r\). Consequently \(t>v-r=v/2>0\), so \((s,t)\in H\). This supplies a contained ball at every point of \(H\).

For \(F\), the point \((0,0)\) belongs to \(F\). For every \(r>0\), the point \((0,-r/2)\) has Euclidean distance \(r/2<r\) from \((0,0)\), but its second coordinate is negative, so it is outside \(F\). Hence no ball centered at \((0,0)\) is contained in \(F\), and \(F\) is not open. \(\square\)

Worked Example: Checking a Point in the Upper Half-Plane

At the point \(p=(1,-1)\), the second coordinate is negative, so this point is not in \(H=\{(u,v):v>0\}\). To see explicitly that it cannot be used as a point around which to test openness of \(H\), observe that the openness condition only asks for balls centered at points that belong to the set. Instead test \(q=(1,2)\), which does belong to \(H\).

At \(q\), choose \(r=2/2=1\). If \((s,t)\in B((1,2),1)\), then \(\sqrt{(s-1)^2+(t-2)^2}<1\), so \(|t-2|<1\). Hence \(t>1>0\), and \((s,t)\in H\). For example, the point \((1,1.5)\) has distance \(\sqrt{(1-1)^2+(1.5-2)^2}=\sqrt{0+0.25}=0.5<1\), and its second coordinate \(1.5\) is positive.

Check: the radius is \(1\), and the bound on the second coordinate is \(t>2-1=1\). Thus every point of the chosen ball has positive second coordinate, as required.

Discrete and Finite Metric Spaces

In the discrete metric on a set \(X\), the distance is \(d(x,y)=0\) when \(x=y\) and \(d(x,y)=1\) when \(x\ne y\). Its balls of radius less than or equal to \(1\) isolate their centers: because membership requires the strict inequality \(d(x,y)<r\), a point at distance exactly \(1\) is excluded when \(r=1\).

Worked Example: An Arbitrary Subset in the Discrete Metric

Let \(X=\{a,b,c,d\}\) with the discrete metric, and test \(A=\{a,c\}\). At \(a\), take radius \(r=1\). The ball consists of points \(y\) satisfying \(d(a,y)<1\). The center has distance \(d(a,a)=0<1\), while \(d(a,b)=d(a,c)=d(a,d)=1\), and none of those distances is strictly less than \(1\). Therefore \(B(a,1)=\{a\}\subseteq A\).

At \(c\), the distances are \(d(c,c)=0<1\) and \(d(c,a)=d(c,b)=d(c,d)=1\), so \(B(c,1)=\{c\}\subseteq A\). These are all the points of \(A\), so the ball criterion proves \(A\) is open. The same choice \(r=1\) works at every point of any subset of a discrete metric space; the empty set is open by the vacuous condition.

Check: \(d(a,c)=1\), and \(1<1\) is false. Thus \(c\) is correctly excluded from \(B(a,1)\), even though it is a point of \(A\).

A related fact applies to every finite metric space, not just one with the discrete metric. Distinct points in such a space can have different distances, but there are only finitely many distances to consider.

Theorem: Every subset of a finite metric space is open in the topology induced by its metric.

Proof. Let \((X,d)\) be finite and let \(A\subseteq X\). If \(A=\varnothing\), it is open by the definition. If \(A\) has one point \(x\), or more points, fix any \(x\in A\). When \(X=\{x\}\), the ball of any positive radius, for example \(1\), is \(X\), so it is contained in \(A\). Otherwise, the finite set \(\{d(x,y):y\in X,\ y\ne x\}\) is nonempty and consists of positive real numbers, since a metric assigns positive distance to distinct points. It therefore has a minimum \(\delta>0\). Choose \(r=\delta\). The center \(x\) lies in \(B(x,r)\) because \(d(x,x)=0<r\). Every other point \(y\ne x\) has \(d(x,y)\geq\delta=r\), so it does not lie in the ball, whose condition is strict. Thus \(B(x,r)=\{x\}\subseteq A\). This construction works for every \(x\in A\), proving that \(A\) is open. \(\square\)

Worked Example: A Non-Discrete Metric on Three Points

Let \(X=\{a,b,c\}\) with distances \(d(a,b)=2\), \(d(a,c)=3\), and \(d(b,c)=4\), together with \(d(x,x)=0\) and symmetry. These values define a metric: the nontrivial triangle inequalities are \(4\leq2+3=5\), \(3\leq2+4=6\), and \(2\leq3+4=7\); all hold. Test \(A=\{a,c\}\).

At \(a\), take \(r=2\). We have \(d(a,a)=0<2\), while \(d(a,b)=2\) is not strictly less than \(2\) and \(d(a,c)=3\) is not less than \(2\). Thus \(B(a,2)=\{a\}\subseteq A\). At \(c\), take \(r=3\). We have \(d(c,c)=0<3\), while \(d(c,a)=3\) and \(d(c,b)=4\) are not strictly less than \(3\). Thus \(B(c,3)=\{c\}\subseteq A\). These checks at both points of \(A\) prove that \(A\) is open.

Check: the distance from \(c\) to \(a\) is exactly the chosen radius \(3\), so \(a\notin B(c,3)\). Using \(r>3\) instead would include \(a\), but the radius \(3\) already gives the needed contained ball.

A Common Mistake and a Practical Checklist

Common mistake. One might claim that \([0,2)\) is open because a small interval to the right of \(0\), such as \([0,\frac12)\), stays inside the set. But \([0,\frac12)\) is not a ball centered at \(0\) in \(\mathbb{R}\). The ball of radius \(\frac12\) is \(B(0,\frac12)=(-\frac12,\frac12)\), which contains \(-\frac14\notin[0,2)\). The correction is to use the actual metric ball and check all its points, not just the direction in which the set extends.

When testing a candidate set, first identify its points and the metric being used. For each point of the set, choose a positive radius and verify that every point at distance strictly less than that radius remains in the set. If trying to disprove openness, find one included point and show that for every positive radius there is an excluded point at distance less than that radius. The choice of a point outside the set is not enough by itself: the failure must occur in every ball around a point that belongs to the set.

The examples also show why the metric matters. In the discrete metric, a radius of \(1\) isolates each point, so every subset is open. In a finite metric space, the least positive distance from a chosen point to the other points supplies an isolating radius. In \(\mathbb{R}\) or \(\mathbb{R}^2\), points can lie arbitrarily close across a boundary, which is why a set containing its boundary point may fail the ball test.

Check Your Understanding

For each question, state the metric and use the ball criterion explicitly.

  1. Show that \((1,4)\) is open in \(\mathbb{R}\) by giving a suitable radius for an arbitrary point \(x\in(1,4)\).
  2. Is \((0,1]\) open in \(\mathbb{R}\)? If not, identify a point in the set and, for an arbitrary radius \(r>0\), a point outside the set within distance less than \(r\).
  3. In the Euclidean metric on \(\mathbb{R}^2\), test whether \(\{(u,v):v<3\}\) is open.
  4. Why does the strict inequality in the definition of \(B_d(x,r)\) ensure that radius \(1\) isolates each point in the discrete metric?
  5. In a finite metric space \(X\), explain how the minimum positive distance from \(x\) to the other points gives a ball containing only \(x\). What if \(X=\{x\}\)?