# The Distance Between Points and Subsets in a Metric Space

So far we have looked at metric spaces and defined the distance between two points with the metric $d$. We will now go further and define the distance between a point and a subset of a metric space.

Definition: Let $(S, d)$ be a metric space and let $A \subseteq S$ be nonempty. Define a function $f_A : S \to \mathbb{R}$ for all $x \in S$ by $f_A(x) = \inf \{ d(x, y) : y \in A \}$. Then the Distance from the point $x$ to the subset $S$ of $X$ is the number $f_S(x)$. |

For example, consider the metric space $(\mathbb{R}^2, d)$ where $d$ is the usual Euclidean metric defined for all $\mathbf{x} = (x_1, x_2), \mathbf{y} = (y_1, y_2) \in \mathbb{R}^2$ by $d(\mathbf{x}, \mathbf{y}) = \| \mathbf{x} - \mathbf{y} \|$. Consider the following subset $A \subseteq \mathbb{R}^2$ given by:

(1)Note that $A$ is simply the disk centered at the origin with radius $2$. Consider the point $\mathbf{x} = (3, 0)$. Clearly the distance from $\mathbf{x}$ to $A$ should be $1$ intuitively:

[[INSERT IMAGE]]

With the definition of $f_A$ above, this is indeed the case as you should verify.