From a Quadratic Form to an Ellipsoid
A positive definite quadratic form assigns a positive value to every nonzero vector. Its level sets therefore describe how far vectors lie from the origin, but generally not in the same way in every direction. The eigenvectors of the matrix identify the directions in which the form has a particularly simple expression; the corresponding eigenvalues determine how quickly the form grows along those directions. Together, they give the orientation and dimensions of the ellipsoids described by equations of the form \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=c\).
Throughout, \(\mathbf{x}\in\mathbb{R}^n\), and \(\mathbf{A}\in\mathbb{R}^{n\times n}\) is real and symmetric. The matrix is positive definite if \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}>0\) for every \(\mathbf{x}\ne\mathbf{0}\). The level set at \(c\in\mathbb{R}\) is the set of all \(\mathbf{x}\) satisfying \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=c\). We use the earlier result on orthogonal diagonalization of real symmetric matrices: there is an orthonormal basis of eigenvectors of \(\mathbf{A}\).
The Eigenvector Coordinates and the Axis Formula
Let \(\mathbf{q}_1,\ldots,\mathbf{q}_n\) be an orthonormal eigenbasis, with \(\mathbf{A}\mathbf{q}_i=\lambda_i\mathbf{q}_i\). Write \(\mathbf{Q}=[\mathbf{q}_1\ \cdots\ \mathbf{q}_n]\). Orthonormality means \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}_n\), and orthogonal diagonalization gives \(\mathbf{Q}^{\top}\mathbf{A}\mathbf{Q}=\operatorname{diag}(\lambda_1,\ldots,\lambda_n)\). For coordinates \(\mathbf{y}=\mathbf{Q}^{\top}\mathbf{x}\), we have \(\mathbf{x}=\mathbf{Q}\mathbf{y}\), so
Positive definiteness forces every \(\lambda_i\) to be positive: for a unit eigenvector \(\mathbf{q}_i\), \(\lambda_i=\mathbf{q}_i^{\top}\mathbf{A}\mathbf{q}_i>0\). Thus, when \(c>0\), dividing by \(c\) expresses the level set as a sum of squared coordinates equal to \(1\). This is the standard ellipsoid equation in orthonormal coordinates.
Proof. Assume the stated hypotheses. Since the eigenvectors form an orthonormal basis, every \(\mathbf{x}\in\mathbb{R}^n\) has coordinates \(y_i=\mathbf{q}_i^{\top}\mathbf{x}\) and equals \(\sum_i y_i\mathbf{q}_i\). Orthogonal diagonalization gives \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=\sum_i\lambda_i y_i^2\). Because \(c>0\) and every \(\lambda_i>0\), the equation \(\sum_i\lambda_i y_i^2=c\) is equivalent, after dividing by \(c\), to \(\sum_i y_i^2/(c/\lambda_i)=1\). This proves the displayed description in both directions: each point of the level set satisfies the sum equation, and any coordinates satisfying the sum equation give a point of the level set. On the \(i\)th principal direction, all coordinates except \(y_i\) are zero, so the equation becomes \(\lambda_i y_i^2=c\). Its two solutions are \(y_i=\pm\sqrt{c/\lambda_i}\), giving the two axis endpoints and the stated semiaxis length. \(\square\)
The formula also explains how to compare the axes. For fixed \(c>0\), smaller eigenvalues give longer semiaxes, because \(c/\lambda_i\) is larger when \(\lambda_i\) is smaller. If an eigenvalue is repeated, its eigenspace gives the corresponding principal directions; an orthonormal basis within that eigenspace can be chosen in more than one way, but all those directions have the same semiaxis length.
Worked Axis Calculations
Worked Example: A Level Set with Coordinate Axes
Find the principal directions and semiaxis lengths for \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=4\), where \(\mathbf{A}=\begin{bmatrix}1&0\\0&4\end{bmatrix}\).
The coordinate vectors \(\mathbf{e}_1=(1,0)^{\top}\) and \(\mathbf{e}_2=(0,1)^{\top}\) are unit eigenvectors: \(\mathbf{A}\mathbf{e}_1=(1,0)^{\top}=1\mathbf{e}_1\) and \(\mathbf{A}\mathbf{e}_2=(0,4)^{\top}=4\mathbf{e}_2\). Thus the eigenvalues are \(1\) and \(4\). In coordinates, the equation is \(x_1^2+4x_2^2=4\), or \(x_1^2/4+x_2^2/1=1\). The semiaxis lengths are \(\sqrt{4/1}=2\) along \(\mathbf{e}_1\) and \(\sqrt{4/4}=1\) along \(\mathbf{e}_2\).
Check: The axis endpoints are \((\pm2,0)^{\top}\) and \((0,\pm1)^{\top}\). For either sign, \(\mathbf{A}(\pm2,0)^{\top}=(\pm2,0)^{\top}\), so \((\pm2,0)\mathbf{A}(\pm2,0)^{\top}=4\). Also, \(\mathbf{A}(0,\pm1)^{\top}=(0,\pm4)^{\top}\), so \((0,\pm1)\mathbf{A}(0,\pm1)^{\top}=4\). Both pairs lie on the claimed level set.
Worked Example: A Rotated Ellipse
Find the principal directions and semiaxis lengths of \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=6\) for \(\mathbf{A}=\begin{bmatrix}2&1\\1&2\end{bmatrix}\).
Take \(\mathbf{q}_1=\frac{1}{\sqrt{2}}(1,1)^{\top}\) and \(\mathbf{q}_2=\frac{1}{\sqrt{2}}(1,-1)^{\top}\). Each has squared norm \(\frac12+\frac12=1\), and their inner product is \(\frac12-\frac12=0\). Multiplication gives \(\mathbf{A}\mathbf{q}_1=\frac{1}{\sqrt{2}}(3,3)^{\top}=3\mathbf{q}_1\) and \(\mathbf{A}\mathbf{q}_2=\frac{1}{\sqrt{2}}(1,-1)^{\top}=\mathbf{q}_2\). The eigenvalues are \(3\) and \(1\). The semiaxis lengths are therefore \(\sqrt{6/3}=\sqrt{2}\) along \(\mathbf{q}_1\), and \(\sqrt{6/1}=\sqrt{6}\) along \(\mathbf{q}_2\).
For coordinates \(y_1,y_2\) in these directions, the equation becomes \(3y_1^2+y_2^2=6\), or \(y_1^2/2+y_2^2/6=1\). The rotated principal directions can also be read from the endpoints: \(\sqrt{2}\mathbf{q}_1=(1,1)^{\top}\) and \(\sqrt{6}\mathbf{q}_2=(\sqrt{3},-\sqrt{3})^{\top}\).
Check: For \(\mathbf{x}=(1,1)^{\top}\), \(\mathbf{A}\mathbf{x}=(3,3)^{\top}\), so \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=1\cdot3+1\cdot3=6\). For \(\mathbf{x}=(\sqrt{3},-\sqrt{3})^{\top}\), \(\mathbf{A}\mathbf{x}=(\sqrt{3},-\sqrt{3})^{\top}\), so \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=3+3=6\). The endpoints satisfy the original equation.
Worked Example: A Three-Dimensional Ellipsoid
Find the principal directions and semiaxis lengths of \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=36\), where \(\mathbf{A}=\begin{bmatrix}1&0&0\\0&4&0\\0&0&9\end{bmatrix}\).
The standard unit vectors are eigenvectors, since \(\mathbf{A}\mathbf{e}_1=\mathbf{e}_1\), \(\mathbf{A}\mathbf{e}_2=4\mathbf{e}_2\), and \(\mathbf{A}\mathbf{e}_3=9\mathbf{e}_3\). The eigenvalues are \(1,4,9\), so the semiaxis lengths are \(\sqrt{36/1}=6\), \(\sqrt{36/4}=3\), and \(\sqrt{36/9}=2\), in directions \(\mathbf{e}_1,\mathbf{e}_2,\mathbf{e}_3\), respectively. Equivalently, \(x_1^2/36+x_2^2/9+x_3^2/4=1\).
Check: The six axis endpoints are \(\pm6\mathbf{e}_1,\pm3\mathbf{e}_2,\pm2\mathbf{e}_3\). For the first pair, \(\mathbf{A}(6\mathbf{e}_1)=6\mathbf{e}_1\), giving \((6\mathbf{e}_1)^{\top}\mathbf{A}(6\mathbf{e}_1)=36\); changing the sign leaves the value \(36\). For the second pair, \(\mathbf{A}(3\mathbf{e}_2)=12\mathbf{e}_2\), giving \(36\), again unchanged by sign. For the third pair, \(\mathbf{A}(2\mathbf{e}_3)=18\mathbf{e}_3\), giving \(36\), also unchanged by sign.
What the Value of \(c\) Changes
The ellipsoid description requires \(c>0\). The other values have straightforward but different outcomes, and positive definiteness is essential to each conclusion.
Proof. If \(\mathbf{x}\ne\mathbf{0}\), positive definiteness gives \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}>0\), while at \(\mathbf{x}=\mathbf{0}\) the value is \(0\). Therefore no vector can have a negative value, proving emptiness for \(c<0\). When \(c=0\), the zero vector is a solution, and no nonzero vector can be a solution, so the level set is exactly \(\{\mathbf{0}\}\). When \(c>0\), the ellipsoid axes theorem applies and gives the ellipsoid description. \(\square\)
As \(c\) increases through positive values, every semiaxis length \(\sqrt{c/\lambda_i}\) scales by the same factor. For example, replacing \(c\) by \(4c\) doubles each semiaxis length without changing its principal direction. The level set itself is the ellipsoid’s surface; the solid it encloses is described by \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}\le c\). The same eigenvector coordinates show why: the inequality becomes \(\sum_i y_i^2/(c/\lambda_i)\le1\).
A Common Axis-Length Mistake
A common error is to report \(c/\lambda_i\) as the semiaxis length. That ratio is the square of the semiaxis length, because the standard equation uses squared coordinates. In the first worked example, the mistaken calculation would report a length \(4/1=4\) along \(\mathbf{e}_1\). But the proposed endpoint \((4,0)^{\top}\) gives \((4,0)\mathbf{A}(4,0)^{\top}=16\), not \(4\). The correction is to take the square root: the semiaxis length is \(\sqrt{4/1}=2\), and the endpoint \((2,0)^{\top}\) gives the required value \(4\).
It is also important not to confuse an eigenvalue with a length. A large eigenvalue means the quadratic form grows quickly along its eigenvector, so the ellipsoid must reach a smaller distance in that direction to stay at the same value \(c\). Thus the longest semiaxis corresponds to the smallest eigenvalue, and the shortest corresponds to the largest. This direction is the reverse of what a direct comparison of eigenvalue sizes might suggest.
Check Your Understanding
Use eigenvector coordinates to answer each question, and verify any proposed axis endpoint in the original quadratic form.
- For \(\mathbf{A}=\begin{bmatrix}2&0\\0&8\end{bmatrix}\) and \(c=8\), find the principal directions and semiaxis lengths.
- If a positive definite matrix has an eigenvalue \(5\) with unit eigenvector \(\mathbf{q}\), what is the distance from the origin to the level set \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=20\) along \(\mathbf{q}\)?
- Explain why a positive definite quadratic form has no level set at a negative value of \(c\).
- For the rotated ellipse example, which eigenvalue gives the longer semiaxis, and why?
- What is the difference between the ellipsoid surface \(\mathbf{x}^{\top}\mathbf{A}\mathbf{x}=c\) and the solid it bounds?