Sign of eigenvalues of a real $3 \times 3$ symmetric matrix I want to find just the sign of $3$ eigenvalues of a given real symmetric $3 \times 3$ matrix $\mathbf{A}$ without actually calculating the eigenvalues. Is there any way I can do it based on only the matrix entries and the given information?
 A: You may use Sylvester's law of inertia.
In general, you can diagonalise a real symmetric matrix $A$ by congruence (whose computational complexity is in general lower than orthogonal diagonalisation). Then the signs of the resulting diagonal matrix are the signs of the eigenvalues of $A$.
Alternatively, if your matrix happens to contain a nested sequence of nonzero principal minors, you can apply the (lesser known) sign-change version of Sylvester's law of inertia without performing any diagonalisation. More specifically, suppose that there exists a (reversely) nested sequence of principal submatrices $A_0,A_1,A_2,\ldots,A_n$ of $A$ such that each $A_k$ is nonsingular and $k\times k$ (here $A_0$ by convention denotes the empty matrix with determinant $1$ and $A_n=A$) and $A_{k-1}$ is contained in $A_k$. Then the number of sign changes in the numeric sequence
$$
\det(A_0)\,(=1),\,\det(A_1),\ldots,\det(A_{n-1}),\,\det(A_n)\,(=\det(A))
$$
is the number of negative eigenvalues of $A$. E.g. consider
$$
A=\pmatrix{0&0&1\\ 0&1&2\\ 1&2&-3}.
$$
Then $1,\,\det(A(2,2))=1,\,\det(A(2:3,\,2:3))=-7,\,\det(A)=-1$ is a sequence of nonzero nested principal minors. Since there is only one sign change (between $\det(A_1)$ and $\det(A_2)$) in the sequence, we conclude that $A$ has one negative eigenvalue and two positive eigenvalues.
Note that the choice of the nested principal minors does not matter as long as these minors are nonzero. To illustrate, the $A$ in the example above has only three sequences of nonzero nested principal minors:


*

*$1,\,\det(A(2,2))=1,\,\det(A(2:3,\,2:3))=-7,\,\det(A)=-1$,

*$1,\,\det(A(3,3))=-3,\,\det(A(2:3,\,2:3))=-7,\,\det(A)=-1$,

*$1,\,\det(A(3,3))=-3,\,\det(A(\{1,3\},\,\{1,3\}))=-1,\,\det(A)=-1$.


We see that in every one of them, the number of sign changes remains the same (namely, exactly $1$).
