Eigen systems

Open discussion regarding features, bugs, issues, vendors, etc.

Eigen systems

Postby mmgk » Thu Jul 21, 2005 1:12 pm

Hi all,

I am completely new to LAPACK. I am trying to find eigen values and eigen vectors for a 4x4 real, non-symmetric matrix. Can some one please answer the following questions?

(1) What is the difference between different drivers: simple vs. expert vs. divide-and-conquer vs. RRR driver? Do the drivers differ in terms of accuracy or they differ in terms of the performance time?

(2) When I input the matrix to the subroutine DGEEV or DGEEVX, it is returning me the left eigen vectors into right and vice versa, similarly rows into columns. I am using CLAPACK Version 3 with Microsoft Visual C++ 6 on Pentium 4 laptop. Can some one help me to resolve this?

Thanks,

mmgk
mmgk
 
Posts: 6
Joined: Thu Jul 21, 2005 12:42 pm

Followup

Postby mmgk » Thu Jul 21, 2005 1:30 pm

Hi,

This is to follow up on the second question in my earlier post.

This is the input matrix for DGEEV or DGEEVX:

0.069280 -0.101700 0.000000 0.000000
-0.069280 0.211050 -0.013460 0.000000
0.000000 -0.084650 0.013460 0.000000
0.000000 -0.024700 0.000000 0.000000

Eigen values:
0.253943 +i 0.000000
0.037424 +i 0.000000
0.002424 +i 0.000000

0.000000 +i 0.000000


vl matrix output:
-0.459476 0.834298 -0.293673 -0.081149
-0.650229 -0.203677 0.719477 0.134429
0.118064 0.077614 0.595304 -0.790981
0.000000 0.000000 0.000000 1.000000


vr matrix output:
-0.350782 0.934994 -0.052332 0.000000
-0.884526 -0.406724 0.228451 0.000000
0.549115 0.529906 0.646276 0.000000
0.500000 0.500000 0.500000 0.500000


Eigen values are correct. But eigen vectors got interchanged between vl and vr. vr columns should be the right eigen vectors, instead vl rows are the correct right eigen vectors (checked with Mathematica). Vice versa for the left eigen vectors.

mmgk
mmgk
 
Posts: 6
Joined: Thu Jul 21, 2005 12:42 pm

Answer

Postby mmgk » Thu Jul 21, 2005 3:15 pm

I think I got the answer. The confusion is because Fortran stores an array in column-major format whereas C stores in row-major format. Is this the answer? I need some one to verify.

Thanks,

mmgk
mmgk
 
Posts: 6
Joined: Thu Jul 21, 2005 12:42 pm

Re: Eigen systems

Postby sven » Fri Jul 22, 2005 2:30 am

You are correct about column order. clapack also expects matrices to be supplied in column order. There was some discussion about this in an earlier post with topic "dgetrf from C".

If you want to supply the matrix in row order and require the right eigenvectors, you can of course request the left eigenvectors.

Best wishes,

Sven Hammarling.
sven
 
Posts: 144
Joined: Wed Dec 22, 2004 4:28 am

Postby mmgk » Fri Jul 22, 2005 9:19 am

Thanks Sven for the answer.

mmgk
mmgk
 
Posts: 6
Joined: Thu Jul 21, 2005 12:42 pm

Postby Julien Langou » Fri Jul 22, 2005 3:56 pm

Code: Select all
(1) What is the difference between different drivers: simple vs. expert vs. divide-and-conquer vs. RRR driver? Do the drivers differ in terms of accuracy or they differ in terms of the performance time?


Hello,

your matrix is nonsymmetric. In this respect, if you want to compute eigenvalues and/or eigenvectors with LAPACK3.0, you need to use:
dgeev or dgeevx
Both routines use the same algorithm: first Hessenberg reduction then QR iteration to get Schur form and finally returns the eigenvector if needed.
The expert driver dgeevx have more features for a slightly more complex interface. In particular it computes error bounds too. (See the header of the routine for more information.)

For the symmetric eigenvalue problem, there is more solvers. Your solver of choice will depend mainly of your problem. Available in LAPACK3.0, you have:
  • dsyev: QR iteration
  • dsyevd: divide and conquer
  • dsyevr: MRRR
  • dsyevx: bisection+ inverse iteration

All drivers first reduces the (symmetric) matrix to tridiagonal form and then apply a different tridiagonal eigensolver to find the eigenvalues. As a matter of fact, these algorithm will vary in term of accuracy and speed.

You can find more explanations at http://www.netlib.org/lapack/lug/ .

Julien
Julien Langou
 
Posts: 735
Joined: Thu Dec 09, 2004 12:32 pm
Location: Denver, CO, USA


Return to User Discussion

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 2 guests