# Signs of eigenvalues of $3$ by $3$ matrix

I'm learning linear algebra, specifically quadratic forms, and need help with the following exercise :

Let $f(x, y, z) = 5x^2 + 12xy + 9y^2 + 6xz - 10yz$.

$(1)$ Find the matrix representation $\mathbf x^T A \mathbf x$ of $f$.

$(2)$ Find the signs of the eigenvalues of $A$.

Here's my work so far :

$(1)$ The matrix representation of $f$ is given by $$\begin{bmatrix}x&y&z\\ \end{bmatrix} \begin{bmatrix}5&6&3\\6&9&-5\\3&-5&0\\ \end{bmatrix} \begin{bmatrix}x\\y\\z\\ \end{bmatrix} = \mathbf x^T A \mathbf x$$

where $A$ is a symmetric matrix, i.e. $A$ has real eigenvalues.

$(2)$ This is the part where I need your help. I'm still going to share my thoughts and what I have found so far.

First we note that $\det(A) = -386 < 0.$ Therefore, by Sylvester's criterion, the matrix $A$ is not positive definite since all principal minors determinants are not all positive. Secondly, by the relation between the eigenvalues and the determinant of $A$ we know that $\det(A) = \lambda_1\lambda_2\lambda_3 < 0$. We therefore have two options : either all eigenvalues are negative or either two of them are positive and the other one is negative.

It is unclear to me how I should proceed from here to decide which of the two options is the correct one.

• You can use that $\operatorname{Tr}(\mathbf{A}) = \sum_{i}A_{ii} = \sum_{i}\lambda_{i}$, and note that this is positive. – Thomas Russell Jan 17 '18 at 21:52
• You can also "congruence diagonalize" and use Sylvester Inertia... – Will Jagy Jan 17 '18 at 22:21

Recall that a symmetric matrix $A$ is called negative definite if and only if all of its eigenvalues are negative. Moreover, a symmetric matrix $A$ is called negative definite if and only if all its leading principal minors are negative.

Note that $\det(5)=5>0$. Hence, $A$ is not negative definite and as you noted $\det(A) = \lambda_1\lambda_2\lambda_3 < 0$. Hence, it must be that two of the eigenvalues are positive one of them is negative.

For point 2 note that

$$\det(5)=5>0$$

$$\det \begin{bmatrix}5&6\\6&9\\ \end{bmatrix}=9>0$$

$$\det A<0$$

thus the signature is:

$$n_0=0 \quad n_+=2 \quad n_-=1$$

You have two positive eigenvalues $( 5.4025)$,$(13.7817)$, and one negative eigenvalue $(-5.1843)$.

The sum is 14 which is trace and the product is the determinant as you claimed.

• Correct. I had worked with a wrong matrix. Now it is fixed. – Mohammad Riazi-Kermani Jan 17 '18 at 22:33
• @MohammadRiazi-Kermani if you wish someone to be notified that you have posted a comment in reply to their comment, you need to start the comment with an "at" sign and at least three letters of their user name. Usually, the system will allow you to click on the whole name after you type the first one or two letters – Will Jagy Jan 17 '18 at 22:37
• @WillJagy, Thanks. I am learning something new every day. – Mohammad Riazi-Kermani Jan 17 '18 at 22:49

Calling your matrix $H$ ( stands for Hessian, or half the Hessian, depends) we can find, with no approximations, a matrix $P$ with $\det P = \pm 1,$ such that $P^T H P = D$ is diagonal. The diagonal entries are not the eigenvalues, but they have the same "signs" as the eigenvalues by Sylvester's Law of Inertia. Here, we get two positive and one negative diagonal entry, so there are two positive and one negative eigenvalues. They are real, by the way, symmetric matrices have real eigenvalues. $$P^T H P = D$$ $$\left( \begin{array}{rrr} 1 & 0 & 0 \\ - \frac{ 6 }{ 5 } & 1 & 0 \\ - \frac{ 19 }{ 3 } & \frac{ 43 }{ 9 } & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 5 & 6 & 3 \\ 6 & 9 & - 5 \\ 3 & - 5 & 0 \\ \end{array} \right) \left( \begin{array}{rrr} 1 & - \frac{ 6 }{ 5 } & - \frac{ 19 }{ 3 } \\ 0 & 1 & \frac{ 43 }{ 9 } \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 5 & 0 & 0 \\ 0 & \frac{ 9 }{ 5 } & 0 \\ 0 & 0 & - \frac{ 386 }{ 9 } \\ \end{array} \right)$$

$$D_0 = H$$ $$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} 5 & 6 & 3 \\ 6 & 9 & - 5 \\ 3 & - 5 & 0 \\ \end{array} \right)$$

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

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

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

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

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

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

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

$$P^T H P = D$$ $$\left( \begin{array}{rrr} 1 & 0 & 0 \\ - \frac{ 6 }{ 5 } & 1 & 0 \\ - \frac{ 19 }{ 3 } & \frac{ 43 }{ 9 } & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 5 & 6 & 3 \\ 6 & 9 & - 5 \\ 3 & - 5 & 0 \\ \end{array} \right) \left( \begin{array}{rrr} 1 & - \frac{ 6 }{ 5 } & - \frac{ 19 }{ 3 } \\ 0 & 1 & \frac{ 43 }{ 9 } \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 5 & 0 & 0 \\ 0 & \frac{ 9 }{ 5 } & 0 \\ 0 & 0 & - \frac{ 386 }{ 9 } \\ \end{array} \right)$$ $$Q^T D Q = H$$ $$\left( \begin{array}{rrr} 1 & 0 & 0 \\ \frac{ 6 }{ 5 } & 1 & 0 \\ \frac{ 3 }{ 5 } & - \frac{ 43 }{ 9 } & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 5 & 0 & 0 \\ 0 & \frac{ 9 }{ 5 } & 0 \\ 0 & 0 & - \frac{ 386 }{ 9 } \\ \end{array} \right) \left( \begin{array}{rrr} 1 & \frac{ 6 }{ 5 } & \frac{ 3 }{ 5 } \\ 0 & 1 & - \frac{ 43 }{ 9 } \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 5 & 6 & 3 \\ 6 & 9 & - 5 \\ 3 & - 5 & 0 \\ \end{array} \right)$$

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

I deliberately interchanged the first and third variables, to show how the diagonal entries may change a little when making some different choices, but still come out $++-$

$$P^T H P = D$$ $$\left( \begin{array}{rrr} 0 & 1 & 0 \\ 1 & \frac{ 5 }{ 9 } & 0 \\ \frac{ 57 }{ 25 } & \frac{ 3 }{ 5 } & 1 \\ \end{array} \right) \left( \begin{array}{rrr} 0 & - 5 & 3 \\ - 5 & 9 & 6 \\ 3 & 6 & 5 \\ \end{array} \right) \left( \begin{array}{rrr} 0 & 1 & \frac{ 57 }{ 25 } \\ 1 & \frac{ 5 }{ 9 } & \frac{ 3 }{ 5 } \\ 0 & 0 & 1 \\ \end{array} \right) = \left( \begin{array}{rrr} 9 & 0 & 0 \\ 0 & - \frac{ 25 }{ 9 } & 0 \\ 0 & 0 & \frac{ 386 }{ 25 } \\ \end{array} \right)$$

$$H = \left( \begin{array}{rrr} 0 & - 5 & 3 \\ - 5 & 9 & 6 \\ 3 & 6 & 5 \\ \end{array} \right)$$

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

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

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

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

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

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

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

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

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

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