Theorem (inertia of a matrix)
Let $V$ be a finite-dimensional vector space over $\R$ and $\phi: V\times V\to \R$ be a symmetric bilinear form.
If $B$ is a basis for $V$ such that $[\phi]_B$ $= \pmat{I_p \\ & -I_q \\ && 0}$, then
-
$p$ is the largest dimension of a subspace $U\leq V$ such that $\phi|_U$ is positive definite; and
-
$q$ is the largest dimension of a subspace $U\leq V$ such that $\phi|_U$ is negative definite.
This also holds for $V$ a finite-dimensional vector space over $\C$ and $\phi: V\times V\to \C$ a Hermitian sesquilinear form.
-
The fact that $p$ and $q$ are invariant under different bases is known as Sylvester's law of inertia.
-
$\sigma(\phi) \equiv p-q$ is called the signature of $\phi$.