Metric Spaces
There is a close relationship between topologies and metric spaces. We will see that every metric space directly induces a topology based on its metric. (from a CS point of view, this means topologies are more general than metric spaces). Definition of Metric Space We say that $(\mathcal{X}, d)$ is a metric space if $\mathcal{X}$ is a set and $d$ a function $\mathcal{X} \times \mathcal{X} \to \mathbb{R}$ such that: Distance from it self is zero $d(a, b) = 0 \iff a = b$ Symmetric function: $d(a, b) = d(b, a), \forall a, b \in \mathcal{X}$ Triangle inequality is satisfied: $\forall a, b, c \in \mathcal{X}: d(a, b) + d(b, c) \geq d(a, c)$ Induced topology If we define the sets $B(c, r) = \left\{ p \in \mathcal{X} \mid d(p, c) < r \right\}$ to be open, this induces a topology $(\mathcal{X}, \mathbb{B})$ where $\mathbb{B} := \left\{ B(c, r) \mid c \in \mathcal{X}, r \in\mathbb{R} \right\}$. This should be easy to verify, but it is mostly uninteresting and quite intuitive (i’m not reasoning like a mathematician now). ...