Contents

# ?ggesx

Computes the generalized eigenvalues, Schur form, and, optionally, the left and/or right matrices of Schur vectors.

## Syntax

Include Files
• mkl.h
Description
The routine computes for a pair of
n
-by-
n
real/complex nonsymmetric matrices (
A
,
B
), the generalized eigenvalues, the generalized real/complex Schur form (
S
,
T
), optionally, the left and/or right matrices of Schur vectors (
vsl
and
vsr
). This gives the generalized Schur factorization
(
A
,
B
) = (
vsl
*
S
*
vsr
H
,
vsl
*
T
*
vsr
H
)
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
; computes a reciprocal condition number for the average of the selected eigenvalues (
rconde
); and computes a reciprocal condition number for the right and left deflating subspaces corresponding to the selected eigenvalues (
rcondv
vsl
and
vsr
then form an orthonormal/unitary basis for the corresponding left and right eigenspaces (deflating subspaces).
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 for both being zero. 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
will have a complex conjugate pair of generalized eigenvalues. A pair of matrices (
S
,
T
) is in generalized complex Schur form if
S
and
T
are upper triangular and, in addition, the diagonal 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
Must be
'N'
or
'V'
.
If
jobvsl
=
'N'
, then the left Schur vectors are not computed.
If
jobvsl
=
'V'
, then the left Schur vectors are computed.
jobvsr
Must be
'N'
or
'V'
.
If
jobvsr
=
'N'
, then the right Schur vectors are not computed.
If
jobvsr
=
'V'
, then the right Schur vectors are computed.
sort
Must be
'N'
or
'S'
. Specifies whether or not to order the eigenvalues on the diagonal of the generalized Schur form.
If
sort
=
'N'
, then eigenvalues are not ordered.
If
sort
=
'S'
, eigenvalues are ordered (see
select
).
select
The
select
parameter is a pointer to a function returning a value of
lapack_logical
type. For different flavors the function has different arguments:
LAPACKE_sggesx
:
lapack_logical (*LAPACK_S_SELECT3) ( const float*, const float*, const float* );
LAPACKE_dggesx
:
lapack_logical (*LAPACK_D_SELECT3) ( const double*, const double*, const double* );
LAPACKE_cggesx
:
lapack_logical (*LAPACK_C_SELECT2) ( const lapack_complex_float*, const lapack_complex_float* );
LAPACKE_zggesx
:
lapack_logical (*LAPACK_Z_SELECT2) ( const lapack_complex_double*, const lapack_complex_double* );
If
sort
=
'S'
,
select
is used to select eigenvalues to sort to the top left of the Schur form.
If
sort
=
'N'
,
select
is not referenced.
For real flavors
:
An eigenvalue
(
alphar
[
j
] +
alphai
[
j
])/
beta
[
j
]
is selected if
select
(
alphar
[
j
],
alphai
[
j
],
beta
[
j
])
is true; that is, 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
select
(
alphar
[
j
],
alphai
[
j
],
beta
[
j
]) = 1
after ordering. In this case
info
is set to
n
+2.
For complex flavors
:
An eigenvalue
alpha
[
j
] /
beta
[
j
]
is selected if
select
(
alpha
[
j
],
beta
[
j
])
is true.
Note that a selected complex eigenvalue may no longer satisfy
select
(
alpha
[
j
],
beta
[
j
]) = 1
after ordering, since ordering may change the value of complex eigenvalues (especially if the eigenvalue is ill-conditioned); in this case
info
is set to
n
+2 (see
info
below).
sense
Must be
'N'
,
'E'
,
'V'
, or
'B'
. Determines which reciprocal condition number are computed.
If
sense
=
'N'
, none are computed;
If
sense
=
'E'
, computed for average of selected eigenvalues only;
If
sense
=
'V'
, computed for selected deflating subspaces only;
If
sense
=
'B'
, computed for both.
If
sense
is
'E'
,
'V'
, or
'B'
, then
sort
must equal
'S'
.
n
The order of the matrices
A
,
B
,
vsl
, and
vsr
(
n
0
).
a
,
b
Arrays:
a
(size at least max(1,
lda
*
n
))
is an array containing the
n
-by-
n
matrix
A
(first of the pair of matrices).
b
(size at least max(1,
ldb
*
n
))
is an array containing the
n
-by-
n
matrix
B
(second of the pair of matrices).
lda
The leading dimension of the array
a
.
Must be at least max(1,
n
).
ldb
The leading dimension of the array
b
.
Must be at least max(1,
n
).
ldvsl
,
ldvsr
The leading dimensions of the output matrices
vsl
and
vsr
, respectively. Constraints:
ldvsl
1
. If
jobvsl
=
'V'
,
ldvsl
max(1,
n
)
.
ldvsr
1
. If
jobvsr
=
'V'
,
ldvsr
max(1,
n
)
.
Output Parameters
a
On exit, this array has been overwritten by its generalized Schur form
S
.
b
On exit, this array has been overwritten by its generalized Schur form
T
.
sdim
If
sort
=
'N'
,
sdim
= 0
.
If
sort
=
'S'
,
sdim
is equal to the number of eigenvalues (after sorting) for which
select
is true.
Note that for real flavors complex conjugate pairs for which
select
is true for either eigenvalue count as 2.
alphar
,
alphai
Arrays, size at least max(1,
n
) each. Contain values that form generalized eigenvalues in real flavors.
See
beta
.
alpha
Array, size at least max(1,
n
). Contain values that form generalized eigenvalues in complex flavors. See
beta
.
beta
Array, size at least max(1,
n
).
For real flavors
:
On exit,
(
alphar
[
j
] +
alphai
[
j
]*i)/
beta
[
j
],
j
=0,...,
n
- 1
will be the generalized eigenvalues.
alphar
[
j
] +
alphai
[
j
]*i and
beta
[
j
],
j
=0,...,
n
- 1
are the diagonals of the complex Schur form (
S
,
T
) that would result if the 2-by-2 diagonal blocks of the real generalized Schur form of (
A
,
B
) were further reduced to triangular form using complex unitary transformations. If
alphai
[
j
]
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
+1]
negative.
For complex flavors:
On exit,
alpha
[
j
]/
beta
[
j
],
j
=0,...,
n
- 1
will be the generalized eigenvalues.
alpha
[
j
] and
beta
[
j
],
j
=0,...,
n
- 1
are the diagonals of the complex Schur form (
S
,
T
) output by
cggesx
/
zggesx
. The
beta
[
j
]
will be non-negative real.
Application Notes
below.
vsl
,
vsr
Arrays:
vsl
(size at least max(1,
ldvsl
*
n
))
.
If
jobvsl
=
'V'
, this array will contain the left Schur vectors.
If
jobvsl
=
'N'
,
vsl
is not referenced.
vsr
(size at least max(1,
ldvsr
*
n
))
.
If
jobvsr
=
'V'
, this array will contain the right Schur vectors.
If
jobvsr
=
'N'
,
vsr
is not referenced.
rconde
,
rcondv
Arrays,
size 2
each
If
sense
=
'E'
or
'B'
,
rconde
(1) and
rconde
(2)
contain the reciprocal condition numbers for the average of the selected eigenvalues.
Not referenced if
sense
=
'N'
or
'V'
.
If
sense
=
'V'
or
'B'
,
rcondv
 and
rcondv

contain the reciprocal condition numbers for the selected deflating subspaces.
Not referenced if
sense
=
'N'
or
'E'
.
Return Values
This function returns a value
info
.
If
info
=0
, the execution is successful.
If
info
=
-i
, the
i
-th parameter had an illegal value.
If
info
=
i
, and
i
n
:
the
QZ
iteration failed. (
A
,
B
) is not in Schur form, but
alphar
[
j
],
alphai
[
j
] (for real flavors), or
alpha
[
j
] (for complex flavors), and
beta
[
j
],
j
=
info
,...,
n
- 1
should be correct.
i
>
n
: errors that usually indicate LAPACK problems:
i
=
n
+1
: other than
QZ
iteration failed in hgeqz;
i
=
n
+2
: after reordering, roundoff changed values of some complex eigenvalues so that leading eigenvalues in the generalized Schur form no longer satisfy
select
= 1
. This could also be caused due to scaling;
i
=
n
+3
: reordering failed in tgsen.
Application Notes
The quotients
alphar
[
j
]/
beta
[
j
]
and
alphai
[
j
]/
beta
[
j
]
may easily over- or underflow, and
beta
[
j
]
may even be zero. Thus, you should avoid simply computing the ratio. However,
alphar
and
alphai
will be always less than and usually comparable with norm(
A
) in magnitude, and
beta
always less than and usually comparable with norm(
B
).

#### Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804