I have N eigenvalues in column vector form. Thus there are N eigenvectors corresponding to these eigenvalues, forming an eigenvector matrix.
Now, the problem I am working on requires me to sort the eigenvalues column vector in descending order. How do I sort the eigenvectors matrix in the same order as their eigenvalues in order to preserve correspondence?
Eigensystem
already returns the eigenvalues/vectors sorted in descending order. – StreakyEigenvectors
andEigensystem
return vectors that are linearly independent, not orthogonal. This bit me more than once. But, you can useOrthogonalize
on the degenerate set to give you an orthogonal set. – UnderpayOrthogonolize@Eigenvalues[m]
should do it. At least for as long as it uses Gram-Schmidt. Can someone confirm? – StreakyOrthogonalize
on the whole set directly as it won't affect the orthogonality of the different subspaces. – Underpay