NAG Library Routine Document
F01QJF
1 Purpose
F01QJF finds the factorization of the real by () matrix , so that is reduced to upper triangular form by means of orthogonal transformations from the right.
2 Specification
INTEGER |
M, N, LDA, IFAIL |
REAL (KIND=nag_wp) |
A(LDA,*), ZETA(M) |
|
3 Description
The
by
matrix
is factorized as
where
is an
by
orthogonal matrix and
is an
by
upper triangular matrix.
is given as a sequence of Householder transformation matrices
the (
)th transformation matrix,
, being used to introduce zeros into the
th row of
.
has the form
where
is a scalar,
is an
element vector and
is an
element vector.
is chosen to annihilate the elements in the
th row of
.
The vector
is returned in the
th element of
ZETA and in the
th row of
A, such that
is in
, the elements of
are in
and the elements of
are in
. The elements of
are returned in the upper triangular part of
A.
4 References
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
5 Parameters
- 1: – INTEGERInput
-
On entry:
, the number of rows of the matrix
.
When then an immediate return is effected.
Constraint:
.
- 2: – INTEGERInput
-
On entry: , the number of columns of the matrix .
Constraint:
.
- 3: – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
A
must be at least
.
On entry: the leading
by
part of the array
A must contain the matrix to be factorized.
On exit: the
by
upper triangular part of
A will contain the upper triangular matrix
, and the
by
strictly lower triangular part of
A and the
by
rectangular part of
A to the right of the upper triangular part will contain details of the factorization as described in
Section 3.
- 4: – INTEGERInput
-
On entry: the first dimension of the array
A as declared in the (sub)program from which F01QJF is called.
Constraint:
.
- 5: – REAL (KIND=nag_wp) arrayOutput
-
On exit:
contains the scalar
for the
th transformation. If
then
, otherwise
contains
as described in
Section 3 and
is always in the range
.
- 6: – INTEGERInput/Output
-
On entry:
IFAIL 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.
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
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Errors or warnings detected by the routine:
-
On entry, | , |
or | , |
or | . |
An unexpected error has been triggered by this routine. Please
contact
NAG.
See
Section 3.8 in the Essential Introduction for further information.
Your licence key may have expired or may not have been installed correctly.
See
Section 3.7 in the Essential Introduction for further information.
Dynamic memory allocation failed.
See
Section 3.6 in the Essential Introduction for further information.
7 Accuracy
The computed factors
and
satisfy the relation
where
is the
machine precision (see
X02AJF),
is a modest function of
and
, and
denotes the spectral (two) norm.
8 Parallelism and Performance
F01QJF is not threaded by NAG in any implementation.
F01QJF 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 approximate number of floating-point operations is given by .
The first
rows of the orthogonal matrix
can be obtained by calling
F01QKF, which overwrites the
rows of
on the first
rows of the array
A.
is obtained by the call:
IFAIL = 0
CALL F01QKF('Separate',M,N,K,A,LDA,ZETA,WORK,IFAIL)
must be a
element array. If
is larger than
, then
A must have been declared to have at least
rows.
Operations involving the matrix
can readily be performed by the Level 2 BLAS routines
F06PFF (DTRMV) and
F06PJF (DTRSV) (see
Chapter F06), but note that no test for near singularity of
is incorporated into
F06PJF (DTRSV). If
is singular, or nearly singular then
F02WUF can be used to determine the singular value decomposition of
.
10 Example
This example obtains the
factorization of the
by
matrix
10.1 Program Text
Program Text (f01qjfe.f90)
10.2 Program Data
Program Data (f01qjfe.d)
10.3 Program Results
Program Results (f01qjfe.r)