Skip to content

Sabbiu Shah

p-Norms (Taxicab Norm, Euclidean Norm and infinity-norm)

linear algebra, norms1 min read

Norms are a measure of distance. Norm is defined as follows: For p1p\geq1,

xpx1p+x2p+...+xnpp||x||_p \equiv \sqrt[p]{|x_1|^p + |x_2|^p + ... + |x_n|^p}

Taxicab Norm (1-Norm)

When p=1p=1, then the norm is said to be taxicab norm. The distance derived from this norm is called Manhattan distance.

x1x1+x2+...+xn||x||_1 \equiv |x_1| + |x_2| + ... + |x_n|

Euclidean Norm (2-Norm)

It is the most common notion of distance. When p=2p=2, then the norm is said to be euclidean norm.

x2x12+x22+...+xn2||x||_2 \equiv \sqrt{|x_1|^2 + |x_2|^2 + ... + |x_n|^2}

∞-norm

Infinity norm is defined as,

xmax(x1,x2,...,xn)||x||_\infty \equiv max(|x_1|, |x_2|, ..., |x_n|)

Proof

xpi=1nxip          Equation of p-normxpmi=1nxipm          m=max(xi)\begin{aligned} ||x||_p & \equiv \sum_{i=1}^n |x_i|^p\ \ \ \ \ \ \ \ \ \ \text{Equation of p-norm}\\ ||x||_p & \equiv m \sum_{i=1}^n \frac{|x_i|^p}{m}\ \ \ \ \ \ \ \ \ \ m=max(|x_i|)\\ \end{aligned}

As, pp approaches \infty, only the term maxxim\frac{max|x_i|}{m} equals to 11, while other terms approaches to 00. Thus, i=1nxipm=1\sum_{i=1}^n \frac{|x_i|^p}{m} = 1

 xmax(xi)\begin{aligned} \therefore\ ||x||_\infty & \equiv max(|x_i|) \end{aligned}

Visualising norms as a unit circle

This section will show visualization when, xp1||x||_p \equiv 1. Let us consider for 2 Dimensional case.

1-Norm

The equation is given as,

x1=x1+x2    1=x1+x2\begin{aligned} & ||x||_1 = |x_1| + |x_2|\\ \implies & 1= |x_1| + |x_2|\\ \end{aligned}

Thus we get the following equations,
When x10x_1\geq0 and x20x_2\geq0, x2=1x1x_2=1-x_1 [First quadrant]
When x10x_1\leq0 and x20x_2\geq0, x2=1+x1x_2=1+x_1 [Second quadrant]
When x10x_1\leq0 and x20x_2\leq0, x2=x11x_2=x_1-1 [Third quadrant]
When x10x_1\geq0 and x20x_2\leq0, x2=x11x_2=-x_1-1 [Fourth quadrant]

Plotting these equations, we get,

1-Norm as a unit circle

2-Norm

The equation is given as,

x2=x12+x22    1=x12+x22\begin{aligned} & ||x||_2 = \sqrt{|x_1|^2 + |x_2|^2}\\ \implies & 1= x_1^2 + x_2^2\\ \end{aligned}

As this equation represents a unit circle, we get the following graph,

2-Norm as a unit circle

∞-norm

The equation is given as,

x=max(x1,x2)    1=max(x1,x2)\begin{aligned} & ||x||_\infty = max(|x_1|, |x_2|)\\ \implies & 1 = max(|x_1|, |x_2|)\\ \end{aligned}

This gives the following graph,

infinity-Norm as a unit circle

Substituting different values of p, these equations can be further visualised in Wolfram Mathematica Demonstaration

References

  1. excerpt justin solomon, mathematical methods for robotics, vision, and graphics
  2. wolfram mathematica norms demonstration
  3. wikipedia article on lp space