- [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.
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?
댓글 수: 0
채택된 답변
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)
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:
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
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개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!