Skip to article frontmatterSkip to article content

Vector and matrix norms

The manipulations on matrices and vectors so far in this chapter have been algebraic, much like those in an introductory linear algebra course. In order to progress to the analysis of the algorithms we have introduced, we need a way to measure the size of vectors and matrices—size in the sense of magnitude or distance, not the number of rows and columns.

2.7.1Vector norms

For vectors, we use a norm \| \cdot \|, which is a function from Rn\real^n to R\real with the following properties for all nn-vectors x,y\mathbf{x},\mathbf{y} and scalars α\alpha:[1]

x0,x=0    x=0,αx=αx,x+yx+y.\begin{align*} \norm{\mathbf{x}} &\ge 0, \\ \norm{\mathbf{x}} &=0 \;\Leftrightarrow \; \mathbf{x}=\boldsymbol{0}, \\ \norm{\alpha \mathbf{x}} &= \abs{\alpha}\, \norm{\mathbf{x}}, \\ \norm{\mathbf{x}+\mathbf{y}} & \le \norm{\mathbf{x}} + \norm{\mathbf{y}}. \end{align*}

The last of these properties is known as the triangle inequality. It is natural to interpret x=x0\| \mathbf{x} \|=\| \mathbf{x}-\boldsymbol{0} \| as the distance from x\mathbf{x} to the origin and xy\| \mathbf{x}-\mathbf{y} \| as the distance from x\mathbf{x} to y\mathbf{y}. We will be using only the three most important vector norms, defined as follows.

The 2-norm corresponds to ordinary Euclidean distance.

For any nonzero vector v\mathbf{v}, we can find a unit vector through the normalization x=v/v\mathbf{x}=\mathbf{v}/\|\mathbf{v}\|. Thus, we can interpret

v=vvv \mathbf{v} = \| \mathbf{v} \| \,\cdot\, \frac{\mathbf{v}}{\| \mathbf{v} \|}

as writing a nonzero vector v\mathbf{v} in magnitude–direction form.

We say that a sequence of vectors x1,x2,\mathbf{x}_1,\mathbf{x}_2,\ldots converges to x\mathbf{x} if

limkxkx=0. \lim_{k\rightarrow\infty} \norm{\mathbf{x}_k - \mathbf{x}} = 0.

By definition, a sequence is convergent in the infinity norm if and only if it converges componentwise. The same is true for a convergent sequence in any norm.

2.7.2Matrix norms

Although we view matrices as two-dimensional, we can also interpret them as vectors: simply stack the columns on top of one another.[2] Hence, we can define a matrix norm via the vector 2-norm.

However, it often proves to be more useful to define matrix norms differently.

The last equality above follows from linearity (as shown in Exercise 2.7.5). It is derived from the interpretation of a matrix as a linear operator between Rn\real^n and Rm\real^m. Thus in the 2-norm, for instance,

A2=maxx2=1Ax2.\| \mathbf{A} \|_2 = \max_{\| \mathbf{x} \|_2=1} \| \mathbf{A}\mathbf{x} \|_2.

One can interpret the definition of an induced norm geometrically. Each vector x\mathbf{x} on the unit “sphere” (as defined by the chosen vector norm) is mapped to its image Ax\mathbf{A}\mathbf{x}, and the norm of A\mathbf{A} is the radius of the smallest “sphere” that encloses all such images.

The definition of an induced matrix norm may seem oddly complicated. However, there are some key properties that follow directly from the definition.

Two of the vector norms we have encountered induce matrix norms that are easy to compute from the matrix elements.

Despite the lack of a simple formula for it, the 2-norm is the default choice for many applications and theorems.

2.7.3Exercises

Footnotes
  1. The same statements work for vectors with complex entries, with complex modulus in place of absolute values.

  2. Column stacking is actually how matrices are stored in memory within Julia and is known as column-major order. MATLAB and FORTRAN also use column-major order, while C and Python use row-major order, in which the rows are stacked.