NAG Library Routine Document
F08NFF (DORGHR) generates the real orthogonal matrix
which was determined by F08NEF (DGEHRD)
when reducing a real 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
F08NFF (DORGHR) is intended to be used following a call to F08NEF (DGEHRD)
, which reduces a real general matrix
to upper Hessenberg form
by an orthogonal similarity transformation:
. F08NEF (DGEHRD)
represents the matrix
as a product of
elementary reflectors. Here
are values determined by F08NHF (DGEBAL)
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 arguments ILO
, respectively, as supplied to F08NEF (DGEHRD)
- if , ;
- if , and .
- 4: – REAL (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 F08NEF (DGEHRD)
On exit: the by orthogonal matrix .
- 5: – INTEGERInput
: the first dimension of the array A
as declared in the (sub)program from which F08NFF (DORGHR) is called.
- 6: – REAL (KIND=nag_wp) arrayInput
the dimension of the array TAU
must be at least
: further details of the elementary reflectors, as returned by F08NEF (DGEHRD)
- 7: – REAL (KIND=nag_wp) arrayWorkspace
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 F08NFF (DORGHR) 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 orthogonal matrix by a matrix
is the machine precision
8 Parallelism and Performance
F08NFF (DORGHR) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
F08NFF (DORGHR) 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 floating-point operations is approximately , where .
The complex analogue of this routine is F08NTF (ZUNGHR)
This example computes the Schur factorization of the matrix
is general and must first be reduced to Hessenberg form by F08NEF (DGEHRD)
. The program then calls F08NFF (DORGHR) to form
, and passes this matrix to F08PEF (DHSEQR)
which computes the Schur factorization of
10.1 Program Text
Program Text (f08nffe.f90)
10.2 Program Data
Program Data (f08nffe.d)
10.3 Program Results
Program Results (f08nffe.r)