## Developer Reference

• 0.10
• 10/21/2020
• Public Content
Contents

# ?gges3

Computes generalized Schur factorization for a pair of matrices.

## Syntax

Include Files
• mkl.h
Description
For a pair of
n
-by-
n
real or complex nonsymmetric matrices (
A
,
B
),
?gges3
computes the generalized eigenvalues, the generalized real or complex Schur form (
S
,
T
), and optionally the left or right matrices of Schur vectors (
VSL
and
VSR
). This gives the generalized Schur factorization
(
A
,
B
) = ( (
VSL
)*
S
*(
VSR
)
T
, (
VSL
)*
T
*(
VSR
)
T
) for real (
A
,
B
)
or
(
A
,
B
) = ( (
VSL
)*
S
*(
VSR
)
H
, (
VSL
)*
T
*(
VSR
)
H
) for complex (
A
,
B
)
where (
VSR
)
H
is the conjugate-transpose of
VSR
.
Optionally, it also orders the eigenvalues so that a selected cluster of eigenvalues appears in the leading diagonal blocks of the upper quasi-triangular matrix
S
and the upper triangular matrix
T
VSL
and
VSR
then form an orthonormal basis for the corresponding left and right eigenspaces (deflating subspaces).
If only the generalized eigenvalues are needed, use the driver
?ggev
A generalized eigenvalue for a pair of matrices (
A
,
B
) is a scalar
w
or a ratio
alpha
/
beta
=
w
, such that A -
w
*B is singular. It is usually represented as the pair (
alpha
,
beta
), as there is a reasonable interpretation for
beta
=0 or both being zero.
For real flavors:
A pair of matrices (
S
,
T
) is in generalized real Schur form if
T
is upper triangular with non-negative diagonal and
S
is block upper triangular with 1-by-1 and 2-by-2 blocks. 1-by-1 blocks correspond to real generalized eigenvalues, while 2-by-2 blocks of
S
will be "standardized" by making the corresponding elements of
T
have the form: and the pair of corresponding 2-by-2 blocks in
S
and
T
have a complex conjugate pair of generalized eigenvalues.
For complex flavors:
A pair of matrices (
S
,
T
) is in generalized complex Schur form if
S
and
T
are upper triangular and, in addition, the diagonal elements of
T
are non-negative real numbers.
Input Parameters
matrix_layout
Specifies whether matrix storage layout is row major (
LAPACK_ROW_MAJOR
) or column major (
LAPACK_COL_MAJOR
).
jobvsl
= 'N': do not compute the left Schur vectors;
jobvsr
= 'N': do not compute the right Schur vectors;
= 'V': compute the right Schur vectors.
sort
Specifies whether or not to order the eigenvalues on the diagonal of the generalized Schur form.
= 'N': Eigenvalues are not ordered;
= 'S': Eigenvalues are ordered (see
selctg
).
selctg
selctg
is a function of three arguments for real flavors or two arguments for complex flavors.
selctg
must be declared EXTERNAL in the calling subroutine. If
sort
= 'N',
selctg
is not referenced. If
sort
= 'S',
selctg
is used to select eigenvalues to sort to the top left of the Schur form.
For real flavors:
An eigenvalue (
alphar
[
j
- 1]
+
alphai
[
j
- 1]
)/
beta
[
j
- 1]
is selected if
selctg
(
alphar
[
j
- 1]
,
alphai
[
j
- 1]
,
beta
[
j
- 1]
) is true. In other words, if either one of a complex conjugate pair of eigenvalues is selected, then both complex eigenvalues are selected.
Note that in the ill-conditioned case, a selected complex eigenvalue may no longer satisfy
selctg
(
alphar
[
j
- 1]
,
alphai
[
j
- 1]
,
beta
[
j
- 1]
)
0
after ordering.
info
is to be set to
n
+2 in this case.
For complex flavors:
An eigenvalue
alpha
[
j
- 1]
/
beta
[
j
- 1]
is selected if
selctg
(
alpha
[
j
- 1]
,
beta
[
j
- 1]
) is true.
Note that a selected complex eigenvalue may no longer satisfy
selctg
(
alpha
[
j
- 1]
,
beta
[
j
- 1]
)
0
after ordering, since ordering may change the value of complex eigenvalues (especially if the eigenvalue is ill-conditioned), in this case
?gges3
returns
n
+ 2
.
n
The order of the matrices
A
,
B
,
VSL
, and
VSR
.
n
0.
a
Array, size
(
lda
*
n
)
. On entry, the first of the pair of matrices.
lda
a
.
lda
max(1,
n
).
b
Array, size
(
ldb
*
n
)
. On entry, the second of the pair of matrices.
ldb
b
.
ldb
max(1,
n
).
ldvsl
The leading dimension of the matrix
VSL
.
ldvsl
1, and if
jobvsl
= 'V',
ldvsl
n.
ldvsr
The leading dimension of the matrix
VSR
.
ldvsr
1, and if
jobvsr
= 'V',
ldvsr
n.
Output Parameters
a
On exit,
a
is overwritten by its generalized Schur form S.
b
On exit,
b
is overwritten by its generalized Schur form T.
sdim
If
sort
= 'N',
sdim
= 0. If
sort
= 'S',
sdim
= number of eigenvalues (after sorting) for which
selctg
is true.
alpha
Array, size (
n
).
alphar
Array, size (
n
).
alphai
Array, size (
n
).
beta
Array, size (
n
).
For real flavors:
On exit, (
alphar
[
j
- 1]
+
alphai
[
j
- 1]
*i)/
beta
[
j
- 1]
, j=1,...,
n
, are the generalized eigenvalues.
alphar
[
j
- 1]
+
alphai
[
j
- 1]
*i, and
beta
[
j
- 1]
,j=1,...,
n
are the diagonals of the complex Schur form (
S
,
T
) that would result if the 2-by-2 diagonal blocks of the real Schur form of (
a
,
b
) were further reduced to triangular form using 2-by-2 complex unitary transformations. If
alphai
[
j
- 1]
is zero, then the
j
-th eigenvalue is real; if positive, then the
j
-th and (
j
+1)-st eigenvalues are a complex conjugate pair, with
alphai
[
j
]
negative.
Note: the quotients
alphar
[
j
- 1]
/
beta
[
j
- 1]
and
alphai
[
j
- 1]
/
beta
[
j
- 1]
can easily over- or underflow, and
beta
[
j
- 1]
might even be zero. Thus, you should avoid computing the ratio
alpha
/
beta
by simply dividing
alpha
by
beta
. However,
alphar
and
alphai
is always less than and usually comparable with norm(
a
) in magnitude, and
beta
is always less than and usually comparable with norm(
b
).
For complex flavors:
On exit,
alpha
[
j
- 1]
[
j
- 1]
/
beta
[
j
- 1]
, j=1,...,
n
, are the generalized eigenvalues.
alpha
[
j
- 1]
, j=1,...,
n
and
beta
[
j
- 1]
, j=1,...,
n
are the diagonals of the complex Schur form (
a
,
b
) output by ?gges3. The
beta
[
j
- 1]
is non-negative real.
Note: the quotient
alpha
[
j
- 1]
/
beta
[
j
- 1]
can easily over- or underflow, and
beta
[
j
- 1]
might even be zero. Thus, you should avoid computing the ratio
alpha
/
beta
by simply dividing
alpha
by
beta
. However,
alpha
is always less than and usually comparable with norm(
a
) in magnitude, and
beta
is always less than and usually comparable with norm(
b
).
vsl
Array, size
(
ldvsl
*
n
)
.
If
jobvsl
= 'V',
vsl
contains the left Schur vectors. Not referenced if