I am solving a standard eigenvalue problem Ax =lambda x, where A is a real symmetric matrix. A is perfectly symmetric and can be decomposed into LL.T using cholesky decompositon, suggesting A is positive definite as well. I have tried solving it using numpy.linalg.eig which gives complex eigenvalues. Since eigenvalues of a symmetric matrix should not be complex, I tried solving it using numpy.linalg.eigh, but this time some of the eigenvalues are negative, suggesting that the matrix A is not positive definite. From physical context, the matrix A should be real and symmetric, with positive and real eigenvalues. What is it that I am doing wrong, and what should I do?
Pukhraj Sahu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.