MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: Eigenvalues of sparse arrays

  • To: mathgroup at
  • Subject: [mg102277] Re: [mg102238] Re: Eigenvalues of sparse arrays
  • From: Mark McClure <mcmcclur at>
  • Date: Mon, 3 Aug 2009 05:49:26 -0400 (EDT)
  • References: <> <h50sjj$6pl$>

On Sun, Aug 2, 2009 at 5:59 AM, gopher <gophergoon at> wrote:

> Thanks for your reply. I read those docs but IMO they are somewhat
> misleading. They state that the Arnoldi method may not converge but
> not that it may converge and still give spurious eigenvalues.

I agree; a warning should be issued.  There are simple tests based on
condition numbers for this sort of thing.

The matrix I was using is here (it is only 156x156):

Arnoldi iteration is a technique to find the *largest* eigenvalue of a
matrix.  We can find other eigenvalues of the matrix A by applying Arnoldi
iteration to the matrix (A-sI)^(-1), where s is a number close to the
eigenvalue we want. This works since s+1/m is an eigenvalue of A close to s,
whenever m is a large eigenvalue of (A-sI)^(-1).  Not surprisingly, there is
a problem if s is too close to an exact eigenvalue, for then A-sI is
singular.  A simple test for this possibility is the condition number of
A-sI, which should not be too large.  In your case, you are looking for
eigenvalues close to zero of a matrix that is singular to start with.  The
condition number of this matrix is huge, since it's singular.

dat = N[Import[
sp = SparseArray[dat];

We can fix the situation by using the Shift sub-option of the Arnoldi
method.  This options specifies the number s and should be set close to
zero, but certainly not equal to zero.  We can do this as follows.

Eigenvalues[sp, 6,
 Method -> {"Arnoldi", "Shift" -> 0.01}]
    {0.382326, -0.382326, 0.350062, -0.350062, 4.74967*10^-15,

Eigenvalues[dat, -6]
    {0.382326, -0.382326, -0.350062, 0.350062, 2.29823*10^-15,

Hope that helps,

  • Prev by Date: Re: error with Sum and Infinity
  • Next by Date: Re: Hacking Wolfram|Alpha
  • Previous by thread: Re: Eigenvalues of sparse arrays
  • Next by thread: Re: Eigenvalues of sparse arrays