For a repeated eigenvalue only one eigenvctor is being returned

조회 수: 16 (최근 30일)
James
James 2024년 3월 17일
이동: Bruno Luong 2024년 4월 14일
for my matrix
A = [1 1 4 0; 1 1 1 -1; 0 0 3 1; 0 0 3 1], it is showing there is a repeated eigenvalue of 0, which is correct however the eigenvectors from when i do [V,D] = eig(A) for the 0's are both [-1; 1; 0; 0] when i have calculated there is a second one of [4/3; 0; -1/3; 1] just confused to why it is not outputting the eigenvectors.

채택된 답변

Karl
Karl 2024년 3월 17일
Another approach, which gives the additional eigenvector that you calculated, is to obtain the eigenvector(s), x, for eigenvalue v as solutions of (A-v*I)*x = 0:
format rational
A = [1 1 4 0; 1 1 1 -1; 0 0 3 1; 0 0 3 1];
display_eigenvectors(A)
eigenvalue: 0.000000 eigenvector(s): -1 4/3 1 0 0 -1/3 0 1 eigenvalue: 2.000000 eigenvector(s): 1 1 0 0 eigenvalue: 4.000000 eigenvector(s): 3/2 1/2 1 1
function display_eigenvectors(A)
%DISPLAY_EIGENVECTORS Display eigenvectors for square matrix A.
% The eigenvector(s), x, for each eigenvalue, v, are obtained as
% a rational orthnormal basis of the null space of (A-v*I), where
% I is the unit matrix with the same size as A. The eigenvectors
% are then solutions of (A-v*I)*x = 0.
I = eye(size(A));
for v=unique(eig(A))'
fprintf(1,'\neigenvalue: %f\n eigenvector(s):\n',v)
disp(null(A-v*I,'rational'))
end
end

추가 답변 (2개)

Bruno Luong
Bruno Luong 2024년 3월 17일
편집: Bruno Luong 2024년 3월 17일
Indeed in case of eigenvalue with multiplicity > 1; the problemie is numerical challenging and MATLAB might fail to find the correct eigen vectors as with your case.
  댓글 수: 1
Bruno Luong
Bruno Luong 2024년 3월 17일
The issue is that MATLAB numerical error will make matrix reduces to Jordan form and think that 0 has incorrectly 1-dimentional eigenspace and not 2 due to tiny numerical error.
Symbolic eig would work since there is no roundoff error
A = [1 1 4 0; 1 1 1 -1; 0 0 3 1; 0 0 3 1];
[V,D] = eig(sym(A))
V = 
D = 

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


Bruno Luong
Bruno Luong 2024년 4월 14일
이동: Bruno Luong 2024년 4월 14일
UPDATE: From the discussion here using EIG with 2 arguments can do the trick and overcome the issue and return an independent eigen vector associate with 0
A = [1 1 4 0; 1 1 1 -1; 0 0 3 1; 0 0 3 1];
[V,D] = eig(A,eye(size(A)));
V4 = V(:,4)
V4 = 4x1
0.6667 0.6667 -0.3333 1.0000
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
A*V4
ans = 4x1
0 0 0 0
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by