Could anyone recommend a reference to a canonical form for a pair of quadratic forms over R (not necessarily positively definite)? This is probably related to the Weierstrass elementary divisors (but it is not so easy to find information about them on the web). To be more precise, the case when A=diag(1,1,1,1,1) and B is a symmetric 5x5 matrix is of interest.

2$\begingroup$ This question gets asked periodically on MO. The very first time was: mathoverflow.net/questions/1876 and the previous time was the comment by Willie Wong to this question: mathoverflow.net/questions/62244. I refer to answers to those questions for suitable references. $\endgroup$ – José FigueroaO'Farrill Apr 24 '11 at 12:46
In a standard exposition (I.M. Gelfand, Lectures on Linear Algebra, or A. I. Maltsev, Foundations of Linear Algebra) it is required that one of the forms is positive definite, and this cannot be dropped. Some general results in terms of elementary divisors are given in Maltsev's book too. A little Google search gives also a reference to the paper
F. Uhlig. A canonical form for a pair of real symmetric matrices that generate a nonsingular pencil. Linear Algebra Appl. 14, 189209 (1976),
which may contain some generalizations.

1$\begingroup$ The positivedefinite condition can be dropped and does get dropped, say, when looking at possible types of Ricci tensors in lorentzian spacetimes. See my answer to this question: mathoverflow.net/questions/1876/… for a recent reference which does this. $\endgroup$ – José FigueroaO'Farrill Apr 24 '11 at 12:48

$\begingroup$ I meant the condition cannot in general be dropped (Gelfand in his book gives a counterexample). $\endgroup$ – Anatoly Kochubei Apr 24 '11 at 15:05
Hi, I just read your question. I hope it's not too late to answer, but I think the following paper contains exactly what you are looking for:
R. C. Thompson: Pencils of complex and real symmetric and skew matrices, Linear Algebra and its Applications, Volume 147, March 1991, 323371.
The author classifies  up to congruence  any pairs of real symmetric matrices, which amounts to give the classification for any pair of real quadratic forms.
You'll probably find of some interest also this paper of mine: http://arxiv.org/abs/1106.4678