Tutorials › Real Analysis › Metric Balls

Metric Spaces · Tutorial 656 of 1000

Metric Balls

Learn to define metric balls, compare them using distances between their centers, and interpret them in different metric spaces.

Advanced 9 min read

What You'll Learn

  • Define open balls, closed balls, and metric spheres in a general metric space
  • Use the triangle inequality to obtain sufficient conditions for one ball to lie inside another
  • Identify how a ball in a restricted metric relates to the corresponding ball in the larger space
  • Compare balls for the maximum and sum metrics on the plane
  • Interpret balls in the supremum metric as uniform bounds on functions
  • Distinguish a closed metric ball from a claim about topological closedness

From Distances to Regions

A metric assigns a number to each pair of points. It also lets us describe a region around a point: the set of points whose distance from it is less than a chosen radius. In Euclidean space, such regions are familiar disks and spheres, but the same construction works in every metric space, even when the points have no coordinates or the geometry looks unlike ordinary space.

The previous tutorial introduced several metrics on coordinate spaces and showed that they can assign different distances to the same pair. That difference also affects the regions determined by a fixed radius. We will define metric balls, use the triangle inequality to compare balls with different centers, and see how the definitions work in coordinate spaces and in a space of functions.

Definition: Let \((X,d)\) be a metric space, \(x\in X\), and \(r>0\). The open ball of radius \(r\) centered at \(x\) is $$ B_r(x)=\{y\in X:d(x,y)<r\}. $$ For \(r\geq0\), the closed ball of radius \(r\) centered at \(x\) is $$ \overline{B}_r(x)=\{y\in X:d(x,y)\leq r\}. $$ For \(r>0\), the sphere of radius \(r\) centered at \(x\) is $$ S_r(x)=\{y\in X:d(x,y)=r\}. $$

The center belongs to every open ball of positive radius because \(d(x,x)=0<r\); it also belongs to every closed ball. A sphere of positive radius, in contrast, does not contain its center. The open ball, sphere, and closed ball use strict inequality, equality, and non-strict inequality, respectively. These sets need not have the shapes suggested by their names in a drawing: their meaning is determined by the metric.

How the Triangle Inequality Controls Balls

Suppose two centers are close. A point near the first center cannot be too far from the second: the triangle inequality bounds its distance by the distance between the centers plus its distance from the first center. This gives a useful condition for one ball to fit inside another.

Theorem (Ball Containment by Center Distance): Let \((X,d)\) be a metric space, let \(x,y\in X\), and let \(r>0\). If \(s>0\) and $$ d(x,y)+r\leq s, $$ then $$ B_r(x)\subseteq B_s(y). $$ If \(r\geq0\), \(s\geq0\), and \(d(x,y)+r\leq s\), then $$ \overline{B}_r(x)\subseteq\overline{B}_s(y). $$

Proof. First take \(z\in B_r(x)\). By definition, \(d(x,z)<r\). The triangle inequality gives $$ d(y,z)\leq d(y,x)+d(x,z)<d(x,y)+r\leq s. $$ Thus \(z\in B_s(y)\), proving the open-ball inclusion.

Now take \(z\in\overline{B}_r(x)\), so \(d(x,z)\leq r\). Applying the triangle inequality gives $$ d(y,z)\leq d(y,x)+d(x,z)\leq d(x,y)+r\leq s. $$ Therefore \(z\in\overline{B}_s(y)\), proving the closed-ball inclusion. \(\square\)

The hypotheses give a sufficient condition for containment, not a general characterization. In an arbitrary metric space, a ball may contain another for reasons that cannot be read off just from the two radii and the distance between the centers. The theorem is valuable because its condition works in every metric space.

Taking \(x=y\) in the theorem shows that balls with a common center are nested as their radii increase. In particular, if \(0<r\leq s\), then \(B_r(x)\subseteq B_s(x)\). For a ball centered at a different point, the distance between the centers uses up part of the available radius: a ball of radius \(r\) around \(x\) fits inside the ball around \(y\) whenever \(d(x,y)+r\leq s\).

Worked Example: Nesting Euclidean Balls

Work in \(\mathbb{R}^2\) with the Euclidean metric. Let \(x=(0,0)\), \(y=(1,1)\), and \(r=1\). The distance between the centers is $$ d_2(x,y)=\sqrt{(0-1)^2+(0-1)^2}=\sqrt{2}. $$ If \(s=1+\sqrt{2}\), then \(d_2(x,y)+r=\sqrt{2}+1=s\). The containment theorem therefore gives $$ B_1((0,0))\subseteq B_{1+\sqrt{2}}((1,1)). $$ For a direct check, if \(z\in B_1((0,0))\), then \(d_2((0,0),z)<1\), and hence $$ d_2((1,1),z)\leq d_2((1,1),(0,0))+d_2((0,0),z) <\sqrt{2}+1. $$ The strict inequality means \(z\) lies in the larger open ball even though the radii satisfy equality in the sufficient condition.

Proposition (A Smaller Ball Around an Interior Point): Let \(x\in X\), \(r>0\), and \(z\in B_r(x)\). If \(t>0\) satisfies $$ t\leq r-d(x,z), $$ then \(B_t(z)\subseteq B_r(x)\).

Proof. Since \(z\in B_r(x)\), we have \(d(x,z)<r\), so \(r-d(x,z)>0\). For \(w\in B_t(z)\), the triangle inequality gives $$ d(x,w)\leq d(x,z)+d(z,w)<d(x,z)+t\leq r. $$ Thus \(w\in B_r(x)\), as required. \(\square\)

This proposition quantifies how much room is available around a point inside a ball. The distance \(r-d(x,z)\) is the margin between \(z\)'s distance from the center and the ball's radius. Any positive radius no greater than that margin gives a ball around \(z\) that stays within the original ball. The strict inequality in the definition of \(B_t(z)\) is what makes the conclusion valid even when \(t=r-d(x,z)\).

Balls in Subsets and Coordinate Spaces

A metric on a set can be restricted to a nonempty subset by keeping the same distances between points of that subset. A ball in the subset then consists exactly of the points of the larger-space ball that remain in the subset. This follows from the definition, rather than from any assumption about the shape or connectedness of the subset.

Theorem (Balls in a Restricted Metric): Let \((X,d)\) be a metric space, let \(A\subseteq X\) be nonempty, and give \(A\) the restricted metric \(d|_{A\times A}\). For \(x\in A\) and \(r>0\), the open ball in \(A\) is $$ B_r^A(x)=A\cap B_r^X(x). $$ The corresponding equality also holds for closed balls when \(r\geq0\).

Proof. For \(z\in A\), the restricted metric satisfies \(d|_{A\times A}(x,z)=d(x,z)\). Consequently, $$ z\in B_r^A(x) \quad\Longleftrightarrow\quad d|_{A\times A}(x,z)<r \quad\Longleftrightarrow\quad d(x,z)<r \quad\Longleftrightarrow\quad z\in A\cap B_r^X(x). $$ The equivalence proves the open-ball identity. Replacing each strict inequality by a non-strict one proves the closed-ball identity. \(\square\)

Worked Example: The Same Coordinate Point, Different Balls

Consider \(\mathbb{R}^2\) with the maximum metric $$ d_\infty((x_1,x_2),(y_1,y_2))=\max\{|x_1-y_1|,|x_2-y_2|\}. $$ The open ball of radius \(2\) centered at \((0,0)\) consists of points satisfying $$ \max\{|x_1|,|x_2|\}<2. $$ This is equivalent to the pair of inequalities \(-2<x_1<2\) and \(-2<x_2<2\), so the ball is the open square \((-2,2)\times(-2,2)\).

With the sum metric \(d_1((x_1,x_2),(y_1,y_2))=|x_1-y_1|+|x_2-y_2|\), the open ball of the same radius and center is instead $$ \{(x_1,x_2):|x_1|+|x_2|<2\}, $$ a diamond-shaped region. For example, \((3/2,3/2)\) belongs to the maximum-metric ball because \(\max\{3/2,3/2\}=3/2<2\), but it does not belong to the sum-metric ball because \(3/2+3/2=3\not<2\). The point \((1,0)\) belongs to both: its maximum distance is \(1<2\), and its sum distance is \(1<2\).

Worked Example: A Ball on a Circle

Let \(A=\{(u,v)\in\mathbb{R}^2:u^2+v^2=1\}\) have the restricted Euclidean metric. Take the center \(x=(1,0)\in A\) and radius \(1\). By the restricted-metric theorem, the ball in \(A\) is the intersection of \(A\) with the Euclidean ball of radius \(1\) around \(x\).

For a point \((u,v)\in A\), membership means $$ d_2((1,0),(u,v))<1 \quad\Longleftrightarrow\quad (u-1)^2+v^2<1. $$ Since \(u^2+v^2=1\) on \(A\), the left side of the inequality expands to $$ (u-1)^2+v^2=u^2-2u+1+v^2=2-2u. $$ Thus the condition is \(2-2u<1\), or \(u>1/2\). The ball in \(A\) is therefore the portion of the circle with first coordinate greater than \(1/2\). This description uses the Euclidean metric restricted to the circle; it does not measure distance along the circle.

Balls as Uniform Bounds

Metric balls can describe proximity between objects, not just proximity between coordinate points. For a space of functions equipped with the supremum norm, a ball is a set of functions whose values stay uniformly close to a chosen function. The word “uniformly” matters: one radius must bound the difference at every point in the domain.

Worked Example: A Ball in a Function Space

Let \(X=C[0,1]\), the continuous real-valued functions on \([0,1]\), with the metric \(d(f,g)=\|f-g\|_\infty\), where $$ \|h\|_\infty=\sup_{0\leq t\leq1}|h(t)|. $$ Consider the open ball of radius \(1/3\) centered at the zero function. By definition, $$ B_{1/3}(0)=\{f\in C[0,1]:\|f\|_\infty<1/3\}. $$ For the constant function \(g(t)=1/4\), every value satisfies \(|g(t)|=1/4\), so \(\|g\|_\infty=1/4<1/3\) and \(g\in B_{1/3}(0)\). For the constant function \(h(t)=1/2\), \(\|h\|_\infty=1/2>1/3\), so \(h\notin B_{1/3}(0)\). In general, membership requires \(|f(t)|<1/3\) uniformly over the entire interval; checking the bound at just one value of \(t\) is not enough.

What Ball Notation Does—and Does Not—Say

A metric ball is a set defined by a distance inequality. Its appearance depends on the chosen metric, and it may be a disk, a square, a diamond, a collection of isolated points, or a region in a function space. The examples show why a statement about balls should specify both the metric and the center and radius. Changing the metric while keeping the same set and radius can change which points belong.

There is also a distinction between the name “closed ball” and a topological claim. Here, “closed ball” means the set defined by \(d(x,y)\leq r\). The definition by itself does not assert any topological property; whether such a set is closed in the relevant topology is a separate question. Likewise, an open ball is defined by \(d(x,y)<r\). The next tutorial studies open sets in metric spaces and explains the role these balls play there.

The containment theorem is often the practical tool to remember: the triangle inequality lets us transfer a distance bound from one center to another. The restricted-metric identity is equally useful when a metric space is a subset of a larger one. Together, these facts let us work with balls without relying on a drawing or on Euclidean coordinates.

Takeaway: In a metric space, a ball is defined by comparing distance from a center with a radius. The triangle inequality gives a general sufficient condition for ball containment, and a ball in a restricted metric is the intersection of the larger-space ball with the subset.

Check Your Understanding

Use the definitions and results in this tutorial to answer the following questions.

  1. Why does the center of a metric ball belong to every open ball of positive radius?
  2. If \(d(x,y)=2\), what condition on \(r\) and \(s\) from the containment theorem guarantees \(B_r(x)\subseteq B_s(y)\)?
  3. In \(\mathbb{R}^2\) with the sum metric, what inequality describes the open ball of radius \(3\) centered at \((0,0)\)?
  4. For a point \(z\in B_r(x)\), why is \(r-d(x,z)\) positive, and what does it tell us about a ball centered at \(z\)?
  5. How is the ball in a subset with the restricted metric related to the ball in the larger metric space?