NAG Library Routine Document
F08NTF (ZUNGHR) generates the complex unitary matrix
which was determined by F08NSF (ZGEHRD)
when reducing a complex general matrix
to Hessenberg form.
||N, ILO, IHI, LDA, LWORK, INFO
||A(LDA,*), TAU(*), WORK(max(1,LWORK))
The routine may be called by its
F08NTF (ZUNGHR) is intended to be used following a call to F08NSF (ZGEHRD)
, which reduces a complex general matrix
to upper Hessenberg form
by a unitary similarity transformation:
. F08NSF (ZGEHRD)
represents the matrix
as a product of
elementary reflectors. Here
are values determined by F08NVF (ZGEBAL)
when balancing the matrix; if the matrix has not been balanced,
This routine may be used to generate
explicitly as a square matrix.
has the structure:
occupies rows and columns
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
- 1: N – INTEGERInput
On entry: , the order of the matrix .
- 2: ILO – INTEGERInput
- 3: IHI – INTEGERInput
: these must
be the same parameters ILO
, respectively, as supplied to F08NSF (ZGEHRD)
- if , ;
- if , and .
- 4: A(LDA,) – COMPLEX (KIND=nag_wp) arrayInput/Output
the second dimension of the array A
must be at least
: details of the vectors which define the elementary reflectors, as returned by F08NSF (ZGEHRD)
On exit: the by unitary matrix .
- 5: LDA – INTEGERInput
: the first dimension of the array A
as declared in the (sub)program from which F08NTF (ZUNGHR) is called.
- 6: TAU() – COMPLEX (KIND=nag_wp) arrayInput
the dimension of the array TAU
must be at least
: further details of the elementary reflectors, as returned by F08NSF (ZGEHRD)
- 7: WORK() – COMPLEX (KIND=nag_wp) arrayWorkspace
, the real part of
contains the minimum value of LWORK
required for optimal performance.
- 8: LWORK – INTEGERInput
: the dimension of the array WORK
as declared in the (sub)program from which F08NTF (ZUNGHR) is called, unless
, in which case a workspace query is assumed and the routine only calculates the optimal dimension of WORK
(using the formula given below).
for optimal performance LWORK
should be at least
is the block size
- 9: INFO – INTEGEROutput
unless the routine detects an error (see Section 6
6 Error Indicators and Warnings
Errors or warnings detected by the routine:
If , argument had an illegal value. An explanatory message is output, and execution of the program is terminated.
The computed matrix
differs from an exactly unitary matrix by a matrix
is the machine precision
The total number of real floating point operations is approximately , where .
The real analogue of this routine is F08NFF (DORGHR)
This example computes the Schur factorization of the matrix
is general and must first be reduced to Hessenberg form by F08NSF (ZGEHRD)
. The program then calls F08NTF (ZUNGHR) to form
, and passes this matrix to F08PSF (ZHSEQR)
which computes the Schur factorization of
9.1 Program Text
Program Text (f08ntfe.f90)
9.2 Program Data
Program Data (f08ntfe.d)
9.3 Program Results
Program Results (f08ntfe.r)