The scipy.linalg.qz function implements generalized Schur decomposition for a pair of matrices A, B such that
(A, B) = (Q @ AA @ Z*, Q @ BB @ Z*), where AA is quasi upper triangular and BB is upper triangular. The documentation says for the matrix AA "1x1 blocks correspond to real generalized eigenvalues and 2x2 blocks are ‘standardized’ by making the corresponding elements of BB have the form: [[a 0], [0, b]]". I was wondering if someone is aware of how this standardization is done?
Asked
Active
Viewed 51 times
0
Amit Varshney
- 13
- 2
-
Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Sep 20 '22 at 16:57
-
2This is a wrapper for the LAPACK routine CGGES. Have you looked at the LAPACK user's guide and LAPACK Working Notes for more information about the algorithm used by this routine? – Brian Borchers Sep 20 '22 at 16:58
1 Answers
2
The documentation is not super clear on this. But I happen to have written some of that code.
This is done using a small SVD.
Before standardization, the 2x2 block will be:
$ (A,B) = \left(\begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix}, \begin{bmatrix} b_{11} & b_{12} \\ 0 & b_{22} \end{bmatrix} \right) $
Then an SVD is calculated of $B$. Because it is a 2x2 upper triangular matrix, this can be done using 2 Givens rotations (see dlasv2) and optionally some sign inversions to give: $UBV = D$, where $D$ is diagonal with positive elements.
Then the final standardized block is $U(A,B)V$.
Thijs Steel
- 1,693
- 8
- 16