Numerical Methods for Random Matrices MIT 18.95 IAP Lecture Series Per-Olof Persson (persson@mit.edu) January 23, 26 1.9.8.7 Random Matrix Eigenvalue Distribution.7.6.5 β=1 β=2 β=4 Probability.6.5.4.4 f β (s).3.2.3.2.1.1 1 2 3 4 5 6 Normalized Consecutive spacings.1 8 6 4 2 2 4 6 s 1
Topics Histogramming random matrix eigenvalues Tridiagonal model Histogramming with Sturm sequences Largest eigenvalue distributions Simulation and approximations Numerical solution of Painlevé II Distributions for general β Eigenvalue spacing distributions Numerical solution of Painlevé V Eigenvalues of the Prolate matrix Spacing of Riemann Zeta zeros 2
The Gaussian Unitary Ensemble The Gaussian Unitary Ensemble: Set of n n random Hermitian matrices, with independent zero-mean Gaussian elements Diagonal elements x jj, upper triangular elements x jk = u jk + iv jk : Var(x jj ) = 1, 1 j n Var(u jk ) = Var(v jk ) = 1, 1 j < k n 2 In MATLAB: A=randn(n)+i*randn(n); A=(A+A )/2; 3
The Semi Circle Law The probability distribution of the eigenvalues of matrices in the GUE is a semi-circle as n Create histogram for finite n by generating random matrices and solving for all eigenvalues Requires O(n 2 ) memory = n < 1 4 for most computers Requires O(n 3 ) work per sample = Days to get a nice histogram Probability.4.35.3.25.2.15.1.5 1.8.6.4.2.2.4.6.8 1 Eigenvalue x 1 4 4
Faster Method Similar Tridiagonal Matrix Real, symmetric, tridiagonal matrix with same eigenvalues as the GUE for β = 2 [Dumitriu, Edelman]: N(, 2) χ (n 1)β H β 1 χ (n 1)β N(, 2) χ (n 2)β... 2...... χ 2β N(, 2) χ β χ β N(, 2) All eigenvalues in O(n) memory and O(n 2 ) time (e.g. the QR algorithm) Can easily handle n 1 6 on a single computer 5
Method of Bisection The Method of Bisection finds eigenvalues in an interval [λ min,λ max ) by considering roots of p(x) = det(a xi) The # of negative eigenvalues of A = The # of sign changes in the Sturm sequence 1, det(a (1) ), det(a (2) ),..., det(a (n) ) Shift A to get number of eigenvalues in (,λ max ) and twice for [λ min,λ max ) Three-term recurrence for the determinants: det(a (k) ) = a k det(a (k 1) ) b 2 k 1det(A (k 2) ) With shift xi and p (k) (x) = det(a (k) xi): p (k) (x) = (a k x)p (k 1) (x) b 2 k 1p (k 2) (x) 6
Histogramming by Bisection Idea [Edelman]: A histogram contains less information than all eigenvalues Use the method of bisection: Choose m histogram boxes σ i, compute Sturm sequences to count # eigenvalues < σ i Complexity: Work O(mn) instead of O(n 2 ) Memory O(1) instead of O(n) (if matrix generated on-the-fly) Can compute histograms for n 1 11 on a single computer 7
Topics Histogramming random matrix eigenvalues Tridiagonal model Histogramming with Sturm sequences Largest eigenvalue distributions Simulation and approximations Numerical solution of Painlevé II Distributions for general β Eigenvalue spacing distributions Numerical solution of Painlevé V Eigenvalues of the Prolate matrix Spacing of Riemann Zeta zeros 8
Largest Eigenvalue Distributions Consider again the GUE, but the distribution of the largest eigenvalue Rescale around the largest eigenvalue: ( λ max = n 1 6 λmax 2 n ) Use tridiagonal matrix for O(n) storage and O(n) computational work for largest eigenvalue (using Arnoldi iterations or method of bisection) 9
Faster Method Sparse Eigenvector The eigenvector corresponding to the largest eigenvalue is very close to zero in most components Therefore, when computing the largest eigenvalue the matrix is well approximated by the upper-left n cutoff by n cutoff matrix, where n cutoff 1n 1 3 = very large n can be used (> 1 12 ) Also, χ 2 n n + Gaussian for large n 1
Largest Eigenvalue Distributions β=1 β=2 β=4.6.6.6.5.5.5 Probability.4.3 Probability.4.3 Probability.4.3.2.2.2.1.1.1 6 4 2 2 4 Normalized and Scaled Largest Eigenvalue 6 4 2 2 4 Normalized and Scaled Largest Eigenvalue 6 4 2 2 4 Normalized and Scaled Largest Eigenvalue Probability distribution of scaled largest eigenvalue (1 5 repetitions, n = 1 9 ) 11
Differential Equation for Distributions Probability distribution f 2 (s) is given by [Tracy, Widom]: where F 2 (s) = exp f 2 (s) = d ds F 2(s) ( s ) (x s)q(x) 2 dx and q(s) satisfies the Painlevé II differential equation: with the boundary condition q = sq + 2q 3 q(s) Ai(s), as s 12
Distributions for β = 1 and β = 4 The distributions for β = 1 and β = 4 can be computed from F 2 (s) as F 4 ( s 2 2 3 F 1 (s) 2 = F 2 (s)e ) 2 = F 2 (s)( e 1 2 s q(x) dx s q(x) dx + e 1 2 2 s ) 2 q(x) dx 13
Numerical Solution as Initial Value Problem Write as 1 st order system: d ds q = q q sq + 2q 3 Solve as initial-value problem starting at s = s = large positive number Initial values (boundary conditions): Explicit ODE solver (RK4) q(s ) = Ai(s ) q (s ) = Ai (s ) 14
Post-processing to Obtain f β (s) F 2 (s) = exp ( s (x s)q(x)2 dx ) could be computed using high-order quadrature Convenient trick: Set I(s) = (x s s)q(x)2 dx and differentiate: I (s) = s I (s) = q(s) 2 q(x) 2 dx Add these equations and the variables I(s),I (s) to ODE system, and let the solver do the integration Also, add variable J(s) = q(x)dx and equation J (s) = q(s) for s computation of F 1 (s) and F 4 (s) f β (s) = d ds F β(s) using numerical differentiation 15
Tracy-Widom Distributions using Painlevé II.7.6 β=1 β=2 β=4.5.4 f β (s).3.2.1.1 8 6 4 2 2 4 6 s The probability distributions f 1 (s), f 2 (s), and f 4 (s), using Painlevé II 16
Numerical Solution as Boundary Value Problem Initial value problem sensitive to errors in q(s ) and q (s ) More robust and higher accuracy by solving as a BVP Instead of condition on q (s ), use left end asymptotic [Dieng]: ( t q( t/2) 1 1 2 t 73 3 2t 1657 1391227 ) 6 2t 9 8t 12 Discretize Painlevé II q = sq + 2q 3 using centered finite differences Solve discrete system R(Q) = by Newton s method (the Jacobian R/ Q is tridiagonal) Straight line initial guess for Newton iterations gives convergence to full accuracy in < 1 iterations 17
Distributions for general β Open question: Is there a differential equation for any β? Tridiagonal model allows us to experiment numerically: 3 2.5 β=1 2 Probability 1.5 1.5 β=.2 1 8 6 4 2 2 4 6 8 1 Normalized and Scaled Largest Eigenvalue Distributions of scaled largest eigenvalue, β = 1, 1, 4, 2, 1,.2 18
β-dependence of Mean and Variance For large β, mean and variance are close to linear functions of 1/β: 2 1.5 Average and Variance in Largest Eigenvalue Distribution Variance Average 1.5.5 1 1.5 2 2.5.1.2.3.4.5.6.7.8.9 1 1/β Average and variance of probability distribution as a function of 1/β 19
Convection-Diffusion Approximation Average and variance linear in t = 1/β suggest constant-coefficient convection-diffusion approximation: df dt = C 2 d 2 f 2 ds C df 2 1 ds f(,s) = δ(s AiZ 1 ) where C 1,C 2 are the slopes of the average and the variance. Solution: f(t,s) = ( 1 2πC2 t exp (x AiZ ) 1 C 1 t) 2 2C 2 t 2
Convection-Diffusion Approximation β=1 β=2 β=4.6 Exact C D Approximation.6.6.5.5.5.4 f (s) β.4 f (s) β.4 f (s) β.3.3.3.2.2.2.1.1.1 6 4 2 2 4 s 6 4 2 2 4 s 6 4 2 2 4 s Approximate distributions for β = 1, 2, 4 using the convection-diffusion model. 21
Topics Histogramming random matrix eigenvalues Tridiagonal model Histogramming with Sturm sequences Largest eigenvalue distributions Simulation and approximations Numerical solution of Painlevé II Distributions for general β Eigenvalue spacing distributions Numerical solution of Painlevé V Eigenvalues of the Prolate matrix Spacing of Riemann Zeta zeros 22
Eigenvalue Spacing Distribution Consider again the GUE, but the spacing of consecutive eigenvalues Normalized spacing of eigenvalues λ 1 λ 2... λ n : δ k = λ k+1 λ k 8n λ 2 k 4π, k n/2 Need to compute all eigenvalues use tridiagonal model for O(n) storage but O(n 2 ) work 23
Eigenvalue Spacing Distribution 1 Random Matrix Eigenvalue Distribution Probability.9.8.7.6.5.4.3.2.1 1 2 3 4 5 6 Normalized Consecutive spacings Probability distribution of consecutive spacings of random matrix eigenvalues (1 repetitions, n = 1) 24
Differential Equation for Distributions Probability distribution p(s) is given by where p(s) = d2 ds 2E(s) E(s) = exp ( πs ) σ(t) dt t and σ(t) satisfies the Painlevé V differential equation: (tσ ) 2 + 4(tσ σ) ( tσ σ + (σ ) 2) = with the boundary condition σ(t) t π ( t π ) 2, as t + 25
Numerical Solution as Initial Value Problem Write as 1 st order system: d σ σ = dt σ t 2 (σ tσ ) (tσ σ + (σ ) 2 ) Solve as initial-value problem starting at t = t = small positive number Initial values (boundary conditions): Explicit ODE solver (RK4) σ(t ) = t π ( t π ) 2 σ (t ) = 1 π 2t π 26
( πs E(s) = exp quadrature Post-processing to Obtain p(s) ) σ(t) dt t could be computed using high-order Convenient trick: Add variable I(t) and equation d dt I = σ t system, and let the solver do the integration to ODE p(s) = d2 ds 2 E(s) using numerical differentiation 27
Spacing Distributions using Painlevé V 1 σ(t) 1 2 3 4 5 6 E(s), p(s).8.6.4.2 7 5 1 15 2 t 1 2 3 4 5 6 s Painlevé V (left), E(s) and p(s) (right) 28
The Prolate Matrix E(2t) = i (1 λ i) where λ i are eigenvalues of the operator f(y) 1 1 Q(x,y)f(y)dy, Q(x,y) = sin ((x y)πt) (x y)π Infinite symmetric Prolate matrix: A = a a 1... a 1 a.... with a = 2w, a k = (sin 2πwk)/πk for k = 1, 2,..., and < w < 1 2. Set w = t/n. The upper-left n n submatrix A n is then a discretization of Q(x,y)..... 29
Improving Accuracy by Richardson Extrapolation Difference between Prolate solution E(s) and Painlevé V solution E (s): max E(s) E (s) s 5 after, 1, 2, and 3 Richardson extrapolations: N Error Error 1 Error 2 Error 3 2.2244 4.561.771 8.14.483.5486 16.35.32.323 2.2619 1 3 1 7 1 8 1 11 3
Riemann Zeta Zeros Consider the zeros of the Riemann Zeta function along the critical line ζ ( ) 1 2 + iγ n where γ n = n th zero on the line =, < γ 1 < γ 2 <... Numerical values available for γ N+n, N =, 1 6, 1 12, 1 18, n = 1, 2,...,1 5 [Odlyzko] Normalize the zeros: γ n = γ n avg spacing near γ n = γ n [ ] log γn /2π Histogram consecutive spacings γ n+1 γ n and compare with eigenvalue spacing for the GUE 2π 31
Riemann Zeta Zeros and Eigenvalue Spacings 1 Riemann Zeta Zero Distribution Probability.9.8.7.6.5.4.3.2.1 1 2 3 4 5 6 Normalized Consecutive spacings Probability distribution of consecutive spacings of Riemann Zeta zeros (3, zeros, n 1 12, 1 21, 1 22 ) 32