0

Is $$ 2x_1^2 + 5x_2^2 + 5x_3^2 + 4x_1x_2 - 4x_1x_3 - 8x_2x_3 $$ positively (semi)definite, negatively (semi)definite or indefinite?

My attempt: $$2x_1^2 + 5x_2^2 + 5x_3^2 + 4x_1x_2 - 4x_1x_3 - 8x_2x_3,$$ is equal to $$(x_1 + 2x_2)^2 + (x_1 - 2x_3)^2 + (x_2 - 4x_3)^2 - 15x_3^2.$$ I've got three positive squares and a negative one, so the expression could be both negative and positive so I would answer indefinite. However, the answer is supposed to be positively definite. Why?

Heuristics
  • 1,059
  • 2
    The positive square terms also involve $x_3$ and seems to balance out the negative square term, so that the overall sum is positive. But you can prove it easily by using properties of positive definite matrices. – QED Dec 12 '17 at 11:30
  • The expression as a sum of squares *must be* three or fewer squares, in dimension 3. If there were only two squares needed, that would mean a zero eigenvalue... One expression, using letters x,y,z, is $$ 2 (x+y-z)^2 + \frac{1}{3}(3y-2z)^2 + \frac{5}{3} z^2 $$ – Will Jagy Dec 12 '17 at 19:13

2 Answers2

1

Writing that expression in matrix form, we get $$\begin{bmatrix}x_1&x_2&x_3\end{bmatrix}A\begin{bmatrix}x_1\\x_2\\x_3\end{bmatrix},$$ where, if I'm not mistaken, $A=\begin{bmatrix}2&2&-2\\2&5&-4\\-2&-4&5\end{bmatrix}$.

There are a number of ways we can attempt to prove the positive definiteness of $A$. My personal favorite is using good old Gaussian elimination to see if all three pivots of $A$ are positive; if they are, $A$ is positive definite. Three row operations $\left(R_2\rightarrow R_2-R_1, R_3\rightarrow R_3+R_1, R_3\rightarrow R_3+\frac{2}{3}R_2\right)$ yield the following reduced matrix:$$A\rightarrow\begin{bmatrix}2&2&-2\\0&3&-2\\0&0&\frac{1}{3}\end{bmatrix}$$ Since all three pivots of $A$ are positive, we can conclude that $A$ is indeed positive definite.

1

Sylvester's Law of Inertia says you can take (half) the Hessian matrix, call that $H,$ then find any congruence $P^T H P = D,$ with $\det P \neq 0.$ The count of positive, negative, zero diagonal elements is the same as the count for the eigenvalues, although the diagonal entries of $D$ are not the eigenvalues.

$$ H = \left( \begin{array}{rrr} 2 & 2 & - 2 \\ 2 & 5 & - 4 \\ - 2 & - 4 & 5 \\ \end{array} \right) $$

$$ P^T H P = D $$ $$\left( \begin{array}{rrr} 1 & 0 & 0 \\ - 1 & 1 & 0 \\ \frac{ 1 }{ 3 } & \frac{ 2 }{ 3 } & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 2 & 2 & - 2 \\ 2 & 5 & - 4 \\ - 2 & - 4 & 5 \\ \end{array} \right) \left( \begin{array}{rrr} 1 & - 1 & \frac{ 1 }{ 3 } \\ 0 & 1 & \frac{ 2 }{ 3 } \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & \frac{ 5 }{ 3 } \\ \end{array} \right) $$ $$ Q^T D Q = H $$ $$\left( \begin{array}{rrr} 1 & 0 & 0 \\ 1 & 1 & 0 \\ - 1 & - \frac{ 2 }{ 3 } & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & \frac{ 5 }{ 3 } \\ \end{array} \right) \left( \begin{array}{rrr} 1 & 1 & - 1 \\ 0 & 1 & - \frac{ 2 }{ 3 } \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 2 & 2 & - 2 \\ 2 & 5 & - 4 \\ - 2 & - 4 & 5 \\ \end{array} \right) $$

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Algorithm discussed here http://math.stackexchange.com/questions/1388421/reference-for-linear-algebra-books-that-teach-reverse-hermite-method-for-symmetr

$$ E_j^T D_{j-1} E_j = D_j $$ $$ P_{j-1} E_j = P_j $$ $$ E_j^{-1} Q_{j-1} = Q_j $$ $$ P_j Q_j = I $$ $$ P_j^T H P_j = D_j $$ $$ Q_j^T D_j Q_j = H $$

$$ H = \left( \begin{array}{rrr} 2 & 2 & - 2 \\ 2 & 5 & - 4 \\ - 2 & - 4 & 5 \\ \end{array} \right) $$

==============================================

$$ E_{1} = \left( \begin{array}{rrr} 1 & - 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) $$ $$ P_{1} = \left( \begin{array}{rrr} 1 & - 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; Q_{1} = \left( \begin{array}{rrr} 1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; D_{1} = \left( \begin{array}{rrr} 2 & 0 & - 2 \\ 0 & 3 & - 2 \\ - 2 & - 2 & 5 \\ \end{array} \right) $$

==============================================

$$ E_{2} = \left( \begin{array}{rrr} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) $$ $$ P_{2} = \left( \begin{array}{rrr} 1 & - 1 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; Q_{2} = \left( \begin{array}{rrr} 1 & 1 & - 1 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; D_{2} = \left( \begin{array}{rrr} 2 & 0 & 0 \\ 0 & 3 & - 2 \\ 0 & - 2 & 3 \\ \end{array} \right) $$

==============================================

$$ E_{3} = \left( \begin{array}{rrr} 1 & 0 & 0 \\ 0 & 1 & \frac{ 2 }{ 3 } \\ 0 & 0 & 1 \\ \end{array} \right) $$ $$ P_{3} = \left( \begin{array}{rrr} 1 & - 1 & \frac{ 1 }{ 3 } \\ 0 & 1 & \frac{ 2 }{ 3 } \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; Q_{3} = \left( \begin{array}{rrr} 1 & 1 & - 1 \\ 0 & 1 & - \frac{ 2 }{ 3 } \\ 0 & 0 & 1 \\ \end{array} \right) , \; \; \; D_{3} = \left( \begin{array}{rrr} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & \frac{ 5 }{ 3 } \\ \end{array} \right) $$

==============================================

$$ P^T H P = D $$ $$\left( \begin{array}{rrr} 1 & 0 & 0 \\ - 1 & 1 & 0 \\ \frac{ 1 }{ 3 } & \frac{ 2 }{ 3 } & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 2 & 2 & - 2 \\ 2 & 5 & - 4 \\ - 2 & - 4 & 5 \\ \end{array} \right) \left( \begin{array}{rrr} 1 & - 1 & \frac{ 1 }{ 3 } \\ 0 & 1 & \frac{ 2 }{ 3 } \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & \frac{ 5 }{ 3 } \\ \end{array} \right) $$ $$ Q^T D Q = H $$ $$\left( \begin{array}{rrr} 1 & 0 & 0 \\ 1 & 1 & 0 \\ - 1 & - \frac{ 2 }{ 3 } & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 2 & 0 & 0 \\ 0 & 3 & 0 \\ 0 & 0 & \frac{ 5 }{ 3 } \\ \end{array} \right) \left( \begin{array}{rrr} 1 & 1 & - 1 \\ 0 & 1 & - \frac{ 2 }{ 3 } \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 2 & 2 & - 2 \\ 2 & 5 & - 4 \\ - 2 & - 4 & 5 \\ \end{array} \right) $$

Will Jagy
  • 139,541