LAPACK Archives

[Lapack] Possible bug in the computation of complex left eigenvectors

Hi Sergio,

The definition of a left eigenvector v associated with eigenvalue lambda for 
matrix A is
v^H * A = v^H * lambda.
(And v needs to be nonzero.)

So if you take the left eigenvector v and associated eigenvalue lambda
v = [-0.7071 * i; 0.7071]; lambda = i;
for matrix A
A=[[0,1]; [-1,0]]
and you get:
v^H * A = [ -0.7071; 0.7071i ];
v^H * i = [ -0.7071; 0.7071i ];

All good.

Note: From April 2nd 2011 to August 9th 2012 (SVN), so for LAPACK versions 
3.3.1, 3.4.0 and 3.4.1, the comment in the subroutines SGEEV, DGEEV, etc. were 
not correct and had a ^T instead of ^H for the definition left eigenvectors. 
Bug was introduced in 3.3.1 and removed in 3.4.2.


On Jan 5, 2014, at 3:02 AM, Sergio Mover 
<mover@Domain.Removed<mailto:mover@Domain.Removed>> wrote:

Dear lapack team,
I tried to compute the left-eigenvector of the matrix A=[[0,1]; [-1,0]]
using the function zgeev and I got some results that seem wrong.

I get the eigenvalue eig=I and the associated left-eigenvector vect =
[-0.7071 * I, 0.7071].
However, this is not a left eigenvector:
vect * A = [-0.701, -0.701]
eig * vect = [0.701, 0.701*I]

The correct left-eigenvector for I should be [0.701, -0.701*I]

Also the other eigenvalue, eigenvector pair that is returned by zgeev
seems wrong (eig= -I, vect=[0.707*I, 0.707])

I bumped into this problem using the lapacke c interface, but I
reproduced it also with fortran (I used the example code provided online
for zgeev).
I also tried the examples using the svn version of the library, but I
get the same results.
I attach a tar.gz archive with the source code and the test case to
reproduce the issue.

As I am new to lapack I could have missed some details and I could have
misused the library.

Thank you,
Sergio Mover

PS: I also tried to use the forum, but I cannot post the bug report
since the website always mark it as spam.

Lapack mailing list

-------------- next part --------------
An HTML attachment was scrubbed...

<Prev in Thread] Current Thread [Next in Thread>

For additional information you may use the LAPACK/ScaLAPACK Forum.
Or one of the mailing lists, or