# incorrect eigenvector using eig(A,B)

조회 수: 12(최근 30일)
Amin Taraghi 2016년 4월 21일
답변: Christine Tobler 2020년 10월 23일
I am solving an eigenvalue problem and I need the 5 first eigenvalues I use [V, w2]=eig(MK,MM) to find the eigenvalues.
Then I test the results by MK*V-MM*V*w2 and it is incorrect!!!!
when I sort the eigenvalues and eigenvectors using the following code
for i=1:length(w2)
for j=i+1:length(w2)
if w2(i,i)>= w2(j,j)
TEMPO=w2(i,i);
TEMPV=V(:,i);
w2(i,i)=w2(j,j);
V(:,i)=V(:,j);
w2(j,j)=TEMPO;
V(:,j)=TEMPV;
end
end
end
comparing the results with other simulation in Abaqus I realized that the first 5 eigenvalues which are my natural frequencies are true but the eigenvectors which are my mode shapes are wrong.
##### 댓글 수: 2표시숨기기 이전 댓글 수: 1
Amin Taraghi 2016년 4월 21일
the result for test is not zero and the elements have different orders test= MK*V-MM*V*w2;

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

### 답변(2개)

Walter Roberson 2016년 4월 21일
Eigenvectors are not uniquely determined. Any constant multiple of an eigenvector is also an eigenvector.
##### 댓글 수: 2표시숨기기 이전 댓글 수: 1
Achyut Dave 2020년 10월 23일
That's true if and only if the corresponding eigenvalue is appropriately scaled.

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

Christine Tobler 2020년 10월 23일
The residual MK*V-MM*V*w2 is expected to be numerically close to zero, however, you have to take into account the scaling of the whole system. Here norm(MK) is 4.2241e+20 and the residual will also be scaled with this factor, which gets us to a residual of around 1e7. Here's what I get for a scaled residual:
>> [V, w2]=eig(MK,MM);
>> max(vecnorm(MK*V - MM*V*w2)) / norm(MK)
ans =
4.2534e-14
About matching eigenvectors between MATLAB's and Abaqus's result - you definitely have to expect different scaling of each individual eigenvector (you could try applying V ./ vecnorm(V) to both matrices, which will given each column a 2-norm of 1). At that point, the only effect of scaling should be the sign of each column.
But in addition to this, here's a plot of the eigenvalues w2:
As you can see, the eigenvalues are (A) not sorted, so the order of the eigenvalues returned by Abaqus might be different, and (B) decrease rapidly, so the eigenvectors related to the relatively very small eigenvalues (< 1e7 let's say) probably don't have matching eigenvectors, because at that point they are mostly tracking numerical noise.

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

### Community Treasure Hunt

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

Start Hunting!

Translated by