[U,V]=eig(A) , AU won't equal UV
Afficher commentaires plus anciens
My understanding with [U,V]=eig(A) is that AU=UV, however, in some cases with matlab, these this is not true.
It works with A=diag([3, 3, 3, 2, 2, 1]), but not with A=magic(4) or A=ones(4)

Is AU=UV supposed to hold true or will they not equal each other in certain cases?
Réponse acceptée
Plus de réponses (1)
Erivelton Gualter
le 19 Nov 2019
It is not a bug.
It depends of the floating point numbers. If you type the following, you will observe that the floating point is equivalent to 2.2204e-16:
eps
Now, try the following:
A*U - U*V
It is almost zero. Maybe aroung 10^-15 for your case.
There is a better explanation about this matter. But for sure, I know you do not need to worry about the eig function contains a bug or not.
Catégories
En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!