Eigenvalues of a random Gaussian matrix
I'm studying with the book 'Numerical Linear Algebra' written by L. N. Trefethen, and I wrote code regarding the text below:
Here is a numerical example. Let A be a 200 x 200 matrix whose entries are independent samples from the real normal distribution of mean 2 and standard deviation 0.5/$\sqrt{200}$. Figure 35.2 shows the eigenvalues of A, a set of points roughly uniformly distributed in the disk of radius 1/2 centered at z=2 in the complex plane.
So I wrote code for generating a random Gaussian matrix A and plotting its eigenvalues in the complex plane:
Above plot is the result of my code.
As you can see, eigenvalues are not uniformly distributed in the disk of radius 1/2 centered in the complex plane.
Instead, there is a eigenvalue whose real part is extremely larger than others.
Is this an expected behavior?
Although I know that this is math stackexchange not stackoverflow, I upload my Python code to make others reproduce my result.
import numpy as np
import matplotlib.pyplot as plt
m = 200
mu = 2
sigma = 0.5 / np.sqrt(m)
A = np.random.normal(mu, sigma, size=(m, m))
eigval = np.linalg.eigvals(A)
eigval_real = eigval.real
eigval_imag = eigval.imag
plt.plot(eigval_real, eigval_imag, 'ro')
plt.xlabel('Real part')
plt.ylabel('Imaginary part')
plt.show()
I think this is expected behavior. This is because of the mean $2$ part. Specifically let $G$ be a gaussian matrix with i.i.d. entries that have mean $\boldsymbol{0}$ and variance $0.5/\sqrt{200}$. Then this matrix will have eigenvalues in the disk (See https://mathoverflow.net/questions/355947/eigenvalues-and-eigenvectors-of-gaussian-random-matrices) for more details.
Note here it is key that the entries have mean $0$.
Now to get the matrix $A$, let $J= 11^T$ be the matrix of all ones. Then $A = G + 2J$. That is, we shifted it, so the entries now have mean $2$. Now we now that $G$ has eigenvalues in the disk. However, $J$ is rank $1$, and its eigenvalue has magnitude $200$. The all $1$s vector is the eigenvector. Thus, the eigenvalue of $2J$ is $400$.
Note that the anomalous point has real part $\sim 400$ and complex part $\sim 0$. Hence majority of the eigenvalues lie in the disk still ($J$ is rank $1$), but that one eigenvalue is large. due to the small variance, we can think of $A$ as being a small perturbation of $2J$.