posted Thu 2 Aug 2018 by Michael Galloy under

IDL,

Math
Circular law states the eigenvalues of a matrix with random entries of mean 0 and variance 1/n are approximately uniformly distributed in the unit disk of the complex plane. To see this, create a random matrix:

```
n = 1000
x = randomu(seed, n, n) - 0.5
x *= sqrt(12.0 / n)
```

Find the eigenvalues:

```
eigenvalues = la_eigenproblem(x, eigenvectors=eigenvectors)
```

Plot them:

```
plot, real_part(eigenvalues), imaginary(eigenvalues), $
psym=3, $
xstyle=1, xrange=[-1.5, 1.5], $
ystyle=1, yrange=[-1.5, 1.5]
```

This gives a plot like below:

Via the excellent John D. Cook blog. I recommend reading his site if you are interested in a combination of mathematics and Python.