Metric Spaces
Definition and Examples
Definition 1. A metric space is a non-empty set $X$, along with a metric (aka distance function) $d \colon X \times X \to [0, \infty)$ such that:
- For every $x, y \in X$, $d(x, y) = 0$ if and only if $x = y$.
- (Symmetry) For every $x, y \in X$, $d(x, y) = d(y, x)$.
- (Triangle inequality) For every $x, y, z \in X$, $d(x, z) \leq d(x, y) + d(y, z)$.
Example 2. $(\R^d, d)$ is a metric space with respect to the usual Euclidean metric defined by $d(x, y) = \abs{x - y}$.
Remark 3. If $z \in \R^d$, then we will typically use $z_i$ to denote the $i$-th coordinate of $z$. With this convention, we recall \begin{equation} \abs{z} \defeq \paren[\bigg]{\sum_{i = 1}^d z_i^2}^{1/2} = \sqrt{z_1^2 + \cdots + z_d^2} \,. \end{equation}
Definition 4. A normed vector space is a vector space $X$ along with a norm, $\norm{\cdot}\colon X \to [0, \infty)$, such that:
- $\norm{x} = 0$ if and only if $x = 0$.
- For every $\alpha \in \R$, $x \in X$, we have $\norm{\alpha x} = \abs{\alpha} \norm{x}$.
- For every $x, y \in X$, we have $\norm{x + y} \leq \abs{\alpha} \norm{x} + \norm{y}$.
Proposition 5. Let $(X, \norm{\cdot})$ be a normed vector space, and define $d \colon X \times X \to [0, \infty)$ by $d(x, y) = \norm{x - y}$. Then $(X, d)$ is a metric space.
Proposition 6. Let $p \in (0, \infty]$, and $x = (x_1, \dots, x_d) \in \R^d$. Define \begin{equation} \abs{x}_p = \begin{cases} \displaystyle \paren[\Big]{ \sum_{i = 1}^d \abs{x_i}^p }^{1/p} & p < \infty \\ \displaystyle \max_{1 \leq i \leq d} \abs{x_i} & p = \infty \,, \end{cases} \end{equation} and set $d_p(x, y) = \abs{x - y}_p$ For $d \geq 2$, $(\R^d, d_p)$ is a Metric space if and only if $p \geq 1$.
Lemma 7 (Hölder’s inequality). Suppose $p \in [1, \infty]$ and $1/p + 1/q = 1$. Then for every $x, y \in \R^d$, \begin{equation} \abs{x \cdot y} \leq \abs{x}_p \abs{y}_q \,. \end{equation}
Proof sketch. Check the cases $p = 1$ and $p = \infty$ directly. For $p \in (1, \infty)$, we claim that for any $a, b \geq 0$, we have \begin{equation} ab \leq \frac{a^p}{p} + \frac{b^q}{q} \,. \end{equation} (This is called Young’s inequlaity.) Use Young’s inequality to check Hölder’s inequality assuming $\abs{x}_p = \abs{y}_q = 1$, and then rescale to get the general case.
Proof sketch of Proposition 6. For $p \geq 1$ use Hölder’s inequality to show $\abs{(x + y) \cdot z} \leq (\abs{x}_p + \abs{y}_p) \abs{z}_q$ for every $x, y, z \in \R^d$, and then find $z$ so that \begin{equation} \abs{z}_q = 1 \quad\text{and}\quad \abs{(x + y) \cdot z} = \abs{x + y}_p \,. \end{equation} For $p \in (0, 1)$, find a counterexample to the triangle inequality.
Proposition 8. Let $d > 1$, $B = \set{x \in \R^d \st \abs{x}_p \leq 1}$. Then $B$ is convex if and only if $p \geq 1$.
Example 9 (discrete metric). Let $X$ be a non-empty set and define $d(x, y) = 1$ if $x \neq y$, and $d(x,y) = 0$ if $x = y$. Then $(X, d)$ is a metric space. (This is called the discrete metric.)
Example 10. Let $(X, d)$ be a metric space, and define $d’(x, y) = d(x, y) \varmin 1$. Then $(X, d’)$ is also a metric space.
Example 11. Let $(X, d)$ be a metric space, and $E \subseteq X$ be a non-empty set. Then $(E, d)$ is also a metric space.
Open and Closed Sets
Let $(X, d)$ be a metric space.
Definition 12. For $x \in X$, $r > 0$, define \begin{equation} B(x, r) = \set{y \in X \st d(x, y) < r} \quad\text{and}\quad \bar B(x, r) = \set{y \in X \st d(x, y) \leq r} \,. \end{equation} These are (respectively) called the open ball and closed ball with center $x$ and radius $r$.
Definition 13. We say $U \subseteq X$ is open if for every $x \in U$, there exists $\epsilon > 0$ such that $B(x, \epsilon) \subseteq U$.
Definition 14. We say $C \subseteq X$ is closed if $C^c$ is open.
Example 15. The sets $X$ and $\emptyset$ are both open and closed.
Example 16. Let $X = \R$ with the Euclidean metric, and $a < b \in \R$.
- The intervals $(-\infty, a)$, $(a, b)$, $(b, \infty)$ are all open.
- The intervals $(-\infty, a]$, $[a, b]$, $[b, \infty)$ are all closed.
Example 17. Let $d$ be the discrete metric on $X$. Every subset is both open and closed.
Proposition 18. For any $x \in X$, $r > 0$ the open ball $B(x, r)$ is an open set, and the closed ball $\bar B(x, r)$ is a closed set.
Proposition 19.
- If $\set{U_\alpha \st \alpha \in A}$ is an arbitrary family of open sets, then $U = \cup_{\alpha \in A} U_\alpha$ is also open.
- If $\set{U_1, \dots, U_N}$ are $N$ open sets, then $U = \cap U_n$ is also open.
- If $\set{C_\alpha \st \alpha \in A}$ is a family of closed sets, then $C = \cap_{\alpha \in A} C_\alpha$ is also closed.
- If $\set{C_1, \dots, C_N}$ are $N$ closed sets, then $C = \cup C_n$ is also closed.
Problem 20.
- If $\set{U_\alpha \st \alpha \in A}$ is an arbitrary family of open sets, must $U = \cap_{\alpha \in A} U_\alpha$ be open? Prove it, or find a counter example.
- If $\set{C_\alpha \st \alpha \in A}$ is an arbitrary family of open sets, must $C = \cup_{\alpha \in A} C_\alpha$ be closed? Prove it, or find a counter example.
Closure, Interior, Boundary
Definition 21. We say $N$ is a neighborhood of $x$ if $x \in N$ and $N \subseteq X$ is open.
Definition 22. Let $E \subseteq X$. The boundary of $E$, denoted by $\partial E$, is defined by \begin{equation} \partial E = \set{x \in X \st \text{ if } N \text{ is a neighborhood of }x \text{ then, } N \cap E \neq \emptyset \text{ and }N \cap E^c \neq \emptyset} \,. \end{equation}
In other words, $\partial E$ is the set of all points $x$ such that every neighborhood of $x$ has a nonempty intersection with both $E$ and $E^c$.
Problem 23. Let $X = \R^d$ with the usual Euclidean metric. What is the boundary of $B(0, 1)$?
Definition 24. If $E \subseteq X$, define the interior of $E$, denoted by $\mathring E$, by \begin{equation} \mathring E = \bigcup_{U \text{ open},~ U \subseteq E} U \,. \end{equation}
Definition 25. If $E \subseteq X$, define the closure of $E$, denoted by $\bar E$, by \begin{equation} \bar E = \bigcap_{C \text{ closed},~ C \supseteq E} C \,. \end{equation}
Remark 26. The interior is the largest open subset of $E$, and the closure is the smallest closed set containing $E$.
Problem 27. Let $X = \R$ with the usual Euclidean metric. Does there exist $E \subseteq X$ such that $\mathring E = \emptyset$ and $\bar E = X$? Prove it, or find a counter example.
Proposition 28. $\partial E = \bar E - \mathring E$.