Nonorthogonal eigenvectors for general eigenvalue problem with eig() and eigs()
I am working with a finite element model and want to decompose my system using the eigenvectors of the system. The eigenvalue problem is of the form: K*V = M*V*D, where V is the eigenvector matrix and D is the eigenvalue matrix. Both M and K are block diagonal symmetric matrices. For the generalized eigenvalue problem it should be the case that V’*M*V = a matrix whose only nonzero terms are along the diagonal, but I am getting nonzero terms on either side of these. Using the code included below for something like N =5, I get (after rounding to nearest 3rd decimal to remove near zero terms)
abs( Orthgonal_Check_eig) = [ 78.8050 0 0 0 0
0 43.4540 0 0 0
0 0 0 34.9310 0
0 0 34.9310 0 0
0 0 0 0 29.6430]
Where I am taking the absolute value because this case has complex eigenvectors (though I believe I’ve seen it with real eigenvector matrices as well). If I rerun the code it does not always happen, but I am trying to understand why this can occur for both eig() and eigs() so that I can determine if it is the conditioning of the matrices or if it is inherent to the approximations inside of eig() and eigs(). Is there a better one of the two to use to avoid this issue?
N = 5;
M = zeros(N,N);
K = zeros(N,N);
for ii = 1:N
% Diagonal Terms
M(ii,ii) = rand*50;
K(ii,ii) = rand*500;
if ii ~=N
% Off Diagonal Terms
off_diagonal = rand*50;
M(ii,ii+1) = off_diagonal;
K(ii,ii+1) = off_diagonal*10;
M(ii+1,ii) = off_diagonal;
K(ii+1,ii) = off_diagonal*10;
end
end
M= round(M);
K= round(K);
[Veig,~] = eig(K,M);
[Veigs,~] = eigs(K,M,3);
Orthgonal_Check_eig = Veig’*M*Veig;
Orthgonal_Check_eigs =Veigs’*M*Veigs;I am working with a finite element model and want to decompose my system using the eigenvectors of the system. The eigenvalue problem is of the form: K*V = M*V*D, where V is the eigenvector matrix and D is the eigenvalue matrix. Both M and K are block diagonal symmetric matrices. For the generalized eigenvalue problem it should be the case that V’*M*V = a matrix whose only nonzero terms are along the diagonal, but I am getting nonzero terms on either side of these. Using the code included below for something like N =5, I get (after rounding to nearest 3rd decimal to remove near zero terms)
abs( Orthgonal_Check_eig) = [ 78.8050 0 0 0 0
0 43.4540 0 0 0
0 0 0 34.9310 0
0 0 34.9310 0 0
0 0 0 0 29.6430]
Where I am taking the absolute value because this case has complex eigenvectors (though I believe I’ve seen it with real eigenvector matrices as well). If I rerun the code it does not always happen, but I am trying to understand why this can occur for both eig() and eigs() so that I can determine if it is the conditioning of the matrices or if it is inherent to the approximations inside of eig() and eigs(). Is there a better one of the two to use to avoid this issue?
N = 5;
M = zeros(N,N);
K = zeros(N,N);
for ii = 1:N
% Diagonal Terms
M(ii,ii) = rand*50;
K(ii,ii) = rand*500;
if ii ~=N
% Off Diagonal Terms
off_diagonal = rand*50;
M(ii,ii+1) = off_diagonal;
K(ii,ii+1) = off_diagonal*10;
M(ii+1,ii) = off_diagonal;
K(ii+1,ii) = off_diagonal*10;
end
end
M= round(M);
K= round(K);
[Veig,~] = eig(K,M);
[Veigs,~] = eigs(K,M,3);
Orthgonal_Check_eig = Veig’*M*Veig;
Orthgonal_Check_eigs =Veigs’*M*Veigs; I am working with a finite element model and want to decompose my system using the eigenvectors of the system. The eigenvalue problem is of the form: K*V = M*V*D, where V is the eigenvector matrix and D is the eigenvalue matrix. Both M and K are block diagonal symmetric matrices. For the generalized eigenvalue problem it should be the case that V’*M*V = a matrix whose only nonzero terms are along the diagonal, but I am getting nonzero terms on either side of these. Using the code included below for something like N =5, I get (after rounding to nearest 3rd decimal to remove near zero terms)
abs( Orthgonal_Check_eig) = [ 78.8050 0 0 0 0
0 43.4540 0 0 0
0 0 0 34.9310 0
0 0 34.9310 0 0
0 0 0 0 29.6430]
Where I am taking the absolute value because this case has complex eigenvectors (though I believe I’ve seen it with real eigenvector matrices as well). If I rerun the code it does not always happen, but I am trying to understand why this can occur for both eig() and eigs() so that I can determine if it is the conditioning of the matrices or if it is inherent to the approximations inside of eig() and eigs(). Is there a better one of the two to use to avoid this issue?
N = 5;
M = zeros(N,N);
K = zeros(N,N);
for ii = 1:N
% Diagonal Terms
M(ii,ii) = rand*50;
K(ii,ii) = rand*500;
if ii ~=N
% Off Diagonal Terms
off_diagonal = rand*50;
M(ii,ii+1) = off_diagonal;
K(ii,ii+1) = off_diagonal*10;
M(ii+1,ii) = off_diagonal;
K(ii+1,ii) = off_diagonal*10;
end
end
M= round(M);
K= round(K);
[Veig,~] = eig(K,M);
[Veigs,~] = eigs(K,M,3);
Orthgonal_Check_eig = Veig’*M*Veig;
Orthgonal_Check_eigs =Veigs’*M*Veigs; eigenvalue problem, eig, eigs, orthogonality MATLAB Answers — New Questions