I have a Hermitian matrix, and I would like to get a list of orthogonal eigenvectors and corresponding eigenvalues. But when there are degenerate eigenvalues, sometimes Eigensystem/Eigenvectors returns eigenvectors that are not orthogonal.
Now I could fix this by hunting down every eigenspace, and getting an orthogonal basis for it, but I feel like there must be a more efficient and less messy way.
Example:
eVectors = Eigenvectors[{{1,-2,0,-2,0,0},{-2,1,0,-2,0,0},{0,0,1,0,-2,-2},
{-2,-2,0,1,0,0},{0,0,-2,0,1,-2},{0,0,-2,0,-2,1}}];
Now to find out whether they are orthogonal:
eVectors.ConjugateTranspose[eVectors]
which returns some nonzero off-diagonal elements.
Eigenvectors
, "For approximate numerical matrices m, the eigenvectors are normalized." and "For exact or symbolic matrices m, the eigenvectors are not normalized.". Thus to fix this, applyN
to your matrix, and the result will be orthonormal, as you desired. $\endgroup$