%Thank you for all the answers! They were really helpful for me to
%understand that eigenvalue concept. I have one last question regarding this
%matter. My question starts with line 29
clear all
clc
A=[2 -1 2 ; 0 -1 4 ; 0 -2 5];
[V,D,W]=eig(A);
Lambda=eig(A);
% Right eigenvectors
v1=V(1:end,1);
v2=V(1:end,2);
v3=V(1:end,3);
% v4=V(1:end,4);
%Left eigenvectors
w1=W(1,1:end);
w2=W(2,1:end);
w3=W(3,1:end);
% w4=W(4,1:end);
%Diagonal values
d1=D(1,1);
d2=D(2,2);
d3=D(3,3);
% d4=D(4,4);
%Eigen values
e1=Lambda(1);
e2=Lambda(2);
e3=Lambda(3);
% e4=Lambda(4);
% From the explanation of eigenvectors
% A.vi=vi.ei-->correct for A.v(1...3)=v(1...3).e(1...3), right eig. vec.
% wi.A=ei.wi-->is not correct for wi(1...3).A=e(1...3).w(1...3), left eig. vec.
% where vi,wi and ei --> right,left eigenvectors and corresponding eigenvalue
% Why? Is there anything wrong in my understanding?
A*v1 == v1*e1; % for the values i=1,..3 , it is correct
w1*A == e1*w1; % for the values i=1,..3 , it is not correct.