TITLE: Signature of a quadratic form
QUESTION [13 upvotes]: This may be a really dumb question, but here goes: is there any algorithm to compute the signature of a quadratic form (or a symmetric matrix, if you prefer)  more efficient (asymptotically or otherwise)  than actually computing the eigenvalues?

REPLY [10 votes]: Gauss reduction gives you the answer. It writes, quite fast, the quadratic form $q$ as a sum
$$\sum_ja_j\ell_j(x)^2$$
where the $\ell_j$'s are independent linear forms. The number of squares gives you the rank of $q$. The signs of the coefficients $a_j$ gives you the signature. I teach that in my undergraduate course in Algebra.
Remark that you cannot calculate the eigenvalues, at least in close form, because this is computing the roots of quite a general polynomial, and this is impossible in dimension $\ge5$.