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

29 次查看(过去 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 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by