The inertia of a real symmetric matrix is a triple, written , where is the number of positive eigenvalues of , is the number of negative eigenvalues of , and is the number of zero eigenvalues of .
The rank of is . The difference is called the signature.
In general it is not possible to determine the inertia by inspection, but some deductions can be made. If has both positive and negative diagonal elements then and . But in general the diagonal elements do not tell us much about the inertia. For example, here is a matrix that has positive diagonal elements but only one positive eigenvalue (and this example works for any ):
>> n = 4; A = -eye(n) + 2*ones(n), eigA = eig(sym(A))' A = 1 2 2 2 2 1 2 2 2 2 1 2 2 2 2 1 eigA = [-1, -1, -1, 7]
A congruence transformation of a symmetric matrix is a transformation for a nonsingular matrix . The result is clearly symmetric. Sylvester’s law of inertia (1852) says that the inertia is preserved under congruence transformations.
Theorem 1 (Sylvester’s law of inertia).
If is symmetric and is nonsingular then .
Sylvester’s law gives a way to determine the inertia without computing eigenvalues: find a congruence transformation that transforms to a matrix whose inertia can be easily determined. A factorization does the job, where is a permutation matrix, is unit lower triangular, and is diagonal Then , and can be read off the diagonal of . This factorization does not always exist, and if it does exist is can be numerically unstable. A block factorization, in which is block diagonal with diagonal blocks of size or , always exists, and its computation is numerically stable with a suitable pivoting strategy such as symmetric rook pivoting.
For the matrix above we can compute a block factorization using the MATLAB
>> [L,D,P] = ldl(A); D D = 1.0000e+00 2.0000e+00 0 0 2.0000e+00 1.0000e+00 0 0 0 0 -1.6667e+00 0 0 0 0 -1.4000e+00
Since the leading 2-by-2 block of has negative determinant and hence one positive eigenvalue and one negative eigenvalue, it follows that has one positive eigenvalue and three negative eigenvalues.
A congruence transformation preserves the signs of the eigenvalues but not their magnitude. A result of Ostrowski (1959) bounds the ratios of the eigenvalues of the original and transformed matrices. Let the eigenvalues of a symmetric matrix be ordered .
For a symmetric and ,
The theorem shows that the further is from being orthogonal the greater the potential change in the eigenvalues.
Finally, we note that everything here generalizes to complex Hermitian matrices by replacing transpose by conjugate transpose.