How I can use the eig function for nonsymmetric matrices?

2 vues (au cours des 30 derniers jours)
Traian Preda
Traian Preda le 7 Août 2014
Modifié(e) : Chris Turnes le 7 Août 2014
Hi,
I have a non symmetric matrix and I try to figure out which option of the eig I should use? Thank you

Réponse acceptée

Chris Turnes
Chris Turnes le 7 Août 2014
The eig function does not require any additional options for nonsymmetric matrices. There is an example of this in the documentation for eig:
>> A = gallery('circul',3)
A =
1 2 3
3 1 2
2 3 1
>> [V,D] = eig(A);
>> V\A*V % verify that V diagonalizes A
ans =
6.0000 + 0.0000i 0.0000 - 0.0000i -0.0000 + 0.0000i
-0.0000 - 0.0000i -1.5000 + 0.8660i -0.0000 - 0.0000i
-0.0000 + 0.0000i -0.0000 + 0.0000i -1.5000 - 0.8660i
  2 commentaires
Traian Preda
Traian Preda le 7 Août 2014
Hi,
Thank you for the answer. But for this matrix is I am using eig and I try to rebuilted back using the eigenvectors and eigenvalues I get something else than the original matrix. Therefore I think that the right eigenvectors I get using eig are wrong. I tried with svd an that it seems to work. eigenvectors I get using eig are wrong. I tried with svd an that it seems to work. Thank you
a=[-0.309042200000000 -0.00112050000000000 0.0146369900000000 0.00801360000000000 0.00951086000000000 0.0119207900000000 0.00269338000000000 0.00899029000000000 0.0120456200000000 0.00333142000000000 0.00291344000000000 0.00162112000000000;-0.00207730000000000 -0.120495000000000 0.00591404000000000 0.00262672000000000 0.00434139000000000 0.00592824000000000 -0.000548390000000000 0.00488849000000000 0.00706523000000000 0.000733070000000000 -0.00120430000000000 -0.00733420000000000;0.0106811400000000 0.00310927000000000 -0.321451300000000 0.00799418000000000 0.0146429700000000 0.0204037200000000 -0.00334158000000000 0.00629642000000000 0.00855662000000000 0.00208133000000000 0.00138921000000000 -0.000783360000000000;0.0500343300000000 0.0226932300000000 0.100244500000000 -1.21203000000000 0.0792224400000000 0.114310000000000 -0.00723418000000000 0.0281160000000000 0.0379308900000000 0.00987513000000000 0.00770613000000000 0.000929510000000000;0.0301291200000000 0.0162645000000000 0.0635045000000000 0.0263079900000000 -0.887144100000000 0.0801669700000000 -0.00166388000000000 0.0164896800000000 0.0221528100000000 0.00598660000000000 0.00502368000000000 0.00203046000000000;0.0227449100000000 0.0146744200000000 0.0508353200000000 0.0247133000000000 0.0463564800000000 -0.614663700000000 0.00122573000000000 0.0120418600000000 0.0160892700000000 0.00455634000000000 0.00414577000000000 0.00288858000000000;0.0577366400000000 -0.0267536800000000 0.0517164700000000 0.00116696000000000 0.0557495900000000 0.0914988300000000 -1.13997600000000 0.0414240200000000 0.0577823100000000 0.0105785100000000 0.00108611000000000 -0.0288816700000000;0.0615821900000000 0.0583618300000000 0.0511852600000000 0.0289944100000000 0.0324672100000000 0.0399205500000000 0.0120189900000000 -1.40059100000000 0.107321100000000 -0.0418258200000000 0.00794198000000000 0.0169553600000000;0.0492929500000000 0.0474342600000000 0.0408789900000000 0.0231899600000000 0.0259024200000000 0.0318212600000000 0.00968903000000000 0.0491629300000000 -1.06225300000000 -0.0527534900000000 0.00729352000000000 0.0141123100000000;0.0838631200000000 0.0475778400000000 0.0737786900000000 0.0403001400000000 0.0480159300000000 0.0602565500000000 0.0133273100000000 -0.0583065100000000 -0.0873152600000000 -1.09025000000000 -0.0307301500000000 -0.000891240000000000;0.0797492100000000 0.00977151000000000 0.0746899400000000 0.0392298400000000 0.0498881100000000 0.0638530000000000 0.00929280000000000 0.0737743300000000 0.117205400000000 -0.0110758600000000 -1.12388200000000 -0.0275144900000000;0.000883260000000000 -0.00104474000000000 0.000974480000000000 0.000463960000000000 0.000689950000000000 0.000920180000000000 -6.96000000000000e-06 0.000773320000000000 0.00111838000000000 0.000114490000000000 -0.000194340000000000 -0.174181000000000;]
Chris Turnes
Chris Turnes le 7 Août 2014
Modifié(e) : Chris Turnes le 7 Août 2014
How are you trying to rebuild the matrix from the eigendecomposition? Note that since the matrix is not symmetric, it is not true that V^{-1} = V^H. Therefore, to reconstruct the matrix, you should instead try
>> Ar = V*D/V; % Ar = V*D*V^{-1}
which is the proper eigendecomposition. When I try this with the matrix you posted, I get:
>> Ar = V*D/V; % Ar = V*D*V^{-1}
>> norm(a - Ar)
ans =
2.4546e-15

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Operating on Diagonal Matrices dans Help Center 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