How "chol" and "qz" MATLAB algorithms are utilised in the "eig" MATLAB function?
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Zahraa
le 13 Mar 2024
Réponse apportée : zhangbaby
le 5 Mai 2024
The MATLAB function "eig" when used this way: [V,D] = eig(A,B), gives us the eigenvalues and eigenvectors of an eigenvalue problem A*V = B*V*D, where D is the diagonal matrix of eigenvalues and matrix V columns are the corresponding right eigenvectors.
In the documentation, it is menioned that the function "eig" uses the algorithms "chol" (Cholesky factorization), and "qz" (QZ factorization for generalized eigenvalues / generalized Schur decomposition).
However, when reading about the methods of Cholesky factorization and QZ factorization for generalized eigenvalues, the first method only decomposes a matrix into a product of
where L is a lower triangular matrix, and the second method computes the eigenvalues and what about the eigenvectors?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1641621/image.png)
So, for this reason, I don't understand how using only these algorithms could return us both eigenvectos and eigenvalues of an eigenvalue problem.
0 commentaires
Réponse acceptée
Bruno Luong
le 13 Mar 2024
Modifié(e) : Bruno Luong
le 13 Mar 2024
6 commentaires
Bruno Luong
le 14 Mar 2024
MATLAB documentation mentions only qz and chol because it has the user switch of eig. It doesn't mention other stage because it judges most users do not care about knowing such thing. ou can consider it as missing if you want.
I don't know exactly how MATLAB uses chol.
All I know is it can transform generalized eigen decomposition of sdp matrix (which has specific algorithm) with Cholesky decomposition:
% Generate random sdp matrices A and B
A=rand(5);
A=A'*A;
B=rand(5);
B=B'*B;
eig(A,B)
BB=chol(B); C=BB'\(A/BB);
C = (C + C')/2; % spd C
eig(C)
Plus de réponses (1)
zhangbaby
le 5 Mai 2024
Mathematically, for any symmetric matrix, after taking the Cholesky decomposition
, we can further write the triangular matrix as
where D is a diagonal matrix and its diagonal is that of R. A simple proof provides the proof that we can get the eigenvalues and eigenvectors from this decomposition.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1686806/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1686811/image.png)
Considering coding, I should say it is far more complicated. The early version MATLAB document directly provides the one-to-one mapping from the LAPACK function to MATLAB function, which you can see from Which algorithm do DGGEV or DSYGV Eigen solvers in LAPACK implement. For symmetric matrix they use ?syev and for non-symmetric matrix they use ?ggev (they are not using ?tgevc).
0 commentaires
Voir également
Catégories
En savoir plus sur Linear Algebra dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!