TITLE: Computing signature
QUESTION [16 upvotes]: I have a feeling that this might have already been asked, but can't find the question. Anyway, the question is: given a symmetric $n\times n$ matrix, is there a faster way to compute its signature than computing the full eigen-decomposition? (the gt tag is because my application is in computing signatures of four-manifolds, and some others might want to do the same computation...)

REPLY [2 votes]: May I attract your attention on the following formula,
where $B$ is a $n\times n$ non-singular symmetric real-valued matrix
$$
\int_{\mathbb R^n}e^{-2i\pi x\cdot \xi}
e^{i\pi Bx\cdot x}dx=e^{\frac{i\pi}{4}\text{signature } B}\vert\det B\vert^{-1/2}e^{-i\pi B^{-1}\xi\cdot \xi},
$$
so that
$
e^{\frac{i\pi}{4}\text{signature } B}=\vert\det B\vert^{1/2}
\int_{\mathbb R^n}
e^{i\pi Bx\cdot x}dx.
$
Of course the Fresnel-type integral on the rhs of last formula is not absolutely converging but, as an oscillatory integral, will become so after integration by parts.