Skip to content
AT Ali Taqi
Random Matrices

Live code · WebR

Watch the semicircle emerge — in real R.

This isn't a recording. The code below runs entirely in your browser through WebR — the actual R interpreter compiled to WebAssembly. Edit it, press Run, and the eigenvalues of a fresh random matrix are computed on your machine. Bump N and watch the histogram lock onto the semicircle.

random-matrix.R

Press Run to start R. The first run downloads the R runtime (a few seconds); after that it's instant.

Runs on base R only (no package downloads), so it starts in seconds. The same simulation, taken to many matrix sizes, is the animation on the project page.