9.4 Practice Problems
Problem 9.1. Write the quadratic form \(Q(x,y)=5x^2+4xy+2y^2\) in the form \(x^tAx\) with \(A\) symmetric, and find an orthogonal substitution reducing it to a diagonal form.
Show solution
Solution.
The matrix
The coefficient of \(x^2\) goes in position \((1,1)\), that of \(y^2\) in \((2,2)\), and the cross coefficient is split equally between the two off-diagonal positions so that the matrix is symmetric: \[A=\begin {pmatrix}5&2\\2&2\end {pmatrix},\qquad Q(x,y)=\begin {pmatrix}x&y\end {pmatrix} \begin {pmatrix}5&2\\2&2\end {pmatrix} \begin {pmatrix}x\\y\end {pmatrix}.\]
Diagonalising
\[X_A(\lambda )=\begin {vmatrix}5-\lambda& 2\\2&2-\lambda \end {vmatrix} =(5-\lambda )(2-\lambda )-4=\lambda ^2-7\lambda +6=(\lambda -6)(\lambda -1),\] so the eigenvalues are \(6\) and \(1\). Solving \((A-6I)v=0\) gives the eigenvector \((2,1)\); solving \((A-I)v=0\) gives \((-1,2)\). As the theory predicts for a symmetric matrix, these are orthogonal: \((2)(-1)+(1)(2)=0\).
Normalising each to unit length and using them as columns, \[P=\frac {1}{\sqrt 5}\begin {pmatrix}2&-1\\1&2\end {pmatrix},\] which is orthogonal, since its columns are orthonormal. Then \[P^tAP=\begin {pmatrix}6&0\\0&1\end {pmatrix},\] and the substitution \(\begin {pmatrix}x\\y\end {pmatrix}=P\begin {pmatrix}u\\v\end {pmatrix}\) turns the form into \[Q=6u^2+v^2,\] with no cross term. Since both coefficients are positive, \(Q\) is positive definite and the curve \(Q=1\) is an ellipse.
Show solution
Solution. The matrix of the form is \(A=\begin {pmatrix}3&1\\1&3\end {pmatrix}\), with \[X_A(\lambda )=(3-\lambda )^2-1=\lambda ^2-6\lambda +8=(\lambda -4)(\lambda -2),\] so the eigenvalues are \(4\) and \(2\), with orthogonal eigenvectors \((1,1)\) and \((-1,1)\) respectively. Normalising, \[P=\frac {1}{\sqrt 2}\begin {pmatrix}1&-1\\1&1\end {pmatrix},\] which is a rotation through \(45^{\circ }\). Under \(x=Pu\) the equation becomes \[4u^2+2v^2=8,\qquad \text {that is}\qquad \frac {u^2}{2}+\frac {v^2}{4}=1.\] This is an ellipse, with semi-axes \(\sqrt 2\) along the \(u\)-axis and \(2\) along the \(v\)-axis — the original axes rotated by \(45^{\circ }\).
Because \(P\) is orthogonal the substitution is a genuine rotation, so these lengths are the true semi-axes of the original curve and not an artefact of the change of variable.
Problem 9.3. A real quadratic form \(Q(x)=x^tAx\) in \(n\) variables is called positive definite if \(Q(x)>0\) for every \(x\neq 0\). Show that \(Q\) is positive definite if and only if every eigenvalue of \(A\) is positive.
Show solution
Solution. By the spectral theorem there is an orthogonal \(P\) with \(P^tAP=D=\text {diag}(\lambda _1,\dots ,\lambda _n)\). Substituting \(x=Py\), \[Q(x)=y^tDy=\lambda _1y_1^2+\cdots +\lambda _ny_n^2,\] and because \(P\) is invertible, \(x\) ranges over all non-zero vectors exactly as \(y\) does.
If every \(\lambda _i>0\)
Then for \(y\neq 0\) at least one \(y_i\neq 0\), so the sum \(\sum _i\lambda _iy_i^2\) has a strictly positive term and no negative ones, hence \(Q>0\).
If some \(\lambda _k\leq 0\)
Take \(y\) to be the \(k\)-th standard basis vector, so \(y\neq 0\) and \(Q=\lambda _k\leq 0\). Then \(x=Py\neq 0\) gives \(Q(x)\leq 0\), so \(Q\) is not positive definite.
This is what was being checked by hand in the Section 7 problem on the value of \(c\): completing the square there was a two-variable version of the same diagonalisation.
Show solution
Solution. The symmetric matrix of the form, splitting the \(-2xy\) term equally, is \[A=\begin {pmatrix}2&-1&0\\-1&2&0\\0&0&3\end {pmatrix}.\] Because the matrix is block diagonal, the characteristic polynomial factors: \[X_A(\lambda )=(3-\lambda )\left [(2-\lambda )^2-1\right ] =(3-\lambda )(\lambda -1)(\lambda -3),\] so the eigenvalues are \(3\), \(3\) and \(1\) — all positive. By the previous problem \(Q\) is positive definite.
The conclusion can be confirmed without eigenvalues by completing the square: \[2x^2-2xy+2y^2+3z^2=2\left (x-\tfrac {y}{2}\right )^2+\tfrac {3}{2}y^2+3z^2,\] a sum of terms with positive coefficients which vanish together only when \(z=0\), \(y=0\) and then \(x=0\).
Questions on this section
Stuck on something here? Ask below and it stays attached to this topic.