0

I saw the following written as distance function for random vectors $(\mathbf{X}, \mathbf{Y})$:

The Euclidean or $L^2$ distance
$\Delta_2 (\mathbf{X}, \mathbf{Y}) = \vert\vert \mathbf{X} - \mathbf{Y} \vert\vert = \sqrt{\sum_j \vert X_j - Y_j \vert^2}$

The absolute or $L^1$ distance
$\Delta_1 (\mathbf{X}, \mathbf{Y}) = \vert\vert \mathbf{X} - \mathbf{Y} \vert \vert = \sum_j \vert X_j - Y_j \vert$

The max-distance
$\Delta_{\text{max}}(\mathbf{X}, \mathbf{Y}) = \vert\vert \mathbf{X} - \mathbf{Y} \vert\vert_{\text{max}} = \text{max}_{j} \vert X_j - Y_j \vert$

The cosine distance
$\Delta_{\cos}(\mathbf{X}, \mathbf{Y}) = 1 - \cos(\angle(\mathbf{X}, \mathbf{Y}))$, where $\cos(\angle(\mathbf{X}, \mathbf{Y}))$ is the cosine of the angle between the vectors.

Checking this against Wikipedia, I get the following:

Euclidean distance: $${\displaystyle {\begin{aligned}d(\mathbf {p} ,\mathbf {q} )=d(\mathbf {q} ,\mathbf {p} )&={\sqrt {(q_{1}-p_{1})^{2}+(q_{2}-p_{2})^{2}+\cdots +(q_{n}-p_{n})^{2}}}\\[8pt]&={\sqrt {\sum _{i=1}^{n}(q_{i}-p_{i})^{2}}}.\end{aligned}}}$$

For the Euclidean distance, why does one have absolute values and the Wikipedia article doesn't?

Also, what is $1 - \cos(\angle(\mathbf{X}, \mathbf{Y}))$ supposed to be? I'm particularly confused about what the $\angle$ term is supposed to be.

Henno Brandsma
  • 242,131
The Pointer
  • 4,182

1 Answers1

0

HINT

1)$|x-y|^2=(x-y)^2$

2)You have wrote that it is the angle of $X,Y$

1123581321
  • 5,108