[SciPy-user] det(A-\lambda B) is identically zero

Nils Wagner nwagner at mecha.uni-stuttgart.de
Fri Feb 13 13:30:36 CST 2004

Hi all,

Please find attached a small example for a singular pencil
A-\lambda B. det(A-\lambda B) is identically zero.
However linalg.eig(A,B) computes certain eigenvalues.
although \lambda can be chosen arbitrarely.

There should be at leat a warning in such a case.

Any comment or suggestion ?


from scipy import *
A = array((
B = array((
print 'A'
print A
print 'B'
print B
# Eigenvalue problem
w,vr = linalg.eig(A,B)
for i in w:
 print i
# det(A-\lambda B) is identically zero
for l in arange(0,10.,0.1):
  d = linalg.det(A-l*B)
  print l,d

More information about the SciPy-user mailing list