NAG Library Routine Document
F07AWF (ZGETRI) computes the inverse of a complex matrix
has been factorized by F07ARF (ZGETRF)
||N, LDA, IPIV(*), LWORK, INFO
The routine may be called by its
F07AWF (ZGETRI) is used to compute the inverse of a complex matrix
, the routine must be preceded by a call to F07ARF (ZGETRF)
, which computes the
. The inverse of
is computed by forming
and then solving the equation
Du Croz J J and Higham N J (1992) Stability of methods for matrix inversion IMA J. Numer. Anal. 12 1–19
- 1: N – INTEGERInput
On entry: , the order of the matrix .
- 2: A(LDA,) – COMPLEX (KIND=nag_wp) arrayInput/Output
the second dimension of the array A
must be at least
, as returned by F07ARF (ZGETRF)
On exit: the factorization is overwritten by the by matrix .
- 3: LDA – INTEGERInput
: the first dimension of the array A
as declared in the (sub)program from which F07AWF (ZGETRI) is called.
- 4: IPIV() – INTEGER arrayInput
the dimension of the array IPIV
must be at least
: the pivot indices, as returned by F07ARF (ZGETRF)
- 5: WORK() – COMPLEX (KIND=nag_wp) arrayWorkspace
contains the minimum value of LWORK
required for optimum performance.
- 6: LWORK – INTEGERInput
: the dimension of the array WORK
as declared in the (sub)program from which F07AWF (ZGETRI) 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 optimum performance LWORK
should be at least
is the block size
- 7: INFO – INTEGEROutput
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 , the th diagonal element of the factor is zero, is singular, and the inverse of cannot be computed.
The computed inverse
satisfies a bound of the form:
is a modest linear function of
is the machine precision
Note that a similar bound for
cannot be guaranteed, although it is almost always satisfied. See Du Croz and Higham (1992)
The total number of real floating point operations is approximately .
The real analogue of this routine is F07AJF (DGETRI)
This example computes the inverse of the matrix
is nonsymmetric and must first be factorized by F07ARF (ZGETRF)
9.1 Program Text
Program Text (f07awfe.f90)
9.2 Program Data
Program Data (f07awfe.d)
9.3 Program Results
Program Results (f07awfe.r)