[Def]: Metric and Metric Space
Let $X$ be a nonempty set
A mapping
$d: X \times X \rightarrow \mathbb{R}$
is said to be a metric of $X$ if it satisfies:
- $d(x,y) \ge0$, $\forall x,y \in X$, $d(x,y)=0 \iff x=y$
- $d(x,y)=d(y,x)$, $\forall x,y \in X$
- for any $x,y,z\in X$, we have $d(x,z) \le d(x,y)+d(y,z)$
We denote $(X,d)$ as a metric space