2

Sylvester's law of inertia states that for any symmetric matrix $A$ there exist an invertible matrix S such that, $S^T A S = D$, where $D$ is a diagonal matrix which has only entries 0, +1 and −1 along the diagonal.

How can the matrix $S$ be computed such that for symmetric positive diagonal matrix $A$, the diagonal matrix $D$ will be in the following form, $\begin{pmatrix} I_r \\ & 0\\ & & \ddots & \\ & & & & 0 \\ \end{pmatrix}$.

Where $r = \text{rank} (A)$

Eugene Zhang
  • 16,805
  • 2
    start with these three; it is easy enough to adjust the resulting diagonal matrix to one with only $0,\pm1$ http://math.stackexchange.com/questions/1388421/reference-for-linear-algebra-books-that-teach-reverse-hermite-method-for-symmetr http://math.stackexchange.com/questions/395634/given-a-4-times-4-symmetric-matrix-is-there-an-efficient-way-to-find-its-eige/1392600#1392600 http://math.stackexchange.com/questions/1388281/find-the-transitional-matrix-that-would-transform-this-form-to-a-diagonal-form/1391117#1391117 – Will Jagy Aug 22 '15 at 03:36
  • oh, if it really is positive semidefinite, I think there is a variant of Cholesky to do that. – Will Jagy Aug 22 '15 at 03:37

1 Answers1

4

By the Spectral Theorem, $A$ is orthogonally similar to a diagonal matrix, i.e $$ P^{T}AP=\pmatrix{\lambda_1 \\ & \ddots \\ && \lambda_n} $$ where $\lambda_i$ is an eigenvalue of $A$, and $\space P^{T}P=P^{-1}P=I$. Since $$ \pmatrix{\lambda_1 \\ & \ddots \\ && \lambda_n}=Q\pmatrix{I_r\\ &-I_s\\ && 0}Q $$ where $r$ is the number of positive eigenvalues and $s$ the number of negative eigenvalues. $\lambda_i> 0, \:i\leqslant r,\:\lambda_i< 0,\:r<i\leqslant r+s$ and $\lambda_i= 0, \:i>r+s$. And $$ Q=\pmatrix{{\sqrt{|\lambda_1|}} \\ & \ddots \\ && {\sqrt{|\lambda_{r+s}|}} \\ &&& 1} $$ And $Q^T=Q$. Let $S=PQ^{-1}$. Then $$ S^TAS=\pmatrix{I_r\\ &-I_s\\ && 0} $$

Eugene Zhang
  • 16,805
  • 1
    if we do not insist on orthogonality, it is quite easy. If integer entries, we may find $P$ with all coefficients rational, determinant one, and the whole thing algorithmic. Please see http://math.stackexchange.com/questions/1388421/reference-for-linear-algebra-books-that-teach-reverse-hermite-method-for-symmetr http://math.stackexchange.com/questions/395634/given-a-4-times-4-symmetric-matrix-is-there-an-efficient-way-to-find-its-eige/1392600#1392600 http://math.stackexchange.com/questions/1388281/find-the-transitional-matrix-that-would-transform-this-form-to-a-diagonal-form/1391117#1391117 – Will Jagy Aug 22 '15 at 19:07