Post · 4 min read· pp. 816–818

What Is a Vector Norm?

A vector norm measures the size, or length, of a vector. For complex nn-vectors, a vector norm is a function ∥⋅∥:Cn→R\|\cdot\| : \mathbb{C}^n \to \mathbb{R} satisfying

  • ∥x∥≥0\|x\| \ge 0 with equality if and only if x=0x=0 (nonnegativity),
  • ∥αx∥=∣α∣∥x∥\|\alpha x\| =|\alpha| \|x\| for all α∈C\alpha\in\mathbb{C} x∈Cnx\in\mathbb{C}^n (homogeneity),
  • ∥x+y∥≤∥x∥+∥y∥\|x+y\| \le \|x\|+\|y\| for all x,y∈Cnx,y\in\mathbb{C}^n (the triangle inequality).

An important class of norms is the Hölder pp-norms

∥x∥p=(∑i=1n∣xi∣p)1/p,p≥1.(1)\|x\|_p = \biggl( \displaystyle\sum_{i=1}^n |x_i|^p \biggr)^{1/p}, \quad p\ge 1. \qquad\qquad (1)

The ∞\infty-norm is interpreted as lim⁡p→∞∥x∥p\lim_{p\to\infty}\|x\|_p and is given by

∥x∥∞=max⁡1≤i≤n∣xi∣.\notag \|x\|_{\infty} = \displaystyle\max_{1\le i\le n} |x_i|.

Other important special cases are

∥x∥1=∑i=1n∣xi∣,\mbox‘@@CODEMASK0@@‘taxi cab′′norm,∥x∥2=(∑i=1n∣xi∣2)1/2=(x∗x)1/2,\mboxEuclideanlength.\notag \begin{alignedat}{2} \|x\|_1 &= \sum_{i=1}^n |x_i|, &\quad& \mbox{`@@CODE_MASK_0@@`taxi~cab'' norm}, \\ \|x\|_2 &= \biggl( \sum_{i=1}^n |x_i|^2 \biggr)^{1/2} = (x^*x)^{1/2}, &\quad& \mbox{Euclidean length}. \end{alignedat}

A useful concept is that of the dual norm associated with a given vector norm, which is defined by

∥y∥D=max⁡x≠0Rex∗y∥x∥.\notag \|y\|^D = \displaystyle\max_{x\ne0} \displaystyle\frac{\mathop{\mathrm{Re}}x^* y}{\|x\|}.

The maximum is attained because the definition is equivalent to ∥y∥D=max⁡{ Rex∗y:∥x∥=1 }\|y\|^D = \max\{ \, \mathop{\mathrm{Re}} x^*y: \|x\| = 1\,\}, in which we are maximizing a continuous function over a compact set. Importantly, the dual of the dual norm is the original norm (Horn and Johnson, 2013, Thm. \, 5.5.9(c)).

We can rewrite the definition of dual norm, using the homogeneity of vector norms, as

∥y∥D=max⁡∣c∣=1∥cy∥D=max⁡∣c∣=1max⁡x≠0Rex∗(cy)∥x∥=max⁡x≠0max⁡∣c∣=1Rec(x∗y)∥x∥=max⁡x≠0∣x∗y∣∥x∥.\notag \|y\|^D = \displaystyle\max_{|c| = 1} \| cy \|^D = \max_{|c| = 1} \max_{x\ne 0} \frac{\mathop{\mathrm{Re}} x^*(cy) }{\|x\|} = \max_{x\ne 0} \max_{|c| = 1} \frac{\mathop{\mathrm{Re}} c(x^*y) }{\|x\|} = \max_{x\ne 0} \frac{ |x^*y| }{\|x\|}.

Hence we have the attainable inequality

∣x∗y∣≤∥x∥ ∥y∥D,(2)\notag |x^*y| \le \|x\| \, \|y\|^D, \qquad\qquad (2)

which is the generalized Hölder inequality.

The dual of the pp-norm is the qq-norm, where p−1+q−1=1p^{-1} + q^{-1} = 1, so for the pp-norms the inequality (2) becomes the (standard) Hölder inequality,

∣x∗y∣≤∥x∥p ∥y∥q,1p+1q=1.\notag |x^*y| \le \|x\|_p \, \|y\|_q, \quad \displaystyle\frac{1}{p} + \frac{1}{q} = 1.

An important special case is the Cauchy–Schwarz inequality,

∣x∗y∣≤∥x∥2 ∥y∥2.\notag |x^*y| \le \|x\|_2 \, \|y\|_2.

The notation ∥x∥0\|x\|_0 is used to denote the number of nonzero entries in xx, even though it is not a vector norm and is not obtained from (1) with p=0p = 0. In portfolio optimization, if xkx_k specifies how much to invest in stock kk then the inequality ∥x∥0≤k\|x\|_0 \le k says “invest in at most kk stocks”.

In numerical linear algebra, vector norms play a crucial role in the definition of a subordinate matrix norm, as we will explain in the next post in this series.

All norms on Cn\mathbb{C}^n are equivalent in the sense that for any two norms ∥⋅∥α\|\cdot\|_\alpha and ∥⋅∥β\|\cdot\|_\beta there exist positive constants ν1\nu_1 and ν2\nu_2 such that

ν1∥x∥α≤∥x∥β≤ν2∥x∥αfor all x∈Cn.\nu_1\|x\|_\alpha \le \|x\|_\beta \le \nu_2 \|x\|_\alpha \quad \mathrm{for~all}~x\in \mathbb{C}^n.

For example, it is easy to see that

∥x∥2≤∥x∥1≤n∥x∥2,∥x∥∞≤∥x∥2≤n∥x∥∞,∥x∥∞≤∥x∥1≤n∥x∥∞.\notag \begin{aligned} \|x\|_2 &\le \|x\|_1 \le \sqrt{n} \|x\|_2,\\ \|x\|_\infty &\le \|x\|_2 \le \sqrt{n} \|x\|_\infty,\\ \|x\|_\infty &\le \|x\|_1 \le n \|x\|_\infty. \end{aligned}

The 2-norm is invariant under unitary transformations: if Q∗Q=IQ^*Q = I, then ∥Qx∥2=x∗Q∗Qx=x∗x=∥x∥22\|Qx\|^2 = x^*Q^* Qx = x^*x = \|x\|_2^2.

Care must be taken to avoid overflow and (damaging) underflow when evaluating a vector pp-norm in floating-point arithmetic for p≠1,∞p\ne 1,\infty. One can simply use the formula ∥x∥p=∥(x/∥x∥∞)∥p∥x∥∞\|x\|_p = \| (x/\|x\|_{\infty}) \|_p \|x\|_{\infty}, but this requires two passes over the data (the first to evaluate ∥x∥∞\|x\|_{\infty}). For more efficient one-pass algorithms for the 22-norm see Higham (2002, Sec. 21.8) and Harayama et al. (2021).

References

This is a minimal set of references, which contain further useful references within.

Note: This article was revised on October 12, 2021 to change the definition of dual norm to use Re\mathrm{Re}.

This article is part of the “What Is” series, available from https://nhigham.com/category/what-is and in PDF form from the GitHub repository https://github.com/higham/what-is.