By the real spectral theorem, the real symmetric matrix has an orthonormal basis of eigenvectors. In that basis the associated quadratic form isRescaling the coordinates belonging to nonzero eigenvalues changes every positive coefficient to and every negative coefficient to . Hence the diagonal normal form has one positive square for each positive eigenvalue and one negative square for each negative eigenvalue. By Sylvester's law of inertia, these counts do not depend on the diagonalizing basis, so
The numerical eigenvalues are not invariant under a general change of basis, because the matrix changes by congruence rather than similarity. For example, on a one-dimensional space let . Its matrix in the basis is , whereas in the basis it is . The eigenvalue changes from to , although its sign, and therefore the signature, is unchanged.
Solved by gpt-5.6-sol high.
Codex Wiki