Eigenvector are different for eig(A)=eig(A,I) {I is identity matrix} but eig(K/M,M/M) not equal to eig(K,M)

8 views (last 30 days)
I am trying to fully understand the eigenvalue/eigenvector problem but I run into the following inconsistency with Matlab eig command
clear all
clc
m=1;
k=1;
M=[m 0;0 2*m];
K=[2*k -k;-k 3*k];
A=K/M
% Following 3 are identical as expected
[vect val]=eig(A)
[vect val]=eig(A,eye(2))
[vect,val]=eig(K/M,M/M)
% However, the below should be identical to case eig(K/M,M/M) but I get same eigenvalues
% but different eigenvectors
[vect,val]=eig(K,M)

Answers (1)

John D'Errico
John D'Errico on 27 Oct 2018
Edited: John D'Errico on 27 Oct 2018
Ok, looking at what you did, lets see...
The generalized eigenvalue problem solves
A*X = lambda*B*X
where A and B are given matrices, X a vector, and lambda an eigenvalue.
If the matrix B has an inverse, then we can write this as:
(inv(B)*A)*X = lambda*X
Now, what does slash do? From, the help for slash:
/ Slash or right division.
B/A is the matrix division of A into B, which is roughly the
same as B*INV(A) , except it is computed in a different way.
So K/M is equivalent to K*inv(M).
Matrix multiplication is NOT commutative!!!!!!!!!!! Well, generally not. There are specific cases where you get lucky.
K*inv(M) is NOT the same as inv(M)*K.
So these compute the same sets of eigenvectors, subject to an arbitrary scaling of the vectors. The order of the eigenvalues was swapped too.
[vect,val]=eig(M\K,M\M)
vect =
1 1
-0.5 1
val =
2.5 0
0 1
[vect,val]=eig(K,M)
vect =
-0.577350269189626 -0.816496580927726
-0.577350269189626 0.408248290463863
val =
1 0
0 2.5

Categories

Find more on Linear Algebra in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!