Eigenvalues corresponds to eigenvectors

In matlab, the command [V,L]=eig(h) produces the eigenvectors and eigenvalues of the square matirx h. But I would like to know in which order this eigenvectors appear? I mean how can I observe that which eigenvalues corresponds to which eigenvectors. I am really confused at this point. Pl somebody help me to understand this. Here I have taken an example.
clc;clear;
syms a b c
h=[a 0 1 0;0 b 2 0;1 0 c 0;0 3 0 a];
[V,L]=eig(h)
This produces the output as
V =
[ 0, 0, a/12 - b/6 + c/12 - (a^2 - 2*a*c + c^2 + 4)^(1/2)/12, a/12 - b/6 + c/12 + (a^2 - 2*a*c + c^2 + 4)^(1/2)/12]
[ 0, b/3 - a/3, c/6 - a/6 - (a^2 - 2*a*c + c^2 + 4)^(1/2)/6, c/6 - a/6 + (a^2 - 2*a*c + c^2 + 4)^(1/2)/6]
[ 0, 0, (a*b)/6 - (a*c)/6 - (b/6 - c/6)*(a/2 + c/2 - (a^2 - 2*a*c + c^2 + 4)^(1/2)/2) + 1/6, (a*b)/6 - (a*c)/6 - (b/6 - c/6)*(a/2 + c/2 + (a^2 - 2*a*c + c^2 + 4)^(1/2)/2) + 1/6]
[ 1, 1, 1, 1]
L =
[ a, 0, 0, 0]
[ 0, b, 0, 0]
[ 0, 0, a/2 + c/2 - (a^2 - 2*a*c + c^2 + 4)^(1/2)/2, 0]
[ 0, 0, 0, a/2 + c/2 + (a^2 - 2*a*c + c^2 + 4)^(1/2)/2]
But how do I associate the eigenvector with its corresponding eigenvealue.

 Réponse acceptée

Vladimir Sovkov
Vladimir Sovkov le 8 Fév 2020
Absolutely standard: L(k,k) ~ V(:,k).
You can check it with the code:
for k=1:size(h,1)
disp(strcat('k=',num2str(k),'; h*v-lambda*v=',num2str(double(norm(simplify(h*V(:,k) - L(k,k)*V(:,k)))))));
end

10 commentaires

Vladimir Sovkov
Vladimir Sovkov le 8 Fév 2020
Notice that your matrix is not even symmetric, and a, b, c are considered arbitrary complex numbers. Some extra assumptions can simplify the result.
AVM
AVM le 8 Fév 2020
Thanks for your reply. Sorry,I didn't get your point. I just need to know for which eigenvalue, what is its corresponding eigenvector. I am runnig your code but what is tets it signifies. Is it that characteristics equation? Pl tell me in detail if possible.
Vladimir Sovkov
Vladimir Sovkov le 8 Fév 2020
It is not the characteristic equation. It just tests the straightforward definition of the eigenvalues and eigenvectors: (v is the eigenvector and λ is the eigenvalue).
AVM
AVM le 8 Fév 2020
@Vladimir: Thanks for your clarification. Now, I got the point. It is to test that \nu is an eigenvector with corresponding eigenvalues \lambda. It's basically that eigenvalue equation.
AVM
AVM le 8 Fév 2020
@Vladimir: Is this eigenvector is normalized to unity? Or I have to make them normalize using V(:,k) / norm(V:,k)) ? Pl inform me.
Vladimir Sovkov
Vladimir Sovkov le 8 Fév 2020
Generally, not normalized. I have noticed that the eigenvectors are normalized for real symmetric matrices but not in a general case.
AVM
AVM le 8 Fév 2020
Thanks for your reply.
@Vladimir: Is there any way to call c particular compoment of a column vector? I mean to say how can I call a component of column matrix in matlab? Here, I taken an example,
syms a b c d
h=[a;b;c;d]
How can I call 'c' element? What is the corresponding command? Pl help me.
And what about in this case also?
clc;
clear;
syms a b c
assume(a,'real');
assume(b,'real');
assume(c,'real');
h=[a 1 0;3 b 1;1 0 c];
[V,L]=eig(h);
u=simplify(V(:,1),'Steps',50)
The u is here
u =
a/3 + b/3 - (2*c)/3 + ((((a*b)/3 + (a*c)/3 + (b*c)/3 - (a + b + c)^2/9 - 1)^3 + ((a + b + c)^3/27 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 - (3*c)/2 + (a*b*c)/2 + 1/2)^2)^(1/2) - (3*c)/2 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 + (a + b + c)^3/27 + (a*b*c)/2 + 1/2)^(1/3) - ((a*b)/3 + (a*c)/3 + (b*c)/3 - (a + b + c)^2/9 - 1)/((((a*b)/3 + (a*c)/3 + (b*c)/3 - (a + b + c)^2/9 - 1)^3 + ((a + b + c)^3/27 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 - (3*c)/2 + (a*b*c)/2 + 1/2)^2)^(1/2) - (3*c)/2 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 + (a + b + c)^3/27 + (a*b*c)/2 + 1/2)^(1/3)
a*c + (a/3 + b/3 + c/3 + ((((a*b)/3 + (a*c)/3 + (b*c)/3 - (a + b + c)^2/9 - 1)^3 + ((a + b + c)^3/27 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 - (3*c)/2 + (a*b*c)/2 + 1/2)^2)^(1/2) - (3*c)/2 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 + (a + b + c)^3/27 + (a*b*c)/2 + 1/2)^(1/3) - ((a*b)/3 + (a*c)/3 + (b*c)/3 - (a + b + c)^2/9 - 1)/((((a*b)/3 + (a*c)/3 + (b*c)/3 - (a + b + c)^2/9 - 1)^3 + ((a + b + c)^3/27 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 - (3*c)/2 + (a*b*c)/2 + 1/2)^2)^(1/2) - (3*c)/2 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 + (a + b + c)^3/27 + (a*b*c)/2 + 1/2)^(1/3))^2 - (a + c)*(a/3 + b/3 + c/3 + ((((a*b)/3 + (a*c)/3 + (b*c)/3 - (a + b + c)^2/9 - 1)^3 + ((a + b + c)^3/27 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 - (3*c)/2 + (a*b*c)/2 + 1/2)^2)^(1/2) - (3*c)/2 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 + (a + b + c)^3/27 + (a*b*c)/2 + 1/2)^(1/3) - ((a*b)/3 + (a*c)/3 + (b*c)/3 - (a + b + c)^2/9 - 1)/((((a*b)/3 + (a*c)/3 + (b*c)/3 - (a + b + c)^2/9 - 1)^3 + ((a + b + c)^3/27 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 - (3*c)/2 + (a*b*c)/2 + 1/2)^2)^(1/2) - (3*c)/2 - ((a + b + c)*(a*b + a*c + b*c - 3))/6 + (a + b + c)^3/27 + (a*b*c)/2 + 1/2)^(1/3))
1
Now if I would like to call 2nd component of this column matrix u, then what should I have to do?
Vladimir Sovkov
Vladimir Sovkov le 9 Fév 2020
E.g., you address the entire k-th column of a matrix as V(:,k).

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by