Re: Matrix Diagonalization



In article <8208a$49bb86df$d55d2be5$2068@xxxxxxxxxxxxxx>,
Jan Gerrit Kootstra <jan.gerrit@xxxxxxxxxxxxxxx> wrote:


Also the simple case of all eigenvalues being equal is not at all simple.
Much better to try the case of all eigenvalues having differing values.
Not as not simple as:

( 1 0 )
( 1 1 )

LAPACK and virtually everything else get that one wrong!
Lambda would equal one with multiplicity two. What makes it problematic?

Run it, extracting all eigenvectors, and see :-)

The problem is that it has only one eigenvector. LAPACK will return
all eigenvalues and eigenvectors without comment, but one of the
latter is invalid (i.e. all zeroes). If you aren't expecting that,
your code can go bananas.

The all zeroes is not invalid, it is the 'generilized' eigenvector. So
it is not what one should expect from a classical point of view.
[...]

There is some confusion here. The original post was about finding
the eigenvectors and eigenvalues of a real symmetric matrix using
SUBROUTINE DSYEV in lapack. A real symmetric matrix of dimension N
always has N eigenvalues and N orthogonal eigenvectors, so the above
situations involving "deficient" eigenvectors does not occur.

The confusion, I think, is that the above matrix could be passed to
DSYEV without problem, but what happens depends on the second
positional argument to the subroutine. If that second argument is
UPLO="U", then the routine will ignore the lower triangle of the
input and diagonalize a unit matrix of dimension 2x2. The routine
would return two eigenvalues, both equal to one, and two orthogonal
eigenvectors. If that second argument is UPLO='L', then the routine
will ignore the upper triangle and diagonalize a 2x2 matrix with all
four elements equal to 1. The two eigenvalues will be 1 and 0, and
the two eigenvectors returned will be orthogonal.

So the above sentence, "LAPACK will return all eigenvalues and
eigenvectors without comment, but one of the latter is invalid (i.e.
all zeroes)," is correct when a general matrix diagonalization
routine is used in lapack, but it is not correct when SUBROUTINE
DSYEV is used in lapack. The discussion seemed to switch, without
comment, from symmetric matrices to general matrices, and I'm
certain that this is confusing to the original poster and others who
are interested in the answer to the original question about
incorrect eigenvectors.

$.02 -Ron Shepard
.



Relevant Pages

  • Reported any bugs in C-LAPACK routine DSPEVX?
    ... I'm using C++ in combination with LAPACK++ and C-LAPACK in my ... computed, but the routine returns only 52, error code 0, ... requested for 53 eigenvectors and returned 52. ...
    (sci.math.num-analysis)
  • Re: Matrix Diagonalization
    ... LAPACK and virtually everything else get that one wrong! ... Run it, extracting all eigenvectors, and see :-) ... The all zeroes is not invalid, ... bug in the error detection; if the former, ...
    (comp.lang.fortran)
  • IBM and HP specific : Sign of eigenvector in DSYGV
    ... I am using DSYGV routine from ESSL on IBM SP. ... One of the eigenvectors from the calculation of HP ... if LAPACK and ESSL follow different sign ...
    (comp.unix.aix)
  • IBM and HP specific : Sign of eigenvector in DSYGV
    ... I am using DSYGV routine from ESSL on IBM SP. ... One of the eigenvectors from the calculation of HP ... if LAPACK and ESSL follow different sign ...
    (comp.lang.fortran)
  • Re: using a lapack routine
    ... I prefer to compile LAPACK and create a library. ... module with interfaces to LAPACK subroutines. ... real symmetric matrix. ... eigenvectors of a real matrix A I type v=eigVectors, ...
    (comp.lang.fortran)