Skip to main content
Contents Index
Search Book
Search Results:
No results.
Read aloud
Readability settings Prev Up Next
\(\newcommand{\N}{\mathbb{N}} \newcommand{\Z}{\mathbb{Z}}
\newcommand{\Q}{\mathbb{Q}} \newcommand{\R}{\mathbb{R}}
\newcommand{\lb}{\mathrm{lb}} \newcommand{\ub}{\mathrm{ub}}
\newcommand{\vx}{\mathbf{x}} \newcommand{\va}{\mathbf{a}}
\newcommand{\vb}{\mathbf{b}} \newcommand{\vc}{\mathbf{c}}
\newcommand{\vy}{\mathbf{y}} \newcommand{\vz}{\mathbf{z}}
\newcommand{\lt}{<}
\newcommand{\gt}{>}
\newcommand{\amp}{&}
\definecolor{fillinmathshade}{gray}{0.9}
\newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}}
\)
Section D.2 Metrics
Let
\(X\) be a set. A function
\(d:X\times X\to\R\) is called a
metric on
\(X\) if, for all
\(x,y,z\in X\text{,}\) the following hold:
\(d(x,y)=0\) if and only if
\(x=y\text{.}\)
\(d(x,y)=d(y,x)\text{.}\)
\(d(x,z)\le d(x,y)+d(y,z)\text{.}\)
For
\(x,y\in\R^n\text{,}\) define the
Euclidean distance by
\(d(x,y)=\|x-y\|\text{.}\)
Proposition D.2.1 .
The Euclidean distance is a metric on
\(\R^n\text{.}\)
Proof.
Since norms are nonnegative,
\(d(x,y)=\|x-y\|\ge0\text{.}\) Also
\(d(x,y)=0\) if and only if
\(\|x-y\|=0\text{,}\) which happens if and only if
\(x-y=0\text{,}\) that is,
\(x=y\text{.}\)
Symmetry follows from
\(d(x,y)=\|x-y\|=\|-(y-x)\|=|-1|\,\|y-x\|=\|y-x\|=d(y,x)\text{.}\)
For the triangle inequality,
\(d(x,z)=\|x-z\|=\|(x-y)+(y-z)\|
\le \|x-y\|+\|y-z\|
= d(x,y)+d(y,z),\) by
Propositionย D.1.2 . Therefore
\(d\) is a metric.