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: – INTEGERInput
On entry: , the order of the matrix .
- 2: – INTEGERInput
- 3: – INTEGERInput
: these must
be the same parameters ILO
, respectively, as supplied to F08NSF (ZGEHRD)
- if , ;
- if , and .
- 4: – 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: – INTEGERInput
: the first dimension of the array A
as declared in the (sub)program from which F08NTF (ZUNGHR) is called.
- 6: – 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: – COMPLEX (KIND=nag_wp) arrayWorkspace
, the real part of
contains the minimum value of LWORK
required for optimal performance.
- 8: – 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: – INTEGEROutput
unless the routine detects an error (see Section 6
6 Error Indicators and Warnings
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
8 Parallelism and Performance
F08NTF (ZUNGHR) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
F08NTF (ZUNGHR) 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.
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
10.1 Program Text
Program Text (f08ntfe.f90)
10.2 Program Data
Program Data (f08ntfe.d)
10.3 Program Results
Program Results (f08ntfe.r)