Definition

Let BB be a symmetric on a finite-dimensional real . There is a basis in which

B(x,x)=x12xp2+xp+12++xp+q2,B(x,x)=-x_1^2-\cdots-x_p^2+x_{p+1}^2+\cdots+x_{p+q}^2,

with r=dimVpqr=\dim V-p-q additional zero directions. In this collection, the triple (p,q,r)(p,q,r) is the inertia of BB, ordered as the numbers of negative, positive, and zero squares. For a nondegenerate form, r=0r=0, and the pair (p,q)(p,q), again with negative directions first, is its signature.

Convention warning

Many texts instead list positive directions first, and some call the difference between the two counts the signature. A signature convention should therefore be stated explicitly, especially in Lorentzian geometry.

Basis independence

Sylvester's law of inertia says that p,q,rp,q,r do not depend on the diagonalizing basis. Equivalently, they are the numbers of negative, positive, and zero eigenvalues of any representing real symmetric matrix, counted with multiplicity.

Relation to quadratic forms

The associated is q(v)=B(v,v)q(v)=B(v,v). In the convention of this collection, positive-definite forms have signature (0,dimV)(0,\dim V), negative-definite forms have signature (dimV,0)(\dim V,0), and the Lorentzian form diag(1,1,,1)\operatorname{diag}(-1,1,\ldots,1) has signature (1,n1)(1,n-1).

References
  1. Roger A. Horn and Charles R. Johnson, Matrix Analysis, 2nd ed., Cambridge University Press, 2013. DOI record. Relevant: Hermitian and symmetric matrices, congruence, and inertia.