[SciPy-user] ?ggev linalg.eig
Pearu Peterson
pearu at cens.ioc.ee
Wed Sep 18 07:50:05 EDT 2002
On Wed, 18 Sep 2002, Nils Wagner wrote:
> Hi,
>
> I have used linalg.eig to compute the eigenvalues and left/right
> eigenvectors
> of a matrix pencil, that is
>
> A x = lambda B x
>
> A, B are real and nonsymmetric
>
> w, vl, vr = linalg.eig(A,B,left=1,right=1)
>
> However, I am puzzled by building the Rayleigh quotient R
>
> z = dot(vl[:,i],dot(A,vr[:,i]))
> n = dot(vl[:,i],dot(B,vr[:,i]))
> R = z/n
>
> Again, this should yield the eigenvalues but it doesn't.
> Any idea ?
Why do you use in the definition of R both vl and vr?
AFAIK, R is defined through
z = dot(v[:,i],dot(A,v[:,i]))
n = dot(v[:,i],dot(B,v[:,i]))
R = z/n
where v is either vl or vr.
Pearu
More information about the SciPy-User
mailing list