0
1.9kviews
Find Manhattan distance (L1 norms) and Euclidean distance (L2 norms) for the following point X1=(1,2,2) and X2=(2,5,3).
1 Answer
written 2.6 years ago by |
Given,
$X_1=(1,2,2) $
$X_2=(2,5,3)$
To find -
(i) Manhattan distance
(ii) Euclidean distance
(i) Manhattan distance -
As we know,
$d = \sum^{n}_{i=1} |x_i - y_i|$
Here, = | 1 - 2 | + | 2 - 5 | + | 2 - 3 |
= 1 + 3 + 1
= 5.
(ii) Euclidean distance -
As we know,
$d = \sqrt{ \sum^{n}_{i=1} |x_i - y_i|^{2}}$
Here, $\sqrt{(1 - 2)^2 + (2 - 5)^2 + (2 - 3)^2 }$
$ =\ \sqrt{1 + 9 + 1}$
$ =\ \sqrt {11}$
= 3.316. Ans.