NAG Library Routine Document
F07ADF (DGETRF)
Note: before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.
1 Purpose
F07ADF (DGETRF) computes the factorization of a real by matrix.
2 Specification
INTEGER
M, N, LDA, IPIV(min(M,N)), INFO
REAL (KIND=nag_wp)
A(LDA,*)
The routine may be called by its
LAPACK
name dgetrf.
3 Description
F07ADF (DGETRF) forms the factorization of a real by matrix as , where is a permutation matrix, is lower triangular with unit diagonal elements (lower trapezoidal if ) and is upper triangular (upper trapezoidal if ). Usually is square , and both and are triangular. The routine uses partial pivoting, with row interchanges.
4 References
Golub G H and Van Loan C F (1996) Matrix Computations (3rd Edition) Johns Hopkins University Press, Baltimore
5 Parameters
- 1: M – INTEGERInput
On entry: , the number of rows of the matrix .
Constraint:
.
- 2: N – INTEGERInput
On entry: , the number of columns of the matrix .
Constraint:
.
- 3: A(LDA,) – REAL (KIND=nag_wp) arrayInput/Output
-
Note: the second dimension of the array
A
must be at least
.
On entry: the by matrix .
On exit: the factors and from the factorization ; the unit diagonal elements of are not stored.
- 4: LDA – INTEGERInput
On entry: the first dimension of the array
A as declared in the (sub)program from which F07ADF (DGETRF) is called.
Constraint:
.
- 5: IPIV() – INTEGER arrayOutput
On exit: the pivot indices that define the permutation matrix. At the
th step, if then row of the matrix was interchanged with row , for . indicates that, at the th step, a row interchange was not required.
- 6: INFO – INTEGEROutput
On exit:
unless the routine detects an error (see
Section 6).
6 Error Indicators and Warnings
Errors or warnings detected by the routine:
If , the th parameter had an illegal value. An explanatory message is output, and execution of the program is terminated.
If , is exactly zero. The factorization has been completed, but the factor is exactly singular, and division by zero will occur if it is used to solve a system of equations.
7 Accuracy
The computed factors
and
are the exact factors of a perturbed matrix
, where
is a modest linear function of
, and
is the
machine precision.
The total number of floating point operations is approximately if (the usual case), if and if .
A call to this routine with
may be followed by calls to the routines:
9 Example
This example computes the
factorization of the matrix
, where
9.1 Program Text
Program Text (f07adfe.f90)
9.2 Program Data
Program Data (f07adfe.d)
9.3 Program Results
Program Results (f07adfe.r)