Skip to content

L-Norms

L^p-norms are some functions which takes a vector as input and output a value. It is written as \left\|\mathbf x\right\|_ p.

L0-Norm

It is a measure of how many non-zero values are there in the vector. If have to put it into notations, we need to first define 0^0=0. The the L^0-norm is as follows.

\left\|\mathbf x\right\|_ 0 = |x_{1}|^{0}+|x_{2}|^{0}+\cdots +|x_{n}|^{0}

L1-Norm

\left\|\mathbf x\right\|_ 1 = |x_{1}|+|x_{2}|+\cdots +|x_{n}|

L2-Norm

\left\|\mathbf x\right\|_ 2 = \sqrt{x_{1}^{2}+x_{2}^{2}+\cdots +x_{n}^{2}}

We also use its squared form quite often.

\left\|\mathbf x\right\|_ 2^2 = x_{1}^{2}+x_{2}^{2}+\cdots +x_{n}^{2}

L-Infinity-Norm

\left\|x\right\|_ {\infty }=\max \left\{|x_{1}|,|x_{2}|,\dotsc ,|x_{n}|\right\}

General Form

For 0< p< \infty, we have the following general form.

\left\|x\right\|_ {p}=\left(|x_{1}|^{p}+|x_{2}|^{p}+\dotsb +|x_{n}|^{p}\right)^{1/p}

Visualization

Following is a visualization of the contour line of different p values with the norm value equal to 1.