A hole in the distribution of eigenvalues - is this real?

Solution 1:

As far as I can tell, the problem is in how you're aggregating the eigenvalues into X and Y. j is incrementing by $4$ when it ought to be incrementing by $n = 10$, which has the effect of wiping out the smallest $6$ eigenvalues of almost every matrix, hence the hole. There's an easier way to do the aggregating that doesn't involve a j at all:

N = 10^4;
n = 10;
X = [];
Y = [];

for i = 1:N
    A = randn(n);
    E = eig(A);
    X = [X; real(E)];
    Y = [Y; imag(E)];
end

scatter(X, Y);

Solution 2:

Your plots instantly reminded me of something I'd seen before (click for a hi-res version):

Turns out that if your matrices have integer entries of bounded height, you do get holes, with the details depending on the distribution. What's more, there are all sorts of interesting and, to my knowledge, unsolved questions about this! More details here.

Given that real matrices can be approximated by rational ones, and bounded-height rationals can be multiplied by a sufficiently-large factor to give bounded-height integers, I wouldn't be surprised if there was some connection with the pattern you saw, even if it was only visible due to a bug.