0

I have two matrices R and F

R = array([[ 0.89148867,  4.58007519, 15.70287019],
   [ 5.1065172 , 14.26381865, 34.50113854],
   [18.51056089, 36.78238723, 72.21058193]])
F = array([[ 4.9348022, 12.3370055, 24.674011 ],
   [12.3370055, 19.7392088, 32.0762143],
   [24.674011 , 32.0762143, 44.4132198]])

If I try to solve the generalized eigenvalue problem I get

#[R]{c}=e[F]{c}
eigvals,eigvecs = scipy.linalg.eig(R,b=F)
eigvals = 
array([[inf+0.j],
   [1.0583253e+14+0.j],
   [          inf+0.j]])

But if I first turn it into a standard eigenvalue problem I get

#inv([F])[R]{c}=e[I]{c}
mat = scipy.linalg.inv(F) @ R
eigvals,eigvecs = scipy.linalg.eig(mat)
eigvals = 
array([[-5.06390561e+07+0.j],
   [ 5.06390548e+07+0.j],
   [ 2.91609260e-01+0.j]])

Why is that happening? Should they not give the same solutions?

  • You didn't think anything was strange when you got infinity as your eigenvalue? Your `F` matrix is singular. – Silver Nov 29 '18 at 14:26
  • Yes, but shouldn't both of them return inf then? – Tristan Greenwood Nov 29 '18 at 14:54
  • No, because if `F` is (near) singular, then the errors in the numerical computation of `inv(F)` are so large that the result is useless and the numerically computed eigenvalues of `inv(F) @ R` are meaningless. – Warren Weckesser Nov 29 '18 at 18:22

0 Answers0