Re: Eigenvalues of sparse arrays

*To*: mathgroup at smc.vnet.net*Subject*: [mg102268] Re: Eigenvalues of sparse arrays*From*: Roman <rschmied at gmail.com>*Date*: Mon, 3 Aug 2009 05:47:42 -0400 (EDT)*References*: <200907310952.FAA19221@smc.vnet.net> <h50sjj$6pl$1@smc.vnet.net>

Abhishkek, the Arnoldi method is best suited to calculate the *largest* eigenvalues, not the *smallest* as you desire. But there is an easy solution. First, here are the options for using the Arnoldi method with sparse matrices in Mathematica: http://groups.google.com/group/comp.soft-sys.math.mathematica/browse_thread/thread/2a41064c0dbe5d54/26f379d722f6e1c8?hl=en#26f379d722f6e1c8 In particular the "Shift and Invert Spectral Transformation Mode" is interesting here. When you want to calculate the *smallest* eigenvalues by magnitude, Mathematica uses the Arnoldi method to calculate the *largest* eigenvalues of the *inverse* of your matrix. But since your matrix has two zero eigenvalues, it is not invertible, and something seems to break in this method. The remedy is to *shift* the matrix by a small amount before inverting, something like Eigenvalues[SparseArray[s] // N, 6, Method -> {Arnoldi, MaxIterations - > 10^5, Criteria -> Magnitude, Shift -> 0.01}] // Sort What this does is to calculate the largest 6 eigenvalues of Inverse[s +0.01], then back-transform the results to give you the corresponding 6 smallest eigenvalues of s. The error Mathematica makes in your original calculation seems to be that it takes a default value of zero for the shift: in fact, Eigenvalues[SparseArray[s] // N, 6, Method -> {Arnoldi, MaxIterations - > 10^5, Criteria -> Magnitude, Shift -> 0}] // Sort again gives the wrong answer. Here's the documentation on Arnoldi stuff as used in Mathematica: http://www.caam.rice.edu/software/ARPACK/ Hope this works out! Roman.