NAG Library Routine Document
F01QGF reduces the by () real upper trapezoidal matrix to upper triangular form by means of orthogonal transformations.
||M, N, LDA, IFAIL
) real upper trapezoidal matrix
upper triangular matrix, is factorized as
orthogonal matrix and
upper triangular matrix.
is given as a sequence of Householder transformation matrices
th transformation matrix,
, being used to introduce zeros into the
th row of
has the form
is a scalar and
is an (
) element vector.
are chosen to annihilate the elements of the
th row of
is returned in the
th element of the array ZETA
and in the
th row of A
, such that
and the elements of
. The elements of
are returned in the upper triangular part of A
For further information on this factorization and its use see Section 6.5 of Golub and Van Loan (1996)
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
Wilkinson J H (1965) The Algebraic Eigenvalue Problem Oxford University Press, Oxford
- 1: M – INTEGERInput
, the number of rows of the matrix
When then an immediate return is effected.
- 2: N – INTEGERInput
On entry: , the number of columns of the matrix .
- 3: A(LDA,) – REAL (KIND=nag_wp) arrayInput/Output
the second dimension of the array A
must be at least
: the leading
upper trapezoidal part of the array A
must contain the matrix to be factorized.
upper triangular part of A
will contain the upper triangular matrix
, and the
upper trapezoidal part of A
will contain details of the factorization as described in Section 3
- 4: LDA – INTEGERInput
: the first dimension of the array A
as declared in the (sub)program from which F01QGF is called.
- 5: ZETA(M) – REAL (KIND=nag_wp) arrayOutput
contains the scalar
th transformation. If
as described in Section 3
is always in the range
- 6: IFAIL – INTEGERInput/Output
must be set to
. If you are unfamiliar with this parameter you should refer to Section 3.3
in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value
is recommended. If the output of error messages is undesirable, then the value
is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is
. When the value is used it is essential to test the value of IFAIL on exit.
unless the routine detects an error or a warning has been flagged (see Section 6
6 Error Indicators and Warnings
If on entry
, explanatory error messages are output on the current error message unit (as defined by X04AAF
Errors or warnings detected by the routine:
The computed factors
satisfy the relation
is the machine precision
is a modest function of
denotes the spectral (two) norm.
The approximate number of floating point operations is given by .
This example reduces the
to upper triangular form.
9.1 Program Text
Program Text (f01qgfe.f90)
9.2 Program Data
Program Data (f01qgfe.d)
9.3 Program Results
Program Results (f01qgfe.r)