Sylvester's Law of Inertia

Theorem
Let $\struct {V, q}$ be the scalar product space.

Let $V^*$ be the vector space dual to $V$.

Suppose there exists a basis $\tuple {\beta^i}$ for $V^*$ such that $q$ is expressible as:


 * $q = \paren {\beta^1}^2 + \ldots + \paren {\beta^r}^2 - \paren {\beta^{r + 1}}^2 - \ldots - \paren {\beta^{r + s}}^2$

where:


 * $r, s \in \N : r + s = n$.

Then $r$ is the maximum dimension among all subspaces on which the restriction of $q$ is positive definite.

Furthermore, $r$ and $s$ are independent of the choice of basis.