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: 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 F08NEF (DGEHRD)
- if , ;
- if , and .
- 4: A(LDA,) – 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: LDA – INTEGERInput
: the first dimension of the array A
as declared in the (sub)program from which F08NFF (DORGHR) is called.
- 6: TAU() – 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: WORK() – REAL (KIND=nag_wp) arrayWorkspace
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 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: 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 orthogonal matrix by a matrix
is the machine precision
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
9.1 Program Text
Program Text (f08nffe.f90)
9.2 Program Data
Program Data (f08nffe.d)
9.3 Program Results
Program Results (f08nffe.r)