Why are random matrix eigenvalues cool? Alan Edelman MIT: Dept of Mathematics, Lab for Computer Science MAA Mathfest 2002 Thursday, August 1 6/21/2004 1 Message Ingredient: Take Any important mathematics Then Randomize! This will have many applications! 6/21/2004 2 Some fun tidbits The circular law The semi-circular law Infinite vs finite How many are real? Stochastic Numerical Algorithms Condition Numbers Small networks Riemann Zeta Function Matrix Jacobians 6/21/2004 3 Girko’s Circular Law, n=2000 Has anyone studied spacings? 6/21/2004 4 The Wigner’s Semi-Circle classical & most famous rand eig theorem Let S = random symmetric Gaussian MATLAB: Normalized Precise A=randn(n); S=(A+A’)/2; eigenvalue histogram is a semi-circle statements require n→∞ etc. 5 Wigner’s Semi-Circle The classical & most famous rand eig theorem Let S = random symmetric Gaussian MATLAB: Normalized Precise A=randn(n); S=(A+A’)/2; eigenvalue histogram is a semi-circle statements require n→∞ etc. n=20; s=30000; d=.05; %matrix size, samples, sample dist e=[]; %gather up eigenvalues im=1; %imaginary(1) or real(0) for i=1:s, a=randn(n)+im*sqrt(-1)*randn(n);a=(a+a')/(2*sqrt(2*n*(im+1))); v=eig(a)'; e=[e v]; end hold off; [m x]=hist(e,-1.5:d:1.5); bar(x,m*pi/(2*d*n*s)); axis('square'); axis([-1.5 1.5 -1 2]); hold on; t=-1:.01:1; plot(t,sqrt(1-t.^2),'r'); 6 Elements of Wigner’s Proof Compute E(A2k)11= mean(λ2k) = (2k)th moment Verify that the semicircle is the only distribution with these moments (A2k)11 = ΣA1xAxy…AwzAz1 “paths” of length 2k Need only count number of special paths of length 2k on k objects (all other terms 0 or negligible!) This is a Catalan Number! 6/21/2004 7 1 ⎛ 2n ⎞ ⎜⎜ ⎟⎟=# Cn = n +1⎝ n ⎠ Catalan Numbers ways to “parenthesize” (n+1) objects Matrix Power Term Graph (1((23)4)) A12A23A32A24A42A21 (((12)3)4) A12A21A13A31A14A41 (1(2(34))) A12A23A34A43A32A21 ((12)(34)) A12A21A13A34A43A31 ((1(23))4) A12A23A32A21A14A41 = number of special paths on n departing from 1 once Pass 1, (load=advance, multiply=retreat), Return to 1 6/21/2004 8 n=2; n=3; Finite Versions n=4; n=5; 9 How many eigenvalues of a random matrix are real? >> e=eig(randn(7)) e= 1.9771 1.3442 0.6316 -1.1664 + 1.3504i -1.1664 - 1.3504i -2.1461 + 0.7288i -2.1461 - 0.7288i 3 real >> e=eig(randn(7)) e= -2.0767 + 1.1992i -2.0767 - 1.1992i 2.9437 0.0234 + 0.4845i 0.0234 - 0.4845i 1.1914 + 0.3629i 1.1914 - 0.3629i 1 real >> e=eig(randn(7)) e= -2.1633 -0.9264 -0. 3283 2.5242 1.6230 + 0.9011i 1.6230 - 0.9011i 0.5467 5 real 7x7 random Gaussian 6/21/2004 10 How many eigenvalues of a random matrix are real? n=7 1 7 reals 2048 355 3 − 5 reals 4096 2048 355 1087 + 3 reals − 2048 2048 4451 1085 − 1 real 4096 2048 6/21/2004 2 0.00069 2 0.08460 2 0.57727 2 0.33744 11 How many eigenvalues of a random matrix are real? n=7 1 2 0.00069 7 reals 2048 355 3 − 2 0.08460 5 reals 4096 2048 355 1087 + 2 0.57727 3 reals − 2048 2048 4451 1085 These are1exact − 2 0.33744 real but hard to compute! 4096 2048 New research suggests a Jack polynomial solution. 6/21/2004 12 How many eigenvalues of a random matrix are real? The Probability that a matrix has all real eigenvalues is exactly -n(n-1)/4 Pn,n=2 Proof based on Schur Form 6/21/2004 13 Gram Schmidt (or QR) Stochastically •Gram Schmidt = Orthogonal Transformations to Upper Triangular Form •A = Q * R (orthog * upper triangular) 6/21/2004 14 Orthogonal Invariance of Gaussians Q*randn(n,1) ≡ randn(n,1) If Q orthogonal 6/21/2004 Q∗ G G G G G G G 15 Orthogonal Invariance Q*randn(n,1) ≡ randn(n,1) If Q orthogonal 6/21/2004 Q∗ G G G G G G G = G G G G G G G 16 Chi Distribution norm(randn(n,1)) ≡ χn 6/21/2004 G G G G G G G = χn 17 Chi Distribution norm(randn(n,1)) ≡ χn 6/21/2004 G G G G G G G = χn 18 Chi Distribution norm(randn(n,1)) ≡ χn n need not be integer 6/21/2004 G G G G G G G = χn 19 6/21/2004 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 20 6/21/2004 G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 21 6/21/2004 χ7 O O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 22 6/21/2004 χ7 O O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 23 6/21/2004 χ7 O O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 24 6/21/2004 χ7 O O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 25 6/21/2004 χ7 O O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 26 6/21/2004 χ7 O O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 27 6/21/2004 χ7 O O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 28 6/21/2004 χ7 O O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 29 6/21/2004 χ7 O O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 30 6/21/2004 χ7 O O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 31 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 32 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 33 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 34 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 35 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 36 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 37 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 38 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 39 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G G 40 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G 41 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G 42 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G 43 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G 44 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G 45 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G 46 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G 47 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G G G G G G G G G G G G G G G G G G G G G G G G G G 48 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G G G G G G G G G G G G G G G G G G 49 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G G G G G G G G G G G G G G G G G G 50 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G G G G G G G G G G G G G G G G G G 51 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G G G G G G G G G G G G G G G G G G 52 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G G G G G G G G G G G G G G G G G G 53 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G G G G G G G G G G G G G G G G G G 54 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G G G G G G G G G G G G G G G G G G 55 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G G G G G G G G G G 56 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G G G G G G G G G G 57 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G G G G G G G G G G 58 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G G G G G G G G G G 59 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G G G G G G G G G G 60 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G G G G G G G G G G 61 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G χ2 O G G G G G G G 62 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G χ2 O G G G G G G G 63 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G χ2 O G G G G G G G 64 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G χ2 O G G G G G G G 65 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G χ2 O G G G G G G G 66 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G χ2 O G G G G G G χ1 67 6/21/2004 χ7 O O O O O O G χ6 O O O O O G G χ5 O O O O G G G χ4 O O O G G G G χ3 O O G G G G G χ2 O G G G G G G χ1 68 Same idea: sym matrix to tridiagonal form G χ6 χ6 G χ5 χ5 G χ4 G χ χ 4 Same eigenvalue distribution3 as GOE: O(n) storage !! χ3 G χ2 O(n) computation (potentially) χ2 G χ1 χ1 G 6/21/2004 69 Same idea: General beta G χ6β beta: 1: reals 2: complexes 4: quaternions χ6β G χ5β χ5β GBidiagonal χ4β Version corresponds matrices of Statistics G χ3β χ4βTo Wishart χ3β G χ2β χ2β G χβ χβ G 6/21/2004 70 κ(A) Numerical Analysis: Condition Numbers = “condition number of A” If A=UΣV’ is the svd, then κ(A) = σmax/σmin . Alternatively, κ(A) = √λ max (A’A)/√λ min (A’A) One number that measures digits lost in finite precision and general matrix “badness” Small=good Large=bad The condition of a random matrix??? 6/21/2004 71 Von Neumann & co. Solve Ax=b via x= (A’A) -1A’ b M ≈A-1 Matrix Residual: ||AM-I||2 ||AM-I||2< 200κ2 n ε ≈ How should we estimate κ? Assume, as a model, that the elements of A are independent standard normals! 6/21/2004 72 Von Neumann & co. estimates (1947-1951) “For a ‘random matrix’ of order n the expectation value has been shown to be about X n” ∞ Goldstine, von Neumann “… we choose two different values of κ, namely n and √10n” P(κ<n) ≈0.02 Bargmann, Montgomery, vN P(κ< √10n)≈0.44 “With a probability ~1 … κ < 10n” P(κ<10n) ≈0.80 6/21/2004 Goldstine, von Neumann 73 Random cond numbers, n→∞ Distribution of κ/n 2 x + 4 −2 / x −2 / x 2 y= e 3 x 6/21/2004 Experiment with n=200 74 Finite n n=10 n=25 n=50 n=100 6/21/2004 75 Small World Networks: & 6 degrees of separation Edelman, Eriksson, Strang Eigenvalues of A=T+PTP’, P=randperm(n) 1⎤ ⎡0 1 Incidence matrix of graph with two ⎥ ⎢1 0 1 ⎥ ⎢ ⎥ ⎢ 1 0 1 ⎥ ⎢ superimposed cycles. 1 0 O ⎥ T=⎢ ⎢ ⎢ ⎢ ⎢ ⎢1 ⎣ O O 1 1 ⎥ 0 1 ⎥ ⎥ 1 0 1⎥ 1 0⎥⎦ 76 Small World Networks: & 6 degrees of separation Edelman, Eriksson, Strang Eigenvalues of A=T+PTP’, P=randperm(n) 1⎤ ⎡0 1 Incidence matrix of graph with two ⎥ ⎢1 0 1 ⎥ ⎢ ⎥ ⎢ 1 0 1 ⎥ ⎢ superimposed cycles. 1 0 O ⎥ T=⎢ ⎢ ⎢ ⎢ ⎢ ⎢1 ⎣ O O 1 1 ⎥ 0 1 ⎥ ⎥ 1 0 1⎥ 1 0⎥⎦ Wigner style derivation counts number of paths on a tree starting and ending at the same point (tree = no accidents!) (McKay) We first discovered the formula using the superseeker 77 Catalan number answer d2n-1-Σ d2j-1(d-1)n-j+1Cn-j The Riemann Zeta Function 1 ζ( s ) = Γ (s) ∞ ∫ 0 s −1 u du = u e −1 ∞ ∑ k =1 1 ks On the real line with x>1, for example 2 1 1 1 π ζ(2) = 1 + 2 + 2 + 2 + K = 2 3 4 6 May be analytically extended to the complex plane, with singularity only at x=1. 6/21/2004 78 The Riemann Hypothesis ∞ x −1 -1 0 ∞ u 1 1 du ζ( x ) = = ∑ u x ∫ Γ( x ) 0 e − 1 k =1 k -3 -2 ½ 1 2 3 All nontrivial roots of ζ(x) satisfy Re(x)=1/2. (Trivial roots at negative even integers.) 6/21/2004 79 =.5+i* |ζ(x)| along Re(x)=1/2 Zeros 14.134725142 21.022039639 The Riemann Hypothesis 25.010857580 ∞ x −1 ∞ 30.424876126 u 1 1 32.935061588 du ζ( x ) = = ∑ u x ∫ 37.586178159 Γ( x ) 0 e − 1 40.918719012 k =1 k -3 -2 -1 0 43.327073281 48.005150881 49.773832478 ½ 152.970321478 2 3 56.446247697 59.347044003 All nontrivial roots of ζ(x) satisfy Re(x)=1/2. (Trivial roots at negative even integers.) 6/21/2004 80 Computation of Zeros Odlyzko’s fantastic computation of 10^k+1 through 10^k+10,000 for k=12,21,22. See http://www.research.att.com/~amo/zeta_tables/ Spacings behave like the eigenvalues of A=randn(n)+i*randn(n); S=(A+A’)/2; 6/21/2004 81 Nearest Neighbor Spacings & Pairwise Correlation Functions 6/21/2004 82 Painlevé Equations 6/21/2004 83 Spacings Take a large collection of consecutive zeros/eigenvalues. Normalize so that average spacing = 1. Spacing Function = Histogram of consecutive differences (the (k+1)st – the kth) Pairwise Correlation Function = Histogram of all possible differences (the kth – the jth) Conjecture: These functions are the same for random matrices and Riemann zeta 6/21/2004 84 Some fun tidbits The circular law The semi-circular law Infinite vs finite How many are real? Stochastic Numerical Algorithms Condition Numbers Small networks Riemann Zeta Function Matrix Jacobians 6/21/2004 85 Matrix Factorization Jacobians General ∏ riim-i ∏ uiin-i A=LU A=QR A=UΣVT ∏ (σi2- σj2) A=QS (polar) ∏ (σi+σj) A=XΛX-1 ∏ (λi-λj)2 Sym S=QΛQT S=LLT S=LDLT Orthogonal ∏ (λi-λj) 2n∏ liin+1-i Q=U C S VT ∏sin(θ + θ )sin (θ - θ ) i j i j S -C ∏ din-i [ ] Tridiagonal T=QΛQT ∏ (ti+1,i)/ ∏qi 6/21/2004 86 Why cool? Why is numerical linear algebra cool? Mixture of theory and applications Touches many topics Easy to jump in to, but can spend a lifetime studying & researching Tons of activity in many areas Mathematics: Combinatorics, Harmonic Analysis, Integral Equations, Probability, Number Theory Applied Math: Chaotic Systems, Statistical Mechanics, Communications Theory, Radar Tracking, Nuclear Physics Applications BIG HUGE SUBJECT!! 6/21/2004 87