Hi,
I'm working on a eigenvalue problem of the following two matrices A and B
A = [M zeros(N); zeros(N) -K]; B = [zeros(N) M; M D];
M, D and K are submatrices of size NxN. Let's say:
N = 1;K = rand(N); D = rand(N); M = rand(N);
The eigenvalue problem can be formulated as:
A*x = lambda*B*x
or
y.' *A = lambda * y.'*B
with the right and left eigenvectors or modal matrices x, y and X, Y.
Obviously, there are 6 ways to calculate the eigenvalue problem:
[X1, L1, Y1] = eig(A, B); [X2, L21] = eigs(A, B); [Y2, L22] = eigs(A.', B.');%
[X3, L3, Y3] = eig(B \ A); Y3 = (Y3.' / B).'; [X4, L41] = eigs(B \ A); [Y4, L42] = eigs((B \ A).'); Y4 = (Y4.' / B).';%[X5, L5, Y5] = eig(A / B); X5 = B \ X5; [X6, L61] = eigs(A / B); [Y6, L62] = eigs((A / B).'); X6 = B \ X6;
The corrections terms of the modal matrices Y3, Y4, X5 and X6 are required in case of using left and right multiplication of the matrix B.
We will find the eigenvalues lambda1-lambda6 as diagonal entries of the matrices L1-L6 to be equal.
But, the following equation should give us a zero solution vector
(A - lambda_i * B) * x_i = 0 y_j.' * (A - lambda_j * B) = 0
Unfortunately, this is not the case for (X1, Y1), (X3, Y3) and (X5, Y5) for complex eigenvalues. However, for completely real eigenvalues, they give the correct solution.
for qq = 1:length(l1)% right1(:, qq) = (A - l1(qq) * B) * X1(:, qq); left1(qq, :) = Y1(:, qq).' * (A - l1(qq) * B);% right2(:, qq) = (A - l2(qq) * B) * X2(:, qq); left2(qq, :) = Y2(:, qq).' * (A - l2(qq) * B);% right3(:, qq) = (A - l3(qq) * B) * X3(:, qq); left3(qq, :) = Y3(:, qq).' * (A - l3(qq) * B);% right4(:, qq) = (A - l4(qq) * B) * X4(:, qq); left4(qq, :) = Y4(:, qq).' * (A - l4(qq) * B);% right5(:, qq) = (A - l5(qq) * B) * X5(:, qq); left5(qq, :) = Y5(:, qq).' * (A - l5(qq) * B);% right6(:, qq) = (A - l6(qq) * B) * X6(:, qq); left6(qq, :) = Y6(:, qq).' * (A - l6(qq) * B);end[left1 right1; left2 right2; left3 right3; left4 right4; left5 right5; left6 right6]
Can you please tell me, why "eig()" gives "wrong" eigenvectors in this case?
Thank you very much for your help, regards
Lennart
Best Answer