Open and Closed Balls in Metric Spaces
Recall from the Open and Closed Balls in Euclidean Space page that if $\mathbf{a} = (a_1, a_2, ..., a_n) \in \mathbb{R}^n$ then the open ball centered at $\mathbf{a}$ with radius $r > 0$ is as the set of points $\mathbf{x} = (x_1, x_2, ..., x_n) \in \mathbb{R}^n$ contained in:
(1)Similarly, the closed ball centered at $\mathbf{a}$ with radius $r \geq 0$ is the set of points $\mathbf{x} \in \mathbb{R}^n$ contained in:
(2)Now notice that $\| \mathbf{x} - \mathbf{a} \|$ is simply the Euclidean distance function $d : \mathbb{R}^n \to [0, \infty)$ for the metric space $(\mathbb{R}^n, d)$. We can extend the concept of open and closed balls to any metric space with its own defined metric as defined below.
Definition: If $(M, d)$ is a metric space, $a \in M$, and $r > 0$ then the Open Ball centered at $a$ with radius $r$ is defined to be the set $B(a, r) = \{ x \in M : d(x, a) < r \}$. |
For example, consider the metric space $(\mathbb{R}^2, d)$ where the metric $d : \mathbb{R}^2 \times \mathbb{R}^2 \to [0, \infty)$ for all $\mathbf{x} = (x_1, x_2), \mathbf{y} = (y_1, y_2) \in \mathbb{R}^2$ by:
(3)Then for each $\mathbf{a} = (a_1, a_2) \in \mathbb{R}^2$, we can define the open ball centered at $\mathbf{a}$ and with radius $r > 0$ to be the set of all points $\mathbf{x} \in \mathbb{R}^2$ contained in:
(4)We can likewise define the closed ball centered at $\mathbf{a} \in M$ for some metric space $(M, d)$ as follows.
Definition: If $(M, d)$ is a metric space, $a \in M$, and $r > 0$ then the Closed Ball centered at $a$ with radius $r$ is defined to be the set $\bar{B}(a, r) = \{ x \in M : d(x, a) \leq r \}$. |
Note the subtle but important difference between the definitions of open and closed balls centered at $a$ with radius $r$.
From the example above, we can define the closed ball centered at $\mathbf{a}$ and with radius $r > 0$ to be the set of all points $\mathbf{x} \in \mathbb{R}^2$ contained in:
(5)