## How to compute eigenvalues of large sparse matrices.
using Plots
A = sprand(10^4,10^4, 5/10^4)
A = A + A' # make it symmetric to make it easy
Plots.spy(A, colorbar = false)
gui()
##
using Arpack
lams,Vs = eigs(A)
## This gives us 6 eigenvalues and vectors "where 6" is by convention.
# For sparse matries, we only get a subset of the eigenvalues and vectors.
@show lams
##
lams,Vs = eigs(A; nev=20) # get 20!
@show lams
##
norm(A*Vs[:,2] - lams[2]*Vs[:,2])
## How does this work?? See the notes :)