Tutorials › Linear Algebra › Extrema On The Unit Sphere

Quadratic Forms and Definiteness · Tutorial 764 of 1000

Extrema On The Unit Sphere

Learn how orthogonal diagonalization gives the exact extrema of a symmetric quadratic form on the unit sphere and characterizes all extremizing vectors.

Advanced 10 min read

What You'll Learn

  • State the unit-sphere extrema theorem for real symmetric matrices.
  • Use orthogonal diagonalization to prove the minimum and maximum values.
  • Identify all unit vectors attaining each extreme, including repeated eigenvalues.
  • Compute extrema and verify extremizing eigenvectors in concrete examples.
  • Explain why the eigenvalue conclusion requires symmetry.

The Unit-Sphere Extremum Problem

Given a real matrix \(\mathbf{A}\), consider the quadratic form \(q(\mathbf{x})=\mathbf{x}^{\top}\mathbf{A}\mathbf{x}\) while \(\mathbf{x}\) is restricted to have unit length. The restriction matters: without it, scaling \(\mathbf{x}\) by a real number \(c\) scales \(q(\mathbf{x})\) by \(c^2\), so a nonzero value can be made arbitrarily large in magnitude. On the unit sphere, the values are bounded when \(\mathbf{A}\) is symmetric, and the exact bounds are determined by its eigenvalues.

Definition: The unit sphere in \(\mathbb{R}^n\) is the set of vectors \(\mathbf{x}\) satisfying \(\mathbf{x}^{\top}\mathbf{x}=1\). For a real \(n\times n\) matrix \(\mathbf{A}\), the value \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}\) is its quadratic form evaluated at \(\mathbf{x}\). In this tutorial, the eigenvalue extremum theorem concerns real symmetric matrices, meaning \(\mathbf{A}^{\top}=\mathbf{A}\), with \(n\geq 1\).

The symmetry condition is essential to the eigenvalue statement. For a real symmetric matrix, the Spectral Theorem says there is an orthogonal matrix \(\mathbf{Q}\) and a real diagonal matrix \(\boldsymbol{\Lambda}\) such that \(\mathbf{A}=\mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^{\top}\). Here orthogonal means \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\). We will use this standard result from the earlier material on the Spectral Theorem; its consequence for the optimization problem can then be proved directly.

The Extremal Values

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\) be symmetric, and order its eigenvalues, counting repetitions, as \(\lambda_1\leq\cdots\leq\lambda_n\). For every \(\mathbf{x}\in\mathbb{R}^n\) with \(\mathbf{x}^{\top}\mathbf{x}=1\), \(\lambda_1\leq \mathbf{x}^{\top}\mathbf{A}\mathbf{x}\leq\lambda_n\). Both bounds are attained. Therefore the minimum is the smallest eigenvalue \(\lambda_1\), and the maximum is the largest eigenvalue \(\lambda_n\).

Proof. By the Spectral Theorem, write \(\mathbf{A}=\mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^{\top}\), where \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\) and \(\boldsymbol{\Lambda}\) has diagonal entries \(\lambda_1,\dots,\lambda_n\). Set \(\mathbf{y}=\mathbf{Q}^{\top}\mathbf{x}\). Orthogonality gives \(\mathbf{y}^{\top}\mathbf{y}=\mathbf{x}^{\top}\mathbf{Q}\mathbf{Q}^{\top}\mathbf{x}=\mathbf{x}^{\top}\mathbf{x}=1\). Writing the entries of \(\mathbf{y}\) as \(y_1,\dots,y_n\), we obtain \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=\mathbf{y}^{\top}\boldsymbol{\Lambda}\mathbf{y}=\sum_{i=1}^n\lambda_i y_i^2\), with \(\sum_{i=1}^n y_i^2=1\). Since \(\lambda_1\leq\lambda_i\leq\lambda_n\) and \(y_i^2\geq0\), summing these inequalities after multiplying by \(y_i^2\) gives \(\lambda_1\sum_i y_i^2\leq\sum_i\lambda_i y_i^2\leq\lambda_n\sum_i y_i^2\). The sum of the squares is \(1\), proving the bounds. Taking \(\mathbf{y}=\mathbf{e}_1\) gives the value \(\lambda_1\), and taking \(\mathbf{y}=\mathbf{e}_n\) gives \(\lambda_n\). These choices correspond to unit vectors \(\mathbf{x}=\mathbf{Q}\mathbf{e}_1\) and \(\mathbf{x}=\mathbf{Q}\mathbf{e}_n\), so both bounds are attained. \(\square\)

The proof expresses the value as a weighted average of the eigenvalues: the weights \(y_i^2\) are nonnegative and add to \(1\). This explains why no unit vector can produce a value outside the eigenvalue interval, while an eigenvector for either endpoint produces that endpoint exactly.

Worked Example: A Diagonal Matrix

Find the minimum and maximum of \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}\) on the unit sphere for \(\mathbf{A}=\begin{bmatrix}2&0&0\\0&5&0\\0&0&-1\end{bmatrix}\), and give vectors attaining them.

The matrix is diagonal, so its eigenvalues are \(2,5,-1\), with corresponding standard basis eigenvectors \(\mathbf{e}_1,\mathbf{e}_2,\mathbf{e}_3\). For \(\mathbf{x}=(x_1,x_2,x_3)^{\top}\), the unit condition is \(x_1^2+x_2^2+x_3^2=1\), and direct multiplication gives

$$ \mathbf{x}^{\top}\mathbf{A}\mathbf{x} =2x_1^2+5x_2^2-x_3^2. $$

Because \(2\geq-1\), \(5\geq-1\), and \(-1\geq-1\), the value is at least \(-1(x_1^2+x_2^2+x_3^2)=-1\). It is at most \(5(x_1^2+x_2^2+x_3^2)=5\). The minimum is attained at \(\mathbf{e}_3=(0,0,1)^{\top}\), and the maximum at \(\mathbf{e}_2=(0,1,0)^{\top}\).

Check: \(\mathbf{A}\mathbf{e}_3=(0,0,-1)^{\top}=-1\mathbf{e}_3\), so \(\mathbf{e}_3^{\top}\mathbf{A}\mathbf{e}_3=-1\). Also, \(\mathbf{A}\mathbf{e}_2=(0,5,0)^{\top}=5\mathbf{e}_2\), so \(\mathbf{e}_2^{\top}\mathbf{A}\mathbf{e}_2=5\). Both vectors have squared length \(1\).

Which Vectors Attain the Bounds?

The values alone do not describe all the extremizers. If an extreme eigenvalue is repeated, its eigenspace contains more than one direction, and every unit vector in that eigenspace attains the same extreme. The next result gives the exact condition, including the case where all eigenvalues are equal.

Theorem: Under the hypotheses of the preceding theorem, a unit vector \(\mathbf{x}\) attains the minimum if and only if \(\mathbf{A}\mathbf{x}=\lambda_1\mathbf{x}\). It attains the maximum if and only if \(\mathbf{A}\mathbf{x}=\lambda_n\mathbf{x}\). Thus the minimizing and maximizing vectors are exactly the unit vectors in the eigenspaces for the smallest and largest eigenvalues.

Proof. Use the orthogonal diagonalization and the coordinates \(\mathbf{y}=\mathbf{Q}^{\top}\mathbf{x}\) from the preceding proof. For the minimum, subtract the smallest eigenvalue from the quadratic form and use \(\sum_i y_i^2=1\): \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}-\lambda_1=\sum_{i=1}^n(\lambda_i-\lambda_1)y_i^2\). Each term on the right is nonnegative. The sum equals zero if and only if every term with \(\lambda_i-\lambda_1>0\) has \(y_i=0\). This says that \(\mathbf{y}\) has nonzero entries only in positions whose eigenvalue equals \(\lambda_1\). In the diagonal coordinates, that is exactly \(\boldsymbol{\Lambda}\mathbf{y}=\lambda_1\mathbf{y}\). Multiplying by \(\mathbf{Q}\) and using \(\mathbf{x}=\mathbf{Q}\mathbf{y}\) gives \(\mathbf{A}\mathbf{x}=\lambda_1\mathbf{x}\). Conversely, if \(\mathbf{A}\mathbf{x}=\lambda_1\mathbf{x}\) and \(\mathbf{x}^{\top}\mathbf{x}=1\), then \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=\lambda_1\mathbf{x}^{\top}\mathbf{x}=\lambda_1\), so \(\mathbf{x}\) attains the minimum. For the maximum, use \(\lambda_n-\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=\sum_{i=1}^n(\lambda_n-\lambda_i)y_i^2\). This sum is zero exactly when \(y_i=0\) wherever \(\lambda_i<\lambda_n\), which is equivalent to \(\boldsymbol{\Lambda}\mathbf{y}=\lambda_n\mathbf{y}\), and hence to \(\mathbf{A}\mathbf{x}=\lambda_n\mathbf{x}\). Conversely, a unit vector satisfying this eigenvector equation has quadratic-form value \(\lambda_n\). These arguments also apply when \(\lambda_1=\lambda_n\): all coefficients in both sums are zero, and every vector is in the eigenspace for that common eigenvalue. \(\square\)

Worked Example: A Symmetric Matrix That Is Not Diagonal

Find the extrema and all extremizing unit vectors for \(\mathbf{A}=\begin{bmatrix}2&1\\1&2\end{bmatrix}\).

The vectors \(\mathbf{v}_1=(1,-1)^{\top}\) and \(\mathbf{v}_2=(1,1)^{\top}\) are orthogonal. Direct multiplication gives \(\mathbf{A}\mathbf{v}_1=(1,-1)^{\top}=1\mathbf{v}_1\) and \(\mathbf{A}\mathbf{v}_2=(3,3)^{\top}=3\mathbf{v}_2\). Their unit versions are \(\mathbf{q}_1=(1,-1)^{\top}/\sqrt{2}\) and \(\mathbf{q}_2=(1,1)^{\top}/\sqrt{2}\). They form an orthonormal eigenbasis, so write a unit vector as \(\mathbf{x}=a\mathbf{q}_1+b\mathbf{q}_2\), where \(a^2+b^2=1\). Then

$$ \mathbf{x}^{\top}\mathbf{A}\mathbf{x} =a^2+3b^2,\qquad a^2+b^2=1. $$

Since \(1\leq3\), this gives \(1(a^2+b^2)\leq a^2+3b^2\leq3(a^2+b^2)\), so the minimum is \(1\) and the maximum is \(3\). Equality on the left requires \(b=0\), giving \(\mathbf{x}=\mathbf{q}_1\) or \(-\mathbf{q}_1\). Equality on the right requires \(a=0\), giving \(\mathbf{x}=\mathbf{q}_2\) or \(-\mathbf{q}_2\).

Check: \(\mathbf{q}_1^{\top}\mathbf{A}\mathbf{q}_1=\mathbf{q}_1^{\top}\mathbf{q}_1=1\), because \(\mathbf{A}\mathbf{q}_1=\mathbf{q}_1\). Likewise \(\mathbf{A}\mathbf{q}_2=3\mathbf{q}_2\), so \(\mathbf{q}_2^{\top}\mathbf{A}\mathbf{q}_2=3\mathbf{q}_2^{\top}\mathbf{q}_2=3\). Each has squared length \(1\).

Worked Example: A Repeated Extreme Eigenvalue

For \(\mathbf{A}=\begin{bmatrix}4&0&0\\0&4&0\\0&0&1\end{bmatrix}\), describe every unit vector attaining the maximum and the minimum.

The eigenvalues are \(1,4,4\). For a unit vector \(\mathbf{x}=(x_1,x_2,x_3)^{\top}\),

$$ \mathbf{x}^{\top}\mathbf{A}\mathbf{x} =4x_1^2+4x_2^2+x_3^2 =1+3(x_1^2+x_2^2), $$

where the second equality uses \(x_1^2+x_2^2+x_3^2=1\). The value is at least \(1\), with equality exactly when \(x_1=x_2=0\), so the minimizers are \((0,0,1)^{\top}\) and \((0,0,-1)^{\top}\). The same unit condition also gives \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=4-3x_3^2\leq4\). Equality holds exactly when \(x_3=0\). Thus every \((a,b,0)^{\top}\) satisfying \(a^2+b^2=1\) is a maximizer.

Check: For a maximizing vector, \(\mathbf{A}(a,b,0)^{\top}=(4a,4b,0)^{\top}=4(a,b,0)^{\top}\), and its quadratic-form value is \(4(a^2+b^2)=4\). For either minimizing vector, multiplication by \(\mathbf{A}\) returns the vector itself, so the quadratic-form value is \(1\). The examples show why a repeated eigenvalue gives a whole eigenspace of extremizers, not just one direction.

Why Symmetry Cannot Be Dropped

The eigenvalue conclusion does not hold for an arbitrary real matrix. In fact, the quadratic form of any real square matrix depends only on its symmetric part. This fact explains why the optimization problem remains meaningful for a nonsymmetric matrix, but its extrema are governed by the symmetric part rather than, in general, by the original matrix's eigenvalues.

Proposition: For every \(\mathbf{A}\in\mathbb{R}^{n\times n}\), set \(\mathbf{S}=\tfrac12(\mathbf{A}+\mathbf{A}^{\top})\). Then \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=\mathbf{x}^{\top}\mathbf{S}\mathbf{x}\) for every \(\mathbf{x}\in\mathbb{R}^n\).

Proof. Let \(\mathbf{K}=\tfrac12(\mathbf{A}-\mathbf{A}^{\top})\), so \(\mathbf{A}=\mathbf{S}+\mathbf{K}\) and \(\mathbf{K}^{\top}=-\mathbf{K}\). The quantity \(r=\mathbf{x}^{\top}\mathbf{K}\mathbf{x}\) is a real scalar, so it equals its transpose. Therefore \(r=r^{\top}=\mathbf{x}^{\top}\mathbf{K}^{\top}\mathbf{x}=-\mathbf{x}^{\top}\mathbf{K}\mathbf{x}=-r\). Thus \(r=0\). It follows that \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=\mathbf{x}^{\top}\mathbf{S}\mathbf{x}+\mathbf{x}^{\top}\mathbf{K}\mathbf{x}=\mathbf{x}^{\top}\mathbf{S}\mathbf{x}\), as required. \(\square\)

Common Pitfall: Using Eigenvalues Without Checking Symmetry

For example, consider the nonsymmetric real matrix \(\mathbf{A}=\begin{bmatrix}0&-1\\1&0\end{bmatrix}\). A mistaken application of the symmetric-matrix theorem might try to assign the extrema to its eigenvalues. But direct multiplication, for \(\mathbf{x}=(x_1,x_2)^{\top}\), gives \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=-x_1x_2+x_2x_1=0\). So on the unit sphere the minimum and maximum are both \(0\), attained by every unit vector. The correction is to check the hypothesis before using the theorem: this matrix is not symmetric. Its symmetric part is \(\mathbf{O}\), which agrees with the proposition and gives the zero quadratic form. For a symmetric matrix, by contrast, orthogonal diagonalization supplies real eigenvalues and the proved extrema result applies.

The unit-sphere problem is useful because it converts directional variation of a quadratic form into a precise comparison with eigenvalues. The minimum and maximum tell us the smallest and largest possible values over all unit directions; the equality condition identifies exactly which directions attain them. When an endpoint eigenvalue is repeated, its full eigenspace must be considered. In applications, this is why reporting only one maximizing or minimizing vector can omit valid solutions.

Check Your Understanding

For each question, use the unit-length condition and, where appropriate, check extremizing vectors by substituting them into the quadratic form.

  1. For a real symmetric matrix with eigenvalues \(-2,1,6\), what are the minimum and maximum values on the unit sphere?
  2. Explain why the weighted-sum expression in the theorem cannot be below the smallest eigenvalue or above the largest.
  3. If the largest eigenvalue is repeated, how can you describe all maximizing unit vectors?
  4. For \(\mathbf{A}=\begin{bmatrix}3&0\\0&-1\end{bmatrix}\), find the extrema and all unit vectors attaining them.
  5. Why does the eigenvalue extremum theorem not apply directly to \(\begin{bmatrix}0&-1\\1&0\end{bmatrix}\)?

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon