[U,V]=eig(A) , AU won't equal UV
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (1)
Erivelton Gualter
am 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.
Kategorien
Mehr zu Eigenvalues & Eigenvectors finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!