relation between principal eigenvector and principal generalized eigenvector
显示 更早的评论
Hello,
why this function:
[v, d] = eigs(A, B, 1);
and
[v2, d2] = eigs(B\A, 1);
return different results ? I thought that the difference between v and v2 should have been only a scaling factor..
Thank you!
采纳的回答
更多回答(1 个)
Christine Tobler
2018-8-9
0 个投票
What may be causing the differences you see is that eigs(A, B, k) first checks if the matrix B is symmetric positive definite. In that case, it computes the Cholesky factorization R'*R = B, and solves the eigenvalue problem R^(-T)*A*R^(-1)*x = lambda*x instead. The advantage of this is that, if A is symmetric, that symmetry is preserved. If B is not SPD, EIGS solves B^(-1) * A * x = lambda * x.
Independent of this, one difference is that EIGS doesn't compute (B\A)*x, it instead computes B\(A*x), since this is typically much cheaper (B\A for sparse matrices A and B it often be a dense matrix). This will result in slight numerical differences between the two cases, and the scaling of eigenvectors can easily be affected by these small differences.
As long as A*v - B*v*d is small, the result is still correct, even though each column of v may be scaled differently.
类别
在 帮助中心 和 File Exchange 中查找有关 Linear Algebra 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!