-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eigs finds wrong eigenvectors #2345
Comments
🤔 . Are the vectors always nonsense or just in this specific case? |
I've definitely tested a few matrices after implementing But it is definitely a problem in my code, Arkajit's algorithm for symmetric matrices works OK afaik. |
Maybe there is somewhere a numerical instability causing these issues, I see |
I'm looking into this! I brought this bug to m93a's attention and we suspect it may have something to do with the way the Francis algorithm keeps track of transformations. |
This comment has been minimized.
This comment has been minimized.
@apourzand The behavior you report is correct. The algorithm finds the two eigenvalues, but fails to find eigenvectors – this is fine, as the matrix is a Jordan cell, therefoere not diagonalizable. Sadly, there isn't a way to only run the eigenvalue search without also searching for eigenvectors – for that, see #2180. |
Looks like this was fixed with #2478 ! The library now correctly outputs math.eigs([
[1, 2],
[3, 4]
])
→ {
values: [-0.3723, 5.372],
vectors: [
[0.514, 2.331],
[-0.353, 5.096]
]
} which are scaled vectors of the correct eigenvectors. |
O that is a nice surprise 😄 I just checked and you're right. I'll close this issue. |
Searching for eigenvalues and eigenvectors of the matrix
1, 2; 3, 4
produces:while the eigenvalues are correct, the eigenvectors are nonsense. The correct eigenvectors are:
The text was updated successfully, but these errors were encountered: