# Sylvester’s law of inertia, from the spectral theorem

Here we prove Sylvester’s law of inertia. Let ${A}$ be a real symmetric matrix, and assume the spectral theorem.

Take an arbitrary orthogonal basis with respect to the form ${A(v,w) = X^tAY}$, and scale (and optionally reorder) so that there are ${(n_+,n_-,n_0)}$ entries of ${+1,-1,0}$. (This can also be shown using the spectral theorem, but I think it’s overkill and conceptually messier (we’re “mixing up” linear transformation matrices and bilinear form matrices).)

So first we show ${n_+,n_-,n_0}$ are unique (i.e. invariant under change of basis). This is not too hard, since our basis ${v_1,\ldots,v_n}$ is quite nice. The maximum dimension of a positive-definite set is ${n_+}$, or else we would get a linearly independent set of at least ${(n_+ + 1) + n_-+n_0 = n+1}$ vectors. (More precisely, this would force a nontrivial intersection between a dimension-(${\ge n_+ + 1}$) positive-definite space and a dimension-${(n_-+n_0)}$ negative-semi-definite space, which is clearly absurd.) Similarly, the maximum dimension of a negative-definite set is ${n_-}$.

Now that we have uniqueness, we move on to the eigenvalues and principal minor determinant interpretations. By the spectral theorem (for real symmetric matrices), the fact that symmetric matrices have real eigenvalues, and uniqueness of Sylvester form, ${A}$ has ${n_+}$ positive eigenvalues, ${n_-}$ negative eigenvalues, and ${n_0}$ zero eigenvalues.