Does the eig() function return normalize eigen vector (unit length)?

조회 수: 73 (최근 30일)
The function eig:
[V, D]=eig(A);
The V is normalized(unit length) or not?

채택된 답변

John D'Errico
John D'Errico 2023년 3월 14일
편집: John D'Errico 2023년 3월 14일
Yes. V is normalized to have unit 2-norm, at least in common cases. Surely you could have checked that?
A = magic(5);
[V,D] = eig(A);
norm(V(:,1),2)
ans = 1
Here is the doc page for eig: eig
In there we can find the exceptions:
The form and normalization of V depends on the combination of input arguments:
  • [V,D] = eig(A) returns matrix V, whose columns are the right eigenvectors of A such that A*V = V*D. The eigenvectors in V are normalized so that the 2-norm of each is 1.If A is real symmetric, Hermitian, or skew-Hermitian, then the right eigenvectors V are orthonormal.
  • [V,D] = eig(A,'nobalance') also returns matrix V. However, the 2-norm of each eigenvector is not necessarily 1.
  • [V,D] = eig(A,B) and [V,D] = eig(A,B,algorithm) return V as a matrix whose columns are the generalized right eigenvectors that satisfy A*V = B*V*D. The 2-norm of each eigenvector is not necessarily 1. In this case, D contains the generalized eigenvalues of the pair, (A,B), along the main diagonal.When eig uses the 'chol' algorithm with symmetric (Hermitian) A and symmetric (Hermitian) positive definite B, it normalizes the eigenvectors in V so that the B-norm of each is 1.
Always read the help. It is there to answer you questions, in fact, more quickly than it took me to write this answer, and for you to wait for someone to respond, and then have you read my copy of the relevant help block.
I will admit though, it did force me to read down to the bottom of the doc to find that information. Part of me would have liked to see it higher up, but the different cases are sufficiently dependent on the different modes eig can work in, so I would not change the documentation as it is written.
  댓글 수: 3
John D'Errico
John D'Errico 2023년 3월 14일
By deleting a question, you remove the opportunity for anyone else to gain from it. And when you delete a question, you also delete (not that I personally care about site rep) any reputation given to the person who spent the time to answer your question.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Resampling Techniques에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by