A quadratic form on a finite-dimensional real vector space is a function for a symmetric bilinear form . Conversely recovers that bilinear form. Two quadratic forms are congruent if a linear isomorphism satisfies ; in coordinates this is matrix congruence, , with invertible.
Sylvester's law of inertia says that a real quadratic form admits coordinates in which
and the numbers of positive, negative and zero squares, , are independent of the coordinates. Here ; and are the maximal dimensions of subspaces on which the quadratic form is positive definite and negative definite, while is the dimension of its radical of a bilinear form. These numbers are the inertia of a bilinear form. The rank of a quadratic form is , and the signature of a quadratic form, in the signed-difference convention, is .
Completing squares gives
The change of coordinates is invertible, so the inertia is and the signature is . If signature is recorded as an ordered pair instead, that pair is .
Associate to the symmetric bilinear form . If is identically zero, every basis is diagonal. Otherwise choose with . Every has the decomposition
whose second term lies in . Thus , with no cross term in . Induction on dimension gives a diagonal basis. Rescaling its nonzero entries reduces the form to
with additional zero coordinates. Define the rank of a quadratic form and its signature . Rank is intrinsic, since it is the rank of , equivalently . Also is the greatest dimension of a subspace on which the restriction of is a positive-definite quadratic form: any such subspace intersects the negative-plus-zero coordinate space only at zero, so its dimension is at most , while the positive coordinate space attains . The corresponding negative statement identifies . This proves the basis independence of and , the Sylvester's law of inertia conclusion.
For a totally isotropic subspace on which vanishes, polarization identity also makes vanish on . Quotient by the radical of a bilinear form. In the resulting nondegenerate form, projection of an isotropic subspace to either the positive or negative coordinate space is injective, so its dimension is at most . Consequently . The radical of a bilinear form together with the vectors , , attains this bound. The maximum dimension of a totally isotropic subspace is therefore
The criterion for membership in a diagonal basis follows similarly: a nonzero vector can belong to a diagonal basis if it has nonzero quadratic value, by the same orthogonal splitting, or if it lies in the radical of a bilinear form, by choosing a radical basis containing it. An isotropic vector in a diagonal basis must be orthogonal to every basis vector, and hence must lie in that radical. For the specified form, its radical is the -axis, giving exactly
The zero vector never belongs to a basis.
The symmetric matrix of the quadratic form in the standard basis is
because the off-diagonal entries contribute twice to .
Apply Gram-Schmidt orthogonalization for a symmetric bilinear form to
These vectors are pairwise orthogonal for , and
Thus the form is diagonal in the basis , with matrix
It follows that its rank is and its signature is