Linear AlgebraSymmetric Matrices and Quadratic Forms3 of 4
Symmetric Matrices and Quadratic Forms · 3

Positive Definite Matrices

In single-variable calculus, a positive number a\up{a} makes f(x)=ax2f(x) = \up{a}x^2 curve upward like a bowl with a single minimum at the origin. In multiple dimensions, we need a way to tell when a symmetric matrix AA makes the quadratic form xTAxx^T A x curve upward in every direction the same way.

1

Bowls, Angles, and Positive Definite Matrices

A positive definite matrix is a symmetric matrix AA whose quadratic form xTAxx^T A x is positive for every non-zero vector xx, so its graph forms an upward-facing bowl with a single minimum at the origin.

Bowls, Angles, and Positive Definite Matrices
f(x)=ax2f(x) = \up{a}x^2
xx
f(x)f(x)
a>0\up{a} > 0
xTAx>0  ?x^T A x > 0\;?

Rotating the coordinates to line up with the eigenvectors of AA turns the quadratic form into a sum of squares weighted by the eigenvalues, which tells us the shape of the surface:

xTAx⏟quadratic form\displaystyle \underbrace{x^T A x}_{\text{quadratic form}} =λ1u2+λ2v2\displaystyle = \first{\lambda_1} \first{u}^2 + \second{\lambda_2} \second{v}^2
Positive definite
(all λi>0\lambda_i > 0)
Positive semi-definite
(one λi=0\lambda_i = 0, the other >0> 0)
Indefinite
(λi\lambda_i of opposite signs)

Grouping xTAxx^T A x as xT(Ax)x^T(\op{Ax}) shows what positive definiteness means geometrically without solving for eigenvalues: it is the dot product between the starting vector xx and the transformed vector Ax\op{Ax}.

xTAx=xT(Ax)⏟dot product of x and Ax>0⟺angle(x,Ax)<90∘ for all x≠0\displaystyle \begin{aligned} x^T A x = \underbrace{x^T (\op{Ax})}_{\text{dot product of } x \text{ and } \op{Ax}} &> 0 \\ \quad \Longleftrightarrow \quad \text{angle}(x, \op{Ax}) &< 90^\circ \\ &\text{ for all } x \neq 0 \end{aligned}

As the unit vector xx goes full circle around the origin for a positive definite matrix AA, the transformed vector Ax\op{Ax} stretches and tilts toward the steeper axis of the bowl, but stays within 90∘90^\circ of xx, keeping the height xTAxx^T A x positive everywhere.

Point the input vector in any direction around the circle, and the output vector stays within 90 degrees of it while the height on the bowl stays above zero.
2

Completing the Square and Pivots

Finding eigenvalues means solving a polynomial that quickly gets messy, so we want a way to test whether xTAxx^T A x stays positive by looking directly at the entries of AA.

Let's see how the diagonal terms and the off-diagonal cross-term pull against each other inside A=[24411]A = \begin{bmatrix} 2 & \down{4} \\ \down{4} & 11 \end{bmatrix} for the quadratic form 2x2+8xy+11y22x^2 + \down{8xy} + 11y^2, and how completing the square connects directly to row elimination.

Completing the Square and Pivots
xx
yy
2x2+11y22x^2 + 11y^2
2x2+8xy+11y2 ⁣: still a bowl?2x^2 + \down{8xy} + 11y^2\colon\ \text{still a bowl?}
Text solution
Split the cross-term into the symmetric matrixPut the x2x^2 and y2y^2 coefficients on the main diagonal and split the 8xy\down{8xy} coefficient evenly into two 4\down{4}'s across the off-diagonal.
2x2+8xy+11y2=[xy][24411][xy]\displaystyle 2x^2 + \down{8xy} + 11y^2 = \begin{bmatrix} x & y \end{bmatrix} \begin{bmatrix} 2 & \down{4} \\ \down{4} & 11 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix}
Complete the square in xxFactor 2\up{2} out of the xx terms and rewrite x2+4xyx^2 + \down{4xy} using (x+2y)2(x + \op{2}y)^2, which uses up 2(4y2)=8y2\up{2}(\down{4y^2}) = \down{8y^2} and leaves 3y2\up{3}y^2 behind.
2x2+8xy+11y2=2(x2+4xy)+11y2=2((x+2y)2−4y2)+11y2=2⏟first pivot(x+2⏟row multipley)2+3⏟second pivoty2\displaystyle \begin{aligned} &2x^2 + \down{8xy} + 11y^2 \\ &\quad= \up{2}(x^2 + \down{4xy}) + 11y^2 \\ &\quad= \up{2}\bigl((x + \op{2}y)^2 - \down{4y^2}\bigr) + 11y^2 \\ &\quad= \underbrace{\up{2}}_{\text{first pivot}}(x + \underbrace{\op{2}}_{\text{row multiple}}y)^2 \\ &\qquad + \underbrace{\up{3}}_{\text{second pivot}}y^2 \end{aligned}
Row reduce AA to find the pivotsSubtract 2\op{2} times Row 1 from Row 2 to make the bottom-left entry zero, leaving the square multipliers 2\up{2} and 3\up{3} on the diagonal as the elimination pivots.
[24411]→Row 2 ← Row 2−2 Row 1[2403]\displaystyle \begin{bmatrix} 2 & \down{4} \\ \down{4} & 11 \end{bmatrix} \xrightarrow{\text{Row } 2 \,\leftarrow\, \text{Row } 2 - \op{2}\,\text{Row } 1} \begin{bmatrix} \up{2} & 4 \\ 0 & \up{3} \end{bmatrix}

So both pivots 2\up{2} and 3\up{3} are positive, which means 2x2+8xy+11y22x^2 + \down{8xy} + 11y^2 is a sum of squares with positive multipliers. It is zero only when y=0y = 0 and x+2y=0x + \op{2}y = 0, that is, only at x=y=0x = y = 0, so AA is positive definite.

In the family 2x2+2bxy+11y22x^2 + \down{2bxy} + 11y^2 with matrix [2bb11]\begin{bmatrix} 2 & \down{b} \\ \down{b} & 11 \end{bmatrix}, making b\down{b} larger pulls down the slice along the line x=−b2yx = -\frac{\down{b}}{2}y, where the height is just (11−b22)y2\left(\up{11 - \frac{\down{b}^2}{2}}\right)y^2, even while every entry in the matrix stays positive. The bowl flattens into a trough and bends into a saddle right when the second pivot 11−b22\up{11 - \frac{\down{b}^2}{2}} passes through zero.

Even when every number in the matrix stays positive, a bigger cross-term can pull the bowl down until the second pivot drops below zero and the surface turns into a saddle.
3

Upper-Left Determinants and the 3-by-3 Test

We want a way to check whether every pivot is positive, and even find the pivots themselves, directly from the original matrix without writing out row reduction step by step.

Now let's connect the pivots to the upper-left determinants and test the 3×33 \times 3 matrix A=[2424117279]A = \begin{bmatrix} 2 & 4 & 2 \\ 4 & 11 & 7 \\ 2 & 7 & 9 \end{bmatrix}.

Upper-Left Determinants and the 3-by-3 Test
A=[2424117279]\displaystyle A = \begin{bmatrix} 2 & 4 & 2 \\ 4 & 11 & 7 \\ 2 & 7 & 9 \end{bmatrix}
D1, D2, D3=  ?p1, p2, p3=  ?\displaystyle \begin{aligned} D_1,\ D_2,\ D_3 &= \;? \\ \up{p_1},\ \up{p_2},\ \up{p_3} &= \;? \end{aligned}
22
44
22
44
1111
77
22
77
99
D1=p1D_1 = \htmlClass{lc-blue}{p_1}
D2=p1p2D_2 = \htmlClass{lc-blue}{p_1 p_2}
D3=p1p2p3D_3 = \htmlClass{lc-blue}{p_1 p_2 p_3}

Each upper-left determinant DkD_k is the product of the first kk pivots, so dividing consecutive determinants gives the pivots directly:

D1=p1,D2=p1p2  ⟹  p2=D2D1,D3=p1p2p3  ⟹  p3=D3D2\displaystyle \begin{aligned} D_1 &= \up{p_1}, \\ D_2 &= \up{p_1 p_2} & \implies \up{p_2} &= \frac{D_2}{D_1}, \\ D_3 &= \up{p_1 p_2 p_3} & \implies \up{p_3} &= \frac{D_3}{D_2} \end{aligned}
Text solution
Eliminate down the first and second columnsSubtract 2\op{2} times Row 1 from Row 2 and 1\op{1} times Row 1 from Row 3 to clear the first column, then subtract Row 2 from Row 3 to put all three pivots on the diagonal.
[2424117279]→Row 3 ← Row 3−Row 1Row 2 ← Row 2−2 Row 1[242033037]→Row 3 ← Row 3−Row 2[242033004]\displaystyle \begin{aligned} &\begin{bmatrix} 2 & 4 & 2 \\ 4 & 11 & 7 \\ 2 & 7 & 9 \end{bmatrix} \\ &\xrightarrow[\text{Row } 3 \,\leftarrow\, \text{Row } 3 - \text{Row } 1]{\text{Row } 2 \,\leftarrow\, \text{Row } 2 - \op{2}\,\text{Row } 1} \begin{bmatrix} \up{2} & 4 & 2 \\ 0 & \up{3} & 3 \\ 0 & 3 & 7 \end{bmatrix} \\ &\xrightarrow{\text{Row } 3 \,\leftarrow\, \text{Row } 3 - \text{Row } 2} \begin{bmatrix} \up{2} & 4 & 2 \\ 0 & \up{3} & 3 \\ 0 & 0 & \up{4} \end{bmatrix} \end{aligned}
Check the upper-left determinants D1D_1, D2D_2, and D3D_3Compute the determinants of the 1×11 \times 1, 2×22 \times 2, and 3×33 \times 3 submatrices starting from the top-left corner.
D1=det⁡[2]=2>0D2=det⁡[24411]=2(11)−4(4)=6>0D3=det⁡[2424117279]=2(99−49)−4(36−14)+2(28−22)=24>0\displaystyle \begin{aligned} D_1 &= \det\begin{bmatrix} 2 \end{bmatrix} = 2 > 0 \\ D_2 &= \det\begin{bmatrix} 2 & 4 \\ 4 & 11 \end{bmatrix} \\ &= 2(11) - 4(4) = 6 > 0 \\ D_3 &= \det\begin{bmatrix} 2 & 4 & 2 \\ 4 & 11 & 7 \\ 2 & 7 & 9 \end{bmatrix} \\ &= 2(99 - 49) - 4(36 - 14) \\ &\quad + 2(28 - 22) = 24 > 0 \end{aligned}
Divide consecutive determinants to find the pivotsEach new determinant multiplies in the next pivot, so dividing consecutive determinants gives the pivots from elimination.
p1=D1=2,p2=D2D1=62=3,p3=D3D2=246=4\displaystyle \begin{aligned} \up{p_1} &= D_1 = \up{2}, \\ \up{p_2} &= \frac{D_2}{D_1} = \frac{6}{2} = \up{3}, \\ \up{p_3} &= \frac{D_3}{D_2} = \frac{24}{6} = \up{4} \end{aligned}

So all three upper-left determinants (and all three pivots 2\up{2}, 3\up{3}, and 4\up{4}) are positive, confirming that AA is positive definite.

4

Square Roots and Cholesky Factorization

Every positive number can be written as a square r2r^2 with r≠0r \neq 0. For a positive definite matrix AA, we want the matrix version of a square root: an upper-triangular matrix RR with independent columns such that A=RTRA = R^T R.

Let's see why any product RTRR^T R turns xTAxx^T A x into a squared length, and how to build the Cholesky factorization A=RTRA = R^T R for A=[24411]A = \begin{bmatrix} 2 & 4 \\ 4 & 11 \end{bmatrix} right from its row-reduced form.

Square Roots and Cholesky Factorization
a=r2A=[24411]=RTR\displaystyle \begin{aligned} \up{a} &= r^2 \\ A = \begin{bmatrix} 2 & 4 \\ 4 & 11 \end{bmatrix} &= R^T R \end{aligned}
R\displaystyle R =  ?\displaystyle = \;?

When A=RTRA = R^T R, regrouping the transpose inside the quadratic form turns xTAxx^T A x into the dot product of the vector Rx\up{Rx} with itself:

xTAx\displaystyle x^T A x =xT(RTR)x\displaystyle = x^T (R^T R) x =(Rx)T(Rx)\displaystyle = (\up{Rx})^T (\up{Rx}) =∥Rx∥2⏟squared length of Rx\displaystyle = \underbrace{\|\up{Rx}\|^2}_{\text{squared length of } \up{Rx}}
Text solution
Move the positive pivots inside the squaresBecause the pivots 2\up{2} and 3\up{3} from 2(x+2y)2+3y2\up{2}(x + \op{2}y)^2 + \up{3}y^2 are positive, take their square roots 2\up{\sqrt{2}} and 3\up{\sqrt{3}} and move them inside the squared terms.
2(x+2y)2+3y2=(2(x+2y))2+(3y)2=(2x+22y)2+(3y)2=∥Rx∥2\displaystyle \begin{aligned} &\up{2}(x + \op{2}y)^2 + \up{3}y^2 \\ &\quad= \bigl(\up{\sqrt{2}}(x + \op{2}y)\bigr)^2 + (\up{\sqrt{3}}y)^2 \\ &\quad= (\up{\sqrt{2}}x + 2\sqrt{2}y)^2 + (\up{\sqrt{3}}y)^2 \\ &\quad= \|\up{Rx}\|^2 \end{aligned}
Divide each reduced row by the square root of its pivotStarting from the row-reduced matrix [2403]\begin{bmatrix} \up{2} & 4 \\ 0 & \up{3} \end{bmatrix}, divide Row 1 by 2\up{\sqrt{2}} and Row 2 by 3\up{\sqrt{3}} to get the upper-triangular Cholesky factor RR.
[2403]→Row 2 ← Row 23Row 1 ← Row 12R=[22203]\displaystyle \begin{bmatrix} \up{2} & 4 \\ 0 & \up{3} \end{bmatrix} \xrightarrow[\text{Row } 2 \,\leftarrow\, \tfrac{\text{Row } 2}{\up{\sqrt{3}}}]{\text{Row } 1 \,\leftarrow\, \tfrac{\text{Row } 1}{\up{\sqrt{2}}}} R = \begin{bmatrix} \up{\sqrt{2}} & 2\sqrt{2} \\ 0 & \up{\sqrt{3}} \end{bmatrix}
Multiply RTRR^T R to check the factorizationMultiplying the transpose of RR by RR gives back the original symmetric matrix AA.
RTR=[20223][22203]=[2448+3]=[24411]\displaystyle \begin{aligned} R^T R &= \begin{bmatrix} \up{\sqrt{2}} & 0 \\ 2\sqrt{2} & \up{\sqrt{3}} \end{bmatrix} \begin{bmatrix} \up{\sqrt{2}} & 2\sqrt{2} \\ 0 & \up{\sqrt{3}} \end{bmatrix} \\ &= \begin{bmatrix} 2 & 4 \\ 4 & 8 + 3 \end{bmatrix} = \begin{bmatrix} 2 & 4 \\ 4 & 11 \end{bmatrix} \end{aligned}

So A=RTRA = R^T R, and xTAx=∥Rx∥2x^T A x = \|\up{Rx}\|^2 is positive for every non-zero vector xx.

For any product A=RTRA = R^T R, the surface xTAx=∥Rx∥2x^T A x = \|\up{Rx}\|^2 stays an upward-facing bowl whenever the two columns of RR lie on different lines through the origin, and only flattens into a trough when one column is a multiple of the other. Because a squared length is never negative, it can never bend downward into a saddle.

Multiplying a matrix by its transpose gives an upward bowl when its columns lie on different lines through the origin, and a flat trough when they lie on the same line, never a saddle.
5

Minimums, SVD, and the Six Equivalent Tests

In applications, positive definite matrices answer two big questions: whether a flat point of a multivariable function is a local minimum, and why ATAA^T A lets us factor any matrix into rotations and stretches in the Singular Value Decomposition (SVD).

Minimums, SVD, and the Six Equivalent Tests
A=[24411]A = \begin{bmatrix} 2 & 4 \\ 4 & 11 \end{bmatrix}
HH positive definite
HH indefinite

Key concepts

A symmetric matrix AA is positive definite if it passes any one of these five equivalent tests. Passing one guarantees all five:

Direction and quadratic form (xTAx>0x^T A x > 0 and angle(x,Ax)<90∘\text{angle}(x, \op{Ax}) < 90^\circ for all x≠0x \neq 0)

Use this right away when you are given a vector xx and its output Ax\op{Ax} instead of the entries of AA. You do not need the matrix: if x=[2−1]x = \begin{bmatrix} 2 \\ -1 \end{bmatrix} and Ax=[14]\op{Ax} = \op{\begin{bmatrix} 1 \\ 4 \end{bmatrix}}, the dot product xT(Ax)=2(1)+(−1)(4)=−2<0x^T(\op{Ax}) = 2(\op{1}) + (-1)(\op{4}) = \down{-2} < 0 already tells you the angle is past 90∘90^\circ, so AA cannot be positive definite.

Pivots and completing the square (all pivots pk>0\up{p_k} > 0)

Row elimination is completing the square in matrix form. For [24411]→[2403]\begin{bmatrix} 2 & \down{4} \\ \down{4} & 11 \end{bmatrix} \to \begin{bmatrix} \up{2} & 4 \\ 0 & \up{3} \end{bmatrix}, the pivots 2\up{2} and 3\up{3} are the multipliers in 2(x+2y)2+3y2\up{2}(x + \op{2}y)^2 + \up{3}y^2. Never judge a matrix by the signs of its entries alone: [2101011]\begin{bmatrix} 2 & \down{10} \\ \down{10} & 11 \end{bmatrix} has all positive entries, yet its second pivot is 11−50=−39<011 - \down{50} = \down{-39} < 0 (a saddle), while a matrix with negative off-diagonal entries is still positive definite whenever its pivots stay positive.

Upper-left determinants (all Dk>0D_k > 0 from the top-left corner)

Best for 2×22 \times 2 and 3×33 \times 3 matrices, or when an unknown parameter kk sits inside the matrix (like a Hessian matrix HH at a critical point). Because D1=p1D_1 = \up{p_1}, D2=p1p2D_2 = \up{p_1 p_2}, and D3=p1p2p3D_3 = \up{p_1 p_2 p_3}, you can find every pivot without row reducing via pk=DkDk−1\up{p_k} = \frac{D_k}{D_{k-1}}: for D1=2,D2=6,D3=24D_1 = 2, D_2 = 6, D_3 = 24, the pivots are 2\up{2}, 62=3\frac{6}{2} = \up{3}, and 246=4\frac{24}{6} = \up{4}. Always check every upper-left determinant, because two negative pivots like 2,−3,−4\up{2}, \down{-3}, \down{-4} still multiply to D3=+24D_3 = +24.

Square-root / Cholesky factor (A=RTRA = R^T R with independent columns, so xTAx=∥Rx∥2x^T A x = \|\up{Rx}\|^2)

Once row elimination gives an upper-triangular matrix with positive pivots, divide each row by pk\up{\sqrt{p_k}} (turning [2403]\begin{bmatrix} \up{2} & 4 \\ 0 & \up{3} \end{bmatrix} into R=[22203]R = \begin{bmatrix} \up{\sqrt{2}} & 2\sqrt{2} \\ 0 & \up{\sqrt{3}} \end{bmatrix}).

Eigenvalues (all λi>0\lambda_i > 0)

Gives the steepness along the main axes of the bowl (and the symmetric square root R=QΛQTR = Q\sqrt{\Lambda}Q^T), though pivots and determinants are much faster for testing a matrix of numbers. If all λi\lambda_i are ≥0\ge 0 with at least one 00, the surface is a positive semi-definite trough; if they have opposite signs, it is an indefinite saddle.

6

Practice

1

A symmetric matrix AA sends the vector x=[2−1]x = \begin{bmatrix} 2 \\ -1 \end{bmatrix} to Ax=[14]\op{Ax} = \op{\begin{bmatrix} 1 \\ 4 \end{bmatrix}}. Without knowing the entries of AA, determine whether the angle between xx and Ax\op{Ax} is less than or greater than 90∘90^\circ, and whether AA can be positive definite.

How does the quadratic form xTAxx^T A x connect the vectors xx and Ax\op{Ax} through a dot product?

Take the dot product of xx and Ax\op{Ax}:
xTAx=xT(Ax)=[2−1][14]=2(1)+(−1)(4)=−2<0\displaystyle \begin{aligned} & x^T A x = x^T(\op{Ax}) \\ &\quad = \begin{bmatrix} 2 & -1 \end{bmatrix} \op{\begin{bmatrix} 1 \\ 4 \end{bmatrix}} \\ &\quad = 2(\op{1}) + (-1)(\op{4}) = \down{-2} < 0 \end{aligned}
(Watch the negative sign on −1-1: dropping it gives 2(1)+1(4)=6>02(\op{1}) + 1(\op{4}) = 6 > 0 and the opposite conclusion. Also note that even if one vector gave xTAx>0x^T A x > 0, a single vector cannot prove AA is positive definite, whereas a single vector with xTAx≤0x^T A x \le 0 immediately rules it out.) Because xTAx=−2<0x^T A x = \down{-2} < 0, the angle between xx and Ax\op{Ax} is greater than 90∘90^\circ, so AA cannot be positive definite.
2

Write the symmetric matrix AA for the quadratic form 3x2−12xy+17y23x^2 - 12xy + 17y^2. Complete the square to write the quadratic form as a sum of squares, then use row elimination on AA to find its pivots. Is AA positive definite despite its negative off-diagonal entries?

How is the −12xy-12xy cross-term split across the off-diagonal entries of a symmetric matrix?

Split the −12xy\down{-12xy} coefficient evenly into two −6\down{-6}'s on the off-diagonal (putting the full −12-12 in both off-diagonal spots is a common mistake, which gives [3−12−1217]\begin{bmatrix} 3 & -12 \\ -12 & 17 \end{bmatrix} and a negative second pivot −31-31):
A=[3−6−617]\displaystyle A = \begin{bmatrix} 3 & \down{-6} \\ \down{-6} & 17 \end{bmatrix}
Complete the square on 3x2−12xy+17y23x^2 - \down{12xy} + 17y^2, remembering that (x−2y)2(x - \op{2}y)^2 is multiplied by 3\up{3}, so it uses up 3(4y2)=12y2\up{3}(\down{4y^2}) = \down{12y^2} rather than just 4y24y^2 (subtracting only 4y24y^2 leaves 13y213y^2 instead of 5y2\up{5}y^2):
3x2−12xy+17y2=3(x2−4xy)+17y2=3(x−2y)2−12y2+17y2=3(x−2y)2+5y2\displaystyle \begin{aligned} & 3x^2 - \down{12xy} + 17y^2 \\ &\quad = \up{3}(x^2 - \down{4xy}) + 17y^2 \\ &\quad = \up{3}(x - \op{2}y)^2 - \down{12y^2} + 17y^2 \\ &\quad = \up{3}(x - \op{2}y)^2 + \up{5}y^2 \end{aligned}
Now add 2\op{2} times Row 1 to Row 2 to eliminate the bottom-left entry:
[3−6−617]→Row 2 ← Row 2+2 Row 1[3−605]\displaystyle \begin{bmatrix} 3 & \down{-6} \\ \down{-6} & 17 \end{bmatrix} \xrightarrow{\text{Row } 2 \,\leftarrow\, \text{Row } 2 + \op{2}\,\text{Row } 1} \begin{bmatrix} \up{3} & -6 \\ 0 & \up{5} \end{bmatrix}
This gives pivots 3\up{3} and 5\up{5} matching the multipliers of the two squares; because both pivots are positive, AA is positive definite.
3

Test whether A=[3333573716]A = \begin{bmatrix} 3 & 3 & 3 \\ 3 & 5 & 7 \\ 3 & 7 & 16 \end{bmatrix} is positive definite by computing its upper-left determinants D1D_1, D2D_2, and D3D_3, and use those determinants to find all three elimination pivots p1\up{p_1}, p2\up{p_2}, and p3\up{p_3} without row reducing.

Outline the 1×11 \times 1, 2×22 \times 2, and 3×33 \times 3 submatrices from the top-left corner, and use the relationship Dk=p1⋯pkD_k = \up{p_1 \cdots p_k}.

Compute the three upper-left determinants from the top-left corner:
D1\displaystyle D_1 =3>0\displaystyle = 3 > 0
D2=det⁡[3335]=3(5)−3(3)=6>0\displaystyle D_2 = \det\begin{bmatrix} 3 & 3 \\ 3 & 5 \end{bmatrix} = 3(5) - 3(3) = 6 > 0
D3=3(80−49)−3(48−21)+3(21−15)=93−81+18=30>0\displaystyle \begin{aligned} D_3 &= 3(80 - 49) - 3(48 - 21) \\ &\quad + 3(21 - 15) \\ &= 93 - 81 + 18 = 30 > 0 \end{aligned}
(Be careful to subtract the middle term −3(48−21)=−81-3(48 - 21) = -81 when expanding D3D_3; adding it instead gives D3=192D_3 = 192 and p3=32\up{p_3} = 32.) Since all three upper-left determinants are positive, AA is positive definite. Divide consecutive determinants to get the pivots (do not list the determinants 3,6,303, 6, 30 themselves as the pivots):
p1=D1=3,p2=D2D1=63=2,p3=D3D2=306=5\displaystyle \begin{aligned} \up{p_1} &= D_1 = \up{3}, \\ \up{p_2} &= \frac{D_2}{D_1} = \frac{6}{3} = \up{2}, \\ \up{p_3} &= \frac{D_3}{D_2} = \frac{30}{6} = \up{5} \end{aligned}
4

Every entry of the symmetric matrix B=[123216367]B = \begin{bmatrix} 1 & 2 & 3 \\ 2 & 1 & 6 \\ 3 & 6 & 7 \end{bmatrix} is positive, its first pivot is D1=1>0D_1 = 1 > 0, and its full 3×33 \times 3 determinant is D3=6>0D_3 = 6 > 0. Is BB positive definite? Find D2D_2 and all three pivots of BB to explain why.

Check the 2×22 \times 2 upper-left determinant D2D_2 sitting between D1D_1 and D3D_3, and see what its sign does to p2\up{p_2} and p3\up{p_3}.

Compute the upper-left 2×22 \times 2 determinant D2D_2:
D2=det⁡[1221]=1(1)−2(2)=−3<0\displaystyle D_2 = \det\begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix} = 1(1) - 2(2) = \down{-3} < 0
(Be careful not to skip D2D_2 just because the entries of BB, D1=1D_1 = 1, and D3=6D_3 = 6 are all positive.) Dividing consecutive determinants gives the three pivots, remembering to divide D3D_3 by D2=−3D_2 = \down{-3}, not by D1=1D_1 = 1:
p1=D1=1,p2=D2D1=−31=−3,p3=D3D2=6−3=−2\displaystyle \begin{aligned} \up{p_1} &= D_1 = \up{1}, \\ \up{p_2} &= \frac{D_2}{D_1} = \frac{\down{-3}}{1} = \down{-3}, \\ \up{p_3} &= \frac{D_3}{D_2} = \frac{6}{\down{-3}} = \down{-2} \end{aligned}
Because the two negative pivots p2=−3\up{p_2} = \down{-3} and p3=−2\up{p_3} = \down{-2} multiply to make D3=+6D_3 = +6, BB is not positive definite (it is indefinite).
5

Find the upper-triangular Cholesky factor RR such that A=RTRA = R^T R for the positive definite matrix A=[46614]A = \begin{bmatrix} 4 & 6 \\ 6 & 14 \end{bmatrix}, and use RR to write xTAxx^T A x as the squared length ∥Rx∥2\|\up{Rx}\|^2.

Row reduce AA to find its upper-triangular form first, then divide each entire row by the square root of its pivot.

Subtract 32\op{\frac{3}{2}} times Row 1 from Row 2 to find the elimination pivots:
[46614]→Row 2 ← Row 2−32 Row 1[4605]\displaystyle \begin{bmatrix} 4 & 6 \\ 6 & 14 \end{bmatrix} \xrightarrow{\text{Row } 2 \,\leftarrow\, \text{Row } 2 - \op{\tfrac{3}{2}}\,\text{Row } 1} \begin{bmatrix} \up{4} & 6 \\ 0 & \up{5} \end{bmatrix}
The pivots are 4\up{4} and 5\up{5}. Divide all of Row 1 by 4=2\up{\sqrt{4}} = \up{2} and Row 2 by 5\up{\sqrt{5}} (be sure to divide the off-diagonal 66 in Row 1 by 4=2\up{\sqrt{4}} = \up{2} as well: leaving 66 alone gives [2605]\begin{bmatrix} 2 & 6 \\ 0 & \sqrt{5} \end{bmatrix}, and dividing by the pivot 4\up{4} instead of 4\up{\sqrt{4}} gives [13201]\begin{bmatrix} 1 & \tfrac{3}{2} \\ 0 & 1 \end{bmatrix}, neither of which gives RTR=AR^T R = A):
R=[2305]\displaystyle R = \begin{bmatrix} \up{2} & 3 \\ 0 & \up{\sqrt{5}} \end{bmatrix}
Using the rows of RR, the quadratic form is the squared length:
xTAx\displaystyle x^T A x =∥Rx∥2\displaystyle = \|\up{Rx}\|^2 =(2x+3y)2+(5y)2\displaystyle = (\up{2}x + 3y)^2 + (\up{\sqrt{5}}y)^2
6

At a point where the slope is zero in every direction, a function has the Hessian matrix H=[2k0k52022]H = \begin{bmatrix} 2 & k & 0 \\ k & 5 & 2 \\ 0 & 2 & 2 \end{bmatrix}. For what values of kk does the Hessian guarantee that the point is a local minimum? What shape does the surface of xTHxx^T H x have when k=±6k = \pm\sqrt{6} and when ∣k∣>6|k| > \sqrt{6}?

For the Hessian to guarantee a local minimum, all three upper-left determinants D1D_1, D2D_2, and D3D_3 of HH must be positive at the same time.

Compute the three upper-left determinants of HH:
D1\displaystyle D_1 =2>0\displaystyle = 2 > 0
D2=det⁡[2kk5]=10−k2\displaystyle D_2 = \det\begin{bmatrix} 2 & k \\ k & 5 \end{bmatrix} = 10 - k^2
D3\displaystyle D_3 =2(10−4)−k(2k−0)+0\displaystyle = 2(10 - 4) - k(2k - 0) + 0 =12−2k2\displaystyle = 12 - 2k^2
We need both D2=10−k2>0D_2 = 10 - k^2 > 0 and D3=12−2k2>0D_3 = 12 - 2k^2 > 0, which requires k2<6k^2 < 6 (stopping after D2>0D_2 > 0 gives the wider interval −10<k<10-\sqrt{10} < k < \sqrt{10}, where D3D_3 is already negative for 6<k2<10\down{6 < k^2 < 10}). So the point is a local minimum for −6<k<6-\sqrt{6} < k < \sqrt{6}. When k=±6k = \pm\sqrt{6}, D1>0D_1 > 0, D2>0D_2 > 0, and D3=0D_3 = 0, so the third pivot is zero and the surface is a positive semi-definite trough. When ∣k∣>6\down{|k| > \sqrt{6}}, at least one pivot is negative and the surface is an indefinite saddle.