# Distribution of eigenvalue spacings

I have been doing some experiments on classes of random matrices, and it seems (visually) that the distribution of eigenvalue spacings is consistent with GOE or GUE or GSE. Unfortunately, to test this, I would like to (a) be able to generate GOE/GUE/GSE spacing variates (I suppose I COULD generate very large Gaussian matrices and compute their eigenvalues, but this seems not very fast...), or even have some formula for the distribution function (there is the Wigner surmise, but it is not quite accurate). There are horrible-looking formulas in Mehta's book, but they don't seem usable, somehow. Algorithms/code must exist somewhere -- any pointers would be appreciated.

-
It is known that the GOE spectral distn is the same as that of a tridiagonal random matrix whose off-diagonal entries are square roots of chi-squared and whose diagonal entries are standard normal - would it be any quicker to sample from these and then use some off-the-peg code to compute the eigenvalues from the tridiagonal form? – Yemon Choi Feb 5 '11 at 23:27
@Yemon that could certainly help a lot, but I wonder what you mean by "the same". That is, it might be that the limiting distributions are the same, but one needs to know some explicit bounds on the speed of convergence to make this computationally useful. Is anything like that known? – Igor Rivin Feb 5 '11 at 23:48
In Yemon's comment, "the same" means literally the same for matrices of any size, not just asymptotically. – Mark Meckes Feb 6 '11 at 0:24
As Mark says (you just tridiagonalize the given symmetric matrix, using e.g. a sequence of Householder reflections). I rediscovered this some years ago, but I think it is in a paper of Trotter from the 1970s, and has probably been independently observed in several places. – Yemon Choi Feb 6 '11 at 0:41
For the details written out, see section 4.5 of this book: math.umn.edu/~zeitouni/technion/cupbook.pdf – Mark Meckes Feb 6 '11 at 0:47