hide long namesshow long names
hide short namesshow short names
Integer type:  int32  int64  nag_int  show int32  show int32  show int64  show int64  show nag_int  show nag_int

PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

NAG Toolbox: nag_lapack_zpotri (f07fw)

Purpose

nag_lapack_zpotri (f07fw) computes the inverse of a complex Hermitian positive definite matrix AA, where AA has been factorized by nag_lapack_zpotrf (f07fr).

Syntax

[a, info] = f07fw(uplo, a, 'n', n)
[a, info] = nag_lapack_zpotri(uplo, a, 'n', n)

Description

nag_lapack_zpotri (f07fw) is used to compute the inverse of a complex Hermitian positive definite matrix AA, the function must be preceded by a call to nag_lapack_zpotrf (f07fr), which computes the Cholesky factorization of AA.
If uplo = 'U'uplo='U', A = UHUA=UHU and A1A-1 is computed by first inverting UU and then forming (U1)UH(U-1)U-H.
If uplo = 'L'uplo='L', A = LLHA=LLH and A1A-1 is computed by first inverting LL and then forming LH(L1)L-H(L-1).

References

Du Croz J J and Higham N J (1992) Stability of methods for matrix inversion IMA J. Numer. Anal. 12 1–19

Parameters

Compulsory Input Parameters

1:     uplo – string (length ≥ 1)
Specifies how AA has been factorized.
uplo = 'U'uplo='U'
A = UHUA=UHU, where UU is upper triangular.
uplo = 'L'uplo='L'
A = LLHA=LLH, where LL is lower triangular.
Constraint: uplo = 'U'uplo='U' or 'L''L'.
2:     a(lda, : :) – complex array
The first dimension of the array a must be at least max (1,n)max(1,n)
The second dimension of the array must be at least max (1,n)max(1,n)
The upper triangular matrix UU if uplo = 'U'uplo='U' or the lower triangular matrix LL if uplo = 'L'uplo='L', as returned by nag_lapack_zpotrf (f07fr).

Optional Input Parameters

1:     n – int64int32nag_int scalar
Default: The first dimension of the array a The second dimension of the array a.
nn, the order of the matrix AA.
Constraint: n0n0.

Input Parameters Omitted from the MATLAB Interface

lda

Output Parameters

1:     a(lda, : :) – complex array
The first dimension of the array a will be max (1,n)max(1,n)
The second dimension of the array will be max (1,n)max(1,n)
ldamax (1,n)ldamax(1,n).
UU stores the upper triangle of A1A-1 if uplo = 'U'uplo='U'; LL stores the lower triangle of A1A-1 if uplo = 'L'uplo='L'.
2:     info – int64int32nag_int scalar
info = 0info=0 unless the function detects an error (see Section [Error Indicators and Warnings]).

Error Indicators and Warnings

Cases prefixed with W are classified as warnings and do not generate an error of type NAG:error_n. See nag_issue_warnings.

  info = iinfo=-i
If info = iinfo=-i, parameter ii had an illegal value on entry. The parameters are numbered as follows:
1: uplo, 2: n, 3: a, 4: lda, 5: info.
It is possible that info refers to a parameter that is omitted from the MATLAB interface. This usually indicates that an error in one of the other input parameters has caused an incorrect value to be inferred.
W INFO > 0INFO>0
If info = iinfo=i, the iith diagonal element of the Cholesky factor is zero; the Cholesky factor is singular and the inverse of AA cannot be computed.

Accuracy

The computed inverse XX satisfies
XAI2c(n)εκ2(A)   and   AXI2c(n)εκ2(A) ,
XA-I2c(n)εκ2(A)   and   AX-I2c(n)εκ2(A) ,
where c(n)c(n) is a modest function of nn, εε is the machine precision and κ2(A)κ2(A) is the condition number of AA defined by
κ2(A) = A2A12 .
κ2(A)=A2A-12 .

Further Comments

The total number of real floating point operations is approximately (8/3)n383n3.
The real analogue of this function is nag_lapack_dpotri (f07fj).

Example

function nag_lapack_zpotri_example
uplo = 'L';
a = [complex(3.23),  0 + 0i,  0 + 0i,  0 + 0i;
      1.51 + 1.92i,  3.58 + 0i,  0 + 0i,  0 + 0i;
      1.9 - 0.84i,  -0.23 - 1.11i,  4.09 + 0i,  0 + 0i;
      0.42 - 2.5i,  -1.18 - 1.37i,  2.33 + 0.14i,  4.29 + 0i];
[a, info] = nag_lapack_zpotrf(uplo, a);
[aOut, info] = nag_lapack_zpotri(uplo, a)
 

aOut =

   5.4691 + 0.0000i   0.0000 + 0.0000i   0.0000 + 0.0000i   0.0000 + 0.0000i
  -1.2624 - 1.5491i   1.1024 + 0.0000i   0.0000 + 0.0000i   0.0000 + 0.0000i
  -2.9746 - 0.9616i   0.8989 - 0.5672i   2.1589 + 0.0000i   0.0000 + 0.0000i
   1.1962 + 2.9772i  -0.9826 - 0.2566i  -1.3756 - 1.4550i   2.2934 + 0.0000i


info =

                    0


function f07fw_example
uplo = 'L';
a = [complex(3.23),  0 + 0i,  0 + 0i,  0 + 0i;
      1.51 + 1.92i,  3.58 + 0i,  0 + 0i,  0 + 0i;
      1.9 - 0.84i,  -0.23 - 1.11i,  4.09 + 0i,  0 + 0i;
      0.42 - 2.5i,  -1.18 - 1.37i,  2.33 + 0.14i,  4.29 + 0i];
[a, info] = f07fr(uplo, a);
[aOut, info] = f07fw(uplo, a)
 

aOut =

   5.4691 + 0.0000i   0.0000 + 0.0000i   0.0000 + 0.0000i   0.0000 + 0.0000i
  -1.2624 - 1.5491i   1.1024 + 0.0000i   0.0000 + 0.0000i   0.0000 + 0.0000i
  -2.9746 - 0.9616i   0.8989 - 0.5672i   2.1589 + 0.0000i   0.0000 + 0.0000i
   1.1962 + 2.9772i  -0.9826 - 0.2566i  -1.3756 - 1.4550i   2.2934 + 0.0000i


info =

                    0



PDF version (NAG web site, 64-bit version, 64-bit version)
Chapter Contents
Chapter Introduction
NAG Toolbox

© The Numerical Algorithms Group Ltd, Oxford, UK. 2009–2013