NAG FL Interface
f07arf (zgetrf)

1 Purpose

f07arf computes the LU factorization of a complex m by n matrix.

2 Specification

Fortran Interface
Subroutine f07arf ( m, n, a, lda, ipiv, info)
Integer, Intent (In) :: m, n, lda
Integer, Intent (Out) :: ipiv(min(m,n)), info
Complex (Kind=nag_wp), Intent (Inout) :: a(lda,*)
C Header Interface
#include <nag.h>
void  f07arf_ (const Integer *m, const Integer *n, Complex a[], const Integer *lda, Integer ipiv[], Integer *info)
The routine may be called by the names f07arf, nagf_lapacklin_zgetrf or its LAPACK name zgetrf.

3 Description

f07arf forms the LU factorization of a complex m by n matrix A as A=PLU, where P is a permutation matrix, L is lower triangular with unit diagonal elements (lower trapezoidal if m>n) and U is upper triangular (upper trapezoidal if m<n). Usually A is square m=n, and both L and U 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 Arguments

1: m Integer Input
On entry: m, the number of rows of the matrix A.
Constraint: m0.
2: n Integer Input
On entry: n, the number of columns of the matrix A.
Constraint: n0.
3: alda* Complex (Kind=nag_wp) array Input/Output
Note: the second dimension of the array a must be at least max1,n.
On entry: the m by n matrix A.
On exit: the factors L and U from the factorization A=PLU; the unit diagonal elements of L are not stored.
4: lda Integer Input
On entry: the first dimension of the array a as declared in the (sub)program from which f07arf is called.
Constraint: ldamax1,m.
5: ipivminm,n Integer array Output
On exit: the pivot indices that define the permutation matrix. At the ith step, if ipivi>i then row i of the matrix A was interchanged with row ipivi, for i=1,2,,minm,n. ipivii indicates that, at the ith step, a row interchange was not required.
6: info Integer Output
On exit: info=0 unless the routine detects an error (see Section 6).

6 Error Indicators and Warnings

info<0
If info=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.
info>0
Element value of the diagonal is exactly zero. The factorization has been completed, but the factor U is exactly singular, and division by zero will occur if it is used to solve a system of equations.

7 Accuracy

The computed factors L and U are the exact factors of a perturbed matrix A+E, where
E c minm,n ε P L U ,  
cn is a modest linear function of n, and ε is the machine precision.

8 Parallelism and Performance

f07arf is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
f07arf 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.

9 Further Comments

The total number of real floating-point operations is approximately 83n3 if m=n (the usual case), 43n23m-n if m>n and 43m23n-m if m<n.
A call to this routine with m=n may be followed by calls to the routines:
The real analogue of this routine is f07adf.

10 Example

This example computes the LU factorization of the matrix A, where
A= -1.34+2.55i 0.28+3.17i -6.39-2.20i 0.72-0.92i -0.17-1.41i 3.31-0.15i -0.15+1.34i 1.29+1.38i -3.29-2.39i -1.91+4.42i -0.14-1.35i 1.72+1.35i 2.41+0.39i -0.56+1.47i -0.83-0.69i -1.96+0.67i .  

10.1 Program Text

Program Text (f07arfe.f90)

10.2 Program Data

Program Data (f07arfe.d)

10.3 Program Results

Program Results (f07arfe.r)