The signature of a metric tensor (or more generally a nondegenerate symmetric bilinear form, thought of as quadratic form) is the number of positive and negative eigenvalues of the metric. That is, the corresponding real symmetric matrix is diagonalised, and the diagonal entries of each sign counted. If the matrix is n×n, the possible number of positive signs may take any value p from 0 to n. The signature may be denoted either by a pair of integers such as (p, q), or as an explicit list such as (−,+,+,+).
The signature is said to be indefinite if both p and q are non-zero. A Riemannian metric is a metric with a (positive) definite signature. A Lorentzian metric is one with signature (p, 1) (or sometimes (1, q)).
There is also another definition of signature which uses a single number s defined as the codimension of the biggest (positive or negative) definite subspace. Using the nondegenerate metric tensor from above, the signature is simply the minimum of p and q. For example (+,−,−,−) and (−,+,+,+) have both signature s = 1.
See also pseudo-Riemannian manifold.