[U,V]=eig(A) , AU won't equal UV
Mostrar comentarios más antiguos
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?
Respuesta aceptada
Más respuestas (1)
Erivelton Gualter
el 19 de Nov. de 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.
Categorías
Más información sobre Linear Algebra en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!