Edit or run this notebook

Notebook 15 – Math 2121, Fall 2021

In this notebook we explore more random matrices and their eigenvalues.

Last time we saw that the eigenvalues of a large orthogonal matrix chosen uniformly at random are, with high probability, evenly spaced complex numbers in the unit circle {zC:|z|=1}.

This means that the process of choosing a random eigenvalue of a very large, uniformly random orthogonal matrix is indistiguishable from choosing an element of {zC:|z|=1} uniformly at random.

Today we will examine a similar phenomenon for random symmetric matrices.

15.3 μs
5.9 ms
4.1 s
721 ms

All matrices today have real entries.

A square matrix S=ST is symmetric if it is equal to its transpose. For example:

12.7 μs
3×3 Matrix{Int64}:
 1  3  5
 3  0  6
 5  6  2
33.8 ms

All eigenvalues of a symmetric matrix are real numbers. For example:

10.0 μs
46.6 ms

Compare with the eigenvalues of a random (non-symmetric) square matrix:

11.0 μs
103 ms

Here is a proof of this fact in general.

Assume S=ST is an n×n symmetric matrix. This means S has all real entries.

Suppose 0vCn is an eigenvector for S with eigenvalue λC, so that

Sv=λvandSv¯=λ¯v¯.

The product

v¯Tv=v2

is a positive real number since v0.

On the other hand we have both

v¯TSv=v¯T(Sv)=v¯T(λv)=λv¯Tv=λv2

and, because S=ST, also

v¯TSv=(STv¯)Tv=(Sv¯)Tv=(λ¯v¯)Tv=λ¯v¯Tv=λ¯v2.

These expressions are equal, but the number v20 is nonzero, so λ=λ¯R.

15.8 μs
115 ns

The set of symmetric n×n matrices has infinite volume, so it does not make sense to talk about a symmetric matrices chosen uniformly at random.

Here is a different way of sampling a random symmetric matrix.

13.2 μs

First, we generate a random matrix with entries from the standard normal distribution.

9.5 μs
418 ms
n
5000
49 ns
364 ms

Now to get a random symmetric matrix, we can just form the sum A+AT.

To make later plots nicer, we also divide by the normalizing constant 8n.

9.4 μs
S
5000×5000 Matrix{Float64}:
 -0.00762735  -0.00839509    0.00283356  …  -0.00623271    0.00374244   -0.00661463
 -0.00839509   0.0102949    -0.00884654     -0.0056233     0.000217301  -0.0096792
  0.00283356  -0.00884654    0.0229113       0.00176405   -0.00233944    0.00427864
  3.95906e-5  -8.645e-5     -0.00112023     -0.00405236    0.00124829   -0.00813669
  0.00241812   0.000690574   0.00379743     -0.00498116    0.00155456    0.00771613
 -0.00506289  -0.00326857   -0.00877366  …   0.0028971    -0.00281076   -0.00480432
 -0.00771719   0.0109026     0.00850002      0.00854183    0.00714828   -0.00378453
  ⋮                                      ⋱                              
  0.00683102  -0.00293006    0.00159171     -0.00428931    0.00441445    0.00174952
  0.00451836   0.00975552   -0.0104133   …   0.00257625   -0.00338708   -0.00745812
 -0.00676979  -0.011701     -0.00597049     -0.0107335     0.00902357   -0.00275118
 -0.00623271  -0.0056233     0.00176405     -0.000608546  -0.00379707    0.00189137
  0.00374244   0.000217301  -0.00233944     -0.00379707    0.00629238    0.00544397
 -0.00661463  -0.0096792     0.00427864      0.00189137    0.00544397    0.00489177
383 ms
true
185 ms

Here are the (real) eigenvalues of this matrix, in sorted order:

6.2 μs
Loading...
ii