Unable to find out left eigen vectors of symbolic matrix

3 views (last 30 days)
Hello,
I have 3*3 matrix having symbolic elements. I tried to find out the eigen value, left eigen vector and right eigen vector using below command
[right_eig_vectors, eig_values] = eig(A);
[left_eig_vectors, ~] = eig(A.');
My understanding is that the left eigenvectors solve the following equation: W'*A-D*W'=0. But when I put that into solve ,it partially solve this equation of W'*A-D*W'=0. Can anyone help me?
  3 Comments
Abhinav Kumar
Abhinav Kumar on 5 Oct 2021
Hi,
I have attached the matlab code file
syms z1 z2 z3 z4 z5 z6 z7 ;
A=[z1 z2 z3; z4 z5 z6; 1 2 z7]
M=subs(A,[z1 z2 z3 z4 z5 z6 z7],[-0.1 0.1 -2 0.01 0.07 -0.5 0.2])
[V,D] = eig(M)
[W, ~] = eig(M.')
W'*M - D*W'
The W'*M-D*W' should be equal to or almost zero but that not the case in my coding.
The W'*M-D*W' outputs are like this
ans =
1.0e-14 *
-0.1388 0.5329 0
ans =
1.9774 + 0.1985i 4.0123 - 0.0596i 0.0000 + 3.4528i .(this should be equal to zero)
ans =
1.9774 - 0.1985i 4.0123 + 0.0596i 0.0000 - 3.4528i. (This should be equal to zero)
Is there any different command which I can use for correct left eigen vectors or need any modification
in this command. Please help

Sign in to comment.

Accepted Answer

Christine Tobler
Christine Tobler on 5 Oct 2021
The left eigenvectors are still expressed as right eigenvectors of M', meaning they satisfy a slightly different equation:
syms z1 z2 z3 z4 z5 z6 z7 ;
A=[z1 z2 z3; z4 z5 z6; 1 2 z7];
M=subs(A,[z1 z2 z3 z4 z5 z6 z7],[-0.1 0.1 -2 0.01 0.07 -0.5 0.2]);
[V, D] = eig(M);
[W, D2] = eig(M');
assert(isequal(D, D2))
double(norm(M*V - V*D))
ans = 0
double(norm(M'*W - W*D))
ans = 0
% Apply conjugate transpose to the second expression:
double(norm(W'*M - conj(D)*W'))
ans = 0
% Apply non-conjugate transpose instead:
double(norm(W.'*M - D*W.'))
ans = 0
% You can also apply CONJ to W, in which case the formula becomes:
W = conj(W);
double(norm(W'*M - D*W'))
ans = 0
% This last one matches what happens in EIG for floating-point numbers,
% where it's possible to compute left and right eigenvalues in one go.
Md = double(M);
[Vd, Dd, Wd] = eig(Md);
norm(Md*Vd - Vd*Dd)
ans = 1.9481e-15
norm(Wd'*Md - Dd*Wd')
ans = 9.5794e-16
So in short, taking the conjugate of the matrix W should resolve your issues.

More Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!