NAG Library Routine Document

f08wtf  (zgghd3)

 Contents

    1  Purpose
    7  Accuracy
    10  Example

1
Purpose

f08wtf (zgghd3) reduces a pair of complex matrices A,B, where B is upper triangular, to the generalized upper Hessenberg form using unitary transformations.

2
Specification

Fortran Interface
Subroutine f08wtf ( compq, compz, n, ilo, ihi, a, lda, b, ldb, q, ldq, z, ldz, work, lwork, info)
Integer, Intent (In):: n, ilo, ihi, lda, ldb, ldq, ldz, lwork
Integer, Intent (Out):: info
Complex (Kind=nag_wp), Intent (Inout):: a(lda,*), b(ldb,*), q(ldq,*), z(ldz,*)
Complex (Kind=nag_wp), Intent (Out):: work(max(1,lwork))
Character (1), Intent (In):: compq, compz
C Header Interface
#include nagmk26.h
void  f08wtf_ ( const char *compq, const char *compz, const Integer *n, const Integer *ilo, const Integer *ihi, Complex a[], const Integer *lda, Complex b[], const Integer *ldb, Complex q[], const Integer *ldq, Complex z[], const Integer *ldz, Complex work[], const Integer *lwork, Integer *info, const Charlen length_compq, const Charlen length_compz)
The routine may be called by its LAPACK name zgghd3.

3
Description

f08wtf (zgghd3) is usually the third step in the solution of the complex generalized eigenvalue problem
Ax=λBx.  
The (optional) first step balances the two matrices using f08wvf (zggbal). In the second step, matrix B is reduced to upper triangular form using the QR factorization routine f08asf (zgeqrf) and this unitary transformation Q is applied to matrix A by calling f08auf (zunmqr). The driver, f08wqf (zggev3), solves the complex generalized eigenvalue problem by combining all the required steps including those just listed.
f08wtf (zgghd3) reduces a pair of complex matrices A,B, where B is triangular, to the generalized upper Hessenberg form using unitary transformations. This two-sided transformation is of the form
QHAZ=H, QHBZ=T  
where H is an upper Hessenberg matrix, T is an upper triangular matrix and Q and Z are unitary matrices determined as products of Givens rotations. They may either be formed explicitly, or they may be postmultiplied into input matrices Q1 and Z1, so that
Q1AZ1H=Q1QHZ1ZH, Q1BZ1H=Q1QTZ1ZH.  

4
References

Golub G H and Van Loan C F (2012) Matrix Computations (4th Edition) Johns Hopkins University Press, Baltimore
Moler C B and Stewart G W (1973) An algorithm for generalized matrix eigenproblems SIAM J. Numer. Anal. 10 241–256

5
Arguments

1:     compq – Character(1)Input
On entry: specifies the form of the computed unitary matrix Q.
compq='N'
Do not compute Q.
compq='I'
The unitary matrix Q is returned.
compq='V'
q must contain a unitary matrix Q1, and the product Q1Q is returned.
Constraint: compq='N', 'I' or 'V'.
2:     compz – Character(1)Input
On entry: specifies the form of the computed unitary matrix Z.
compz='N'
Do not compute Z.
compz='V'
z must contain a unitary matrix Z1, and the product Z1Z is returned.
compz='I'
The unitary matrix Z is returned.
Constraint: compz='N', 'V' or 'I'.
3:     n – IntegerInput
On entry: n, the order of the matrices A and B.
Constraint: n0.
4:     ilo – IntegerInput
5:     ihi – IntegerInput
On entry: ilo and ihi as determined by a previous call to f08wvf (zggbal). Otherwise, they should be set to 1 and n, respectively.
Constraints:
  • if n>0, 1 ilo ihi n ;
  • if n=0, ilo=1 and ihi=0.
6:     alda* – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array a must be at least max1,n.
On entry: the matrix A of the matrix pair A,B. Usually, this is the matrix A returned by f08auf (zunmqr).
On exit: a is overwritten by the upper Hessenberg matrix H.
7:     lda – IntegerInput
On entry: the first dimension of the array a as declared in the (sub)program from which f08wtf (zgghd3) is called.
Constraint: ldamax1,n.
8:     bldb* – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array b must be at least max1,n.
On entry: the upper triangular matrix B of the matrix pair A,B. Usually, this is the matrix B returned by the QR factorization routine f08asf (zgeqrf).
On exit: b is overwritten by the upper triangular matrix T.
9:     ldb – IntegerInput
On entry: the first dimension of the array b as declared in the (sub)program from which f08wtf (zgghd3) is called.
Constraint: ldbmax1,n.
10:   qldq* – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array q must be at least max1,n if compq='I' or 'V' and at least 1 if compq='N'.
On entry: if compq='V', q must contain a unitary matrix Q1.
If compq='N', q is not referenced.
On exit: if compq='I', q contains the unitary matrix Q.
Iif compq='V', q is overwritten by Q1Q.
11:   ldq – IntegerInput
On entry: the first dimension of the array q as declared in the (sub)program from which f08wtf (zgghd3) is called.
Constraints:
  • if compq='I' or 'V', ldq max1,n ;
  • if compq='N', ldq1.
12:   zldz* – Complex (Kind=nag_wp) arrayInput/Output
Note: the second dimension of the array z must be at least max1,n if compz='V' or 'I' and at least 1 if compz='N'.
On entry: if compz='V', z must contain a unitary matrix Z1.
If compz='N', z is not referenced.
On exit: if compz='I', z contains the unitary matrix Z.
If compz='V', z is overwritten by Z1Z.
13:   ldz – IntegerInput
On entry: the first dimension of the array z as declared in the (sub)program from which f08wtf (zgghd3) is called.
Constraints:
  • if compz='V' or 'I', ldz max1,n ;
  • if compz='N', ldz1.
14:   workmax1,lwork – Complex (Kind=nag_wp) arrayWorkspace
On exit: if info=0, the real part of work1 contains the minimum value of lwork required for optimal performance.
15:   lwork – IntegerInput
On entry: the dimension of the array work as declared in the (sub)program from which f08wtf (zgghd3) is called.
If lwork=-1, a workspace query is assumed; the routine only calculates the optimal size of the work array, returns this value as the first entry of the work array, and no error message related to lwork is issued.
Suggested value: for optimal performance, lwork must generally be larger than the minimum; increase workspace by, say, nb×n×6, where nb is the optimal block size.
16:   info – IntegerOutput
On exit: info=0 unless the routine detects an error (see Section 6).

6
Error Indicators and Warnings

info<0
If info=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.

7
Accuracy

The reduction to the generalized Hessenberg form is implemented using unitary transformations which are backward stable.

8
Parallelism and Performance

f08wtf (zgghd3) makes calls to BLAS and/or LAPACK routines, which may be threaded within the vendor library used by this implementation. Consult the documentation for the vendor library for further information.
Please consult the X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the Users' Note for your implementation for any additional implementation-specific information.

9
Further Comments

This routine is usually followed by f08xsf (zhgeqz) which implements the QZ algorithm for computing generalized eigenvalues of a reduced pair of matrices.
The real analogue of this routine is f08wff (dgghd3).

10
Example

See Section 10 in f08xsf (zhgeqz) and f08yxf (ztgevc).
© The Numerical Algorithms Group Ltd, Oxford, UK. 2017