MathOverflow is a question and answer site for professional mathematicians. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question
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: – Mark Meckes Feb 6 '11 at 0:47

I suggest you to take a look at the paper "How to Generate Random Matrices from the Classical Compact Groups" by F. Mezzadri, Notices AMS 54 (5), 592-604 (2007). Can be downloaded freely from here:

share|cite|improve this answer
@Andrei: this is a very cool/useful reference, but unfortunately it does not quite answer the question, since my question is equivalent to randomly generating spectra of symmetric or hermitian matrices, so generating random (eg) unitary matrices does not seem to help... – Igor Rivin Feb 5 '11 at 23:52

If 2% accuracy is sufficient, then you can just use Wigner's surmise. It is unlikely you will be able to beat that accuracy by generating random matrices and sampling the eigenvalue spacing. If higher accuracy is needed, you can find the spacing distribution by numerical integration of a Painleve differential equation, see Forrester & Witte arXiv:math-ph/0009023

A tabulated solution is in Haake's book "Quantum Signatures of Chaos", that is probably the easiest way to go.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.