Reputation: 81
I have a rather unusual challenge for lapack, and I have spent hours searching for a solution to it.
I have a generalized eigenvalue problem of the traditional form (A - x B = 0). Normally I would use for instance ?hegvx or ?hegvd to calculate the eigenvalues and the eigenvectors.
However the challenge I am facing now, is now that I already know the eigenvalues from the construction of the problem, and therefore I need an efficient lapack routine for calculating the eigenvectors only?
Anyone got a hack for this?
Upvotes: 4
Views: 1095
Reputation: 20141
Given the generalised eigenvalue problem
(A - y B) x = 0
And an eigenvalue yn:
(A - yn B) xn = 0
We know A, B and yn, so we can form a new matrix Cn
Cn = A - yn B
Cn xn = 0
You can solve this with any linear algebra solver individually for each eigenvalue. According to the LAPACK docs on linear equations, for a general matrix, double precision, you might use DGETRS
Edit for degenerate eigenvalues:
The null space of the matrix Cn is what we are solving for here (as MvG commented). If
Cn j = 0 and
Cn k = 0
(i.e. degenerate e-vals) then given jTk = 0 (both are still eigenvectors of the AB system) we can say
Call a row of Cn r:
r.k = r.k - jT.k = (r-jT).k
Thus forming a matrix J whose rows are each jT (there must be a name for this, but I don't know it):
(Cn - J) k = 0
Define
Dnj = Cn - J
And now solve for the new matrix Dnj. By construction this will be a new, orthogonal eigenvector of the original matrix with the same degenerate eigenvalue.
Upvotes: 3