How to visualize norm 3, norm 4,.. distance between two points in X-Y Plane

6.5k Views Asked by At

Distance between Two points can be expressed as

$(|x_1 - x_2|^m + |y_1 - y_2|^m)^{\frac{1}{m}}$

$m = 1$ 1 norm distance (Manhattan Distance)

enter image description here

$m = 2$ 2 norm distance (Euclidean Distance)

enter image description here

How can I visualize 3 norm, 4 norm,... distance. I searched internet and all I could find is the comparison of 1 norm and 2 norm. I couldn't be able to find the visualization of 3 norm, 4 norm, ... distance. Can anybody help me to visualizes these distances.

2

There are 2 best solutions below

9
On BEST ANSWER

Here's a picture for you: $$\color{blue}{‖x‖_1 = 1} \quad ‖x‖_2 = 1 \quad \color{orange}{‖x‖_5 = 1} \quad \color{red}{‖x‖_∞ = 1}$$ enter image description here

(It is sufficient to consider the unit balls centered at 0 because it "doesn't matter" where the centre is.) To understand this diagram, pick any point on the corresponding ball; that point is of $p$-distance $1$ from $0$.

As far as I know, the $p$-norms for $p=1,2,∞$ are the only cases that have a clear interpretation. Everything else is an 'interpolation' in between; if $p≈ 1$, then its the $1$-norm, but fudged slightly. If $p\gg 1$ then its like the $∞$-norm. As you can see, $p=5$ is already pretty close to the $∞$-norm.

2
On

You could try plotting the unit sphere of these norms, i.e. the set of points at an $m$-distance 1 from the origin. Plot the curve for several different values of $m$ between 1 and infinity. You will see that the unit balls are nested within each other. The diamond of the $m=1$ ball "morphs" into the familiar Euclidean ball, and out the other side, where it morphs into the $m = \infty$ ball. These shapes interpolate between the extremes, the Euclidean ball being a kind of half-way point. To learn more about this spectrum of $m$s, with $m=2$ as a kind of midpoint between 1 and $\infty$, you could read about $L_p$ spaces in books on measure theory and functional analysis, and Banach space theory. In particular you could learn about how every $m$, which I am calling $p$, between 1 and 2 has a "twin" called $q$ which is between 2 and $\infty$, and $p$ and $q$ are so-called Holder conjugates, related by $\frac{1}{p} + \frac{1}{q} = 1$. To understand the relationship between the unit balls and the distances between points, center a copy of the unit ball at $X$, and shrink or expand it until it touches $Y$. See also "Minkowski functional" or "Gauge".

Another instructive exercise would be to plot the "unit sphere" for values of $m$ between 0 and 1, for instance, $m=\frac{1}{2}$. What do you notice is different about such spheres ? Why does this make them unsuitable for measuring distance ? Hint: Consider the norm of the sum of two vectors.