2
$\begingroup$

I have tried to compute the eigenvalues of random matrices of the GOE ensemble, using MATLAB.

Such matrices of size $n * n $ can be obtained easily, symmetrizing matrices whose elements follow the standard normal distribution: $H = (M + M^T )/ 2 $.

In MATLAB code for instance:

H = randn(n); 
M = (H+H')/2;
eigenvalues = eig(M);

This naive approach is the one I found in most documents. However, it looks like a more efficient method was developed some years ago by A. Edelman and others, which makes use of a matrix factorization (Householder factorization) to obtain a tridiagonal matrix whose eigenvalues are following the same distribution than the GOE. A description of this technique can be found here: http://www-math.mit.edu/~edelman/publications/random_matrix.pdf

The form of this tridiagonal matrix is the next one:

\begin{bmatrix} G_n & \chi_{n-1} & & & & \\ \chi_{n-1} & G_{n-1} & \chi_{n-2} & & & & \\ & \chi_{n-2} & G_{n-2} & & & \\ & & & \ddots & \ddots & \chi_{1} \\ & & & & \chi_{1} & G_1 \\ \end{bmatrix}

where G follow a normal distribution and $\chi_i$ follow chi square distributions. Such a matrix in MATLAB can be obtained with the next lines:

a = sqrt(chi2rnd([n:-1:1]))'; 
H = spdiags(a, 1, n, n) + spdiags(randn(n,1)/sqrt(2), 0, n, n);
M = (H+H')/sqrt(2);
eigenvalues = eig(M);

Eigenvalues from such a matrix should be easier to get than the ones of the initial problem (the author comes up with $O(n^2)$ time vs. $O(n^3)$ time). When I plot some histograms of the eigenvalues obtained with the two methods, I get results in good agreement.

Shall this method be considered the current best practice to compute the eigenvalues of matrices from the GOE ? What do people do in practice ?

$\endgroup$
3
  • 3
    $\begingroup$ Small historical note: the idea of tridiagonalizing the GOE cropped up much earlier than the Edelman et al paper, e.g. in a 1984 paper of Trotter ams.org/mathscinet-getitem?mr=0761763 (and has no doubt been independently rediscovered by many authors, see one rookie's efforts in 2000 maths.lancs.ac.uk/~choiy1/pubmath/YCexpo.html ) $\endgroup$
    – Yemon Choi
    Commented Dec 18, 2019 at 3:58
  • $\begingroup$ crossposted at math.stackexchange.com/q/3330972/87355 $\endgroup$ Commented Dec 18, 2019 at 8:43
  • $\begingroup$ Thanks for the historical background, I wasn't aware of that, and I'll check the papers ! I'm gonna delete the stackmath exchange post, as mathoverflow seems the right place for this question. $\endgroup$
    – Clej
    Commented Dec 18, 2019 at 14:15

2 Answers 2

2
$\begingroup$

Q: What do people do in practice ?

The "practice" will be field specific, but in most of the physics applications I am aware of one needs not only the eigenvalues but also the eigenvectors. For example, the GOE may be used to model the Hamiltonian of a small metal grain or a semiconductor quantum dot, and one wants to calculate transport properties such as the conductance of that object. The eigenvalues of the Hamiltonian do not give sufficient information.

So at least in that context one will want to generate the full matrix ensemble, not only the eigenvalue distribution.

$\endgroup$
3
  • $\begingroup$ Indeed, I am trying to model a hamiltonian for physics applications. From this point of view, that's sounds reasonable to obtain both directly. Actually, I am currently sampling successive spacings between eigenvalues using the Wigner surmise (instead of using real NxN GOE eigenvalues). Then, I sample eigenvectors-related values using Porter-Thomas distribution. I wanted to improve my eigenvalues sampling (to take into account correlations, left behind by the Wigner surmise), but I guess I shall consider both the eigenvalues and eigenvectors to have a clean model of the hamiltonian.. $\endgroup$
    – Clej
    Commented Dec 18, 2019 at 14:31
  • $\begingroup$ Hi, sorry to reply to an old post, but would you have any reference in which the full matrix ensemble (eigenvlaues and eigenvectors) is used in applications ? I have difficulties figuring out the use of the eigenvectors... $\endgroup$
    – Clej
    Commented Jun 7, 2020 at 17:10
  • $\begingroup$ see, for example, page 28 of arxiv.org/abs/cond-mat/9612179 $\endgroup$ Commented Jun 7, 2020 at 19:13
1
$\begingroup$

Best practice for what please?: speed, accuracy, numerical stability, memory load, scaling on hardware parallel architectures...? Do you need all eigenvalues or only some of them? Do you need their multiplicities? Do you also need the eigenvectors as point out by Carlo?

I could not find a single eigenvalue/eigenvector algorithm tailored to Gaussian matrices. It seems the Gaussian structure is quite useless from the numerical algebra point of view.

So, we are left with the standard eigenproblems for symmetric matrices for the GOE. Reduction to tridiagonal form is common practice for such problems, this is probably what Matlab is doing (and no doubt Matlab is the best software for numerical linear algebra).

But 1) there are many different methods to reduce to the tridiagonal form (e.g. we can use Lanczos instead of Householder) 2) then there are many differents methods to get the eigenvalues (e.g. in $O(n\log(n)$) instead of $O(n^2)$ by divide-and-conquer methods) 3) reduction to tridiagonal form is only one approach among many others (e.g. reduction to Hessenberg form then QR, Jacobi........).

Numerical linear algebra is a jungle.

$\endgroup$
12
  • 1
    $\begingroup$ "Reduction to tridiagonal form is common practice for such problems, this is probably what MATLAB is doing" - MATLAB uses LAPACK under the hood, so this is most assuredly being done that way (*SYTRD + *STEQR if the eigenvectors are wanted, for instance). If eigs() was used instead of eig() in the OP's MATLAB snippet, ARPACK would have been used instead. $\endgroup$ Commented Dec 18, 2019 at 12:31
  • $\begingroup$ @J.M.isnotamathematician Yes, if Matlab calls LAPACK and ARPACK, it actually does much more than that thanks to Cleve Moller. 10 years ago, I spent weeks trying to reproduce some Matlab eigenproblem results by calling LAPACK via INTEL MKL. But no way, only Matlab was able to properly diagonalize my nasty matrices. Finally, I had to modify my matrices! That's why I use Matlab since 1993 $\endgroup$ Commented Dec 18, 2019 at 13:16
  • $\begingroup$ @J.M.isnotamathematician Oops, Cleve Moler. $\endgroup$ Commented Dec 18, 2019 at 13:30
  • 1
    $\begingroup$ @Clej If speed matters, then see e.g. A fast divide-and-conquer algorithm for computing the spectra of real symmetric tridiagonal matrices for a $O(nlog(n))$ algo for the eigenvalues of tridiagonal matrices. Hope it helps. $\endgroup$ Commented Dec 18, 2019 at 14:42
  • 1
    $\begingroup$ @Clej Random matrix theory is not my field. What about the method on page 6 here: Sampling eigenvalue PDFs for matrix ensembles? $\endgroup$ Commented Dec 18, 2019 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .