Re: Eigenvalues of sparse arrays
- To: mathgroup at smc.vnet.net
- Subject: [mg102302] Re: Eigenvalues of sparse arrays
- From: "Kevin J. McCann" <kjm at KevinMcCann.com>
- Date: Tue, 4 Aug 2009 04:30:44 -0400 (EDT)
- References: <h4uetk$iof$1@smc.vnet.net>
You might also try Singular Value Decomposition (SVD): SingularValueList[dat] This is a list of the non-zero eigenvalues. As you will see there are 154 of these for your matrix, which indicates that two of the eigenvalues are zero to machine accuracy. Kevin gopher wrote: > I am computing the eigenvalues of a matrix 's'. > ---------------------------------------------------------------------- > In[164]:= SparseArray[s] == s > > Out[164]= True > > In[165]:= Eigenvalues[s, -6] // Chop > > Out[165]= {0.382326, -0.382326, 0.350062, -0.350062, 0, 0} > > In[166]:= Eigenvalues[SparseArray[s], -6] // Chop > > Out[166]= {0.38245, -0.352447, 0.351011, 1.26736*10^-7, 0, 0} > ---------------------------------------------------------------------- > > Why are the two results different? Is there an issue with precision > when computing eigenvalues of sparse arrays? The matrix is such that > the eigenvalues are symmetric about 0 so I'm pretty sure that the > first result is correct. >