0
votes

Given a symmetric matrix A and a positive definite matrix B, we can find the eigenvalues and generalized eigenvectors with scipy's scipy.linalg.eigh, or matlab's eig.

Is there a correspondingly-straightforward way to do the reverse?

For example, how can I generate a pair of symmetric/positive definite matrices such that the generalized eigenvector associated with the largest magnitude eigenvalue is a particular vector, v?

1

1 Answers

1
votes

Given symmetric A and symmetric, positive definite B, the generalized eigenvalue problem is to find nonsingular P and diagonal D such that

A P = B P D

The diagonal of D holds the generalized eigenvalues, and the columns of P are the corresponding generalized eigenvectors.

For such a solution, P and B satisfy the B-orthogonality condition

P.T B P = I

The "reverse" problem can be stated as: given nonsingular P and diagonal D, find symmetric A and symmetric, positive definite B such that

A P = B P D

This can be solved with a little algebra. Multiply on the left by P.T, and use B-orthogonality:

P.T A P = D

so

A = inv(P.T) D inv(P)

To get B, solve the B-orthogonality condition

B = inv(P.T) inv(P)
  = inv(P P.T)

Those are the formulas for A and B given P and D.