Unitary matrix with non-orthogonal eigenvectors?
古いコメントを表示
I have the following issue: A matrix I have come across (attached) is pretty clearly unitary (as tested below) but its eigenvectors as calculated by eig() are not orthonormal (as seen by the matrix of eigenvectors not being unitary). Unless I am missing something mathematically, that shouldn't happen. So what went wrong here?
Here is some minimal code to calculate the eigenvectors/values and check for unitarity:
[M,ei] = eig(full(W));
norm(full(W*W')-eye(size(W))) %spits out 5.8622e-16 - pretty unitary.
norm(full(M*M')-eye(size(M))) %spits out 6.2597 - clearly not unitary.
A quick
plot(abs(diag(ei)),'o')
confirms that at least the eigenvalues of this matrix are behaving as expected - their abs() is 1.
Any ideas?
採用された回答
その他の回答 (1 件)
David Goodmanson
2022 年 4 月 2 日
編集済み: David Goodmanson
2022 年 4 月 4 日
Hi Joshua,
I believe this happens because W has at least one set of degenerate eigenvalues, and does not happen if all the eigenvalues are distinct.
mindiff = min(abs(diff(sort(eig(full(W)))))) % differences between sorted eigenvalues
mindiff = 2.8189e-18 % numerically consistent with zero.
and W appears to have some degenerate eigenvalues. Although It might not be all that easy to do, the nonumitarity of M appears to be fixable. To take the simplest possible case, suppose
W = [1 0;
0 1] % the identity
[M lam] = eig(W,'vec')
M =
1 0
0 1
lam =
1 % degenerate eigenvalues
1
Obviously W is unitary, and so is M. But the solution M for the eigenvalue problem is not the only one, Another is, e.g.
M1 = [1 .8;
0 .6]
which has two normalized column vectors that span the same space as M. This solution theoretically could have been chosen by eig. However, M1 is not even close to being unitary.
Any two linearly independent vectors that span the same space as M or M1 are also a good solution, so a fix is
M2 = orth(M1)
M2 = 0.9487 -0.3162
0.3162 0.9487
which is unitary. So a way out would be to find all sets of degenerate eigenvalues (remembering that eig does not sort eigenvalues) within some appropriate tolerance, and then use orth on whatever set of eigenvectors correspond to each set.
カテゴリ
ヘルプ センター および File Exchange で Linear Algebra についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!