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_zptcon (f07ju)


    1  Purpose
    2  Syntax
    7  Accuracy
    9  Example


nag_lapack_zptcon (f07ju) computes the reciprocal condition number of a complex n  by n  Hermitian positive definite tridiagonal matrix A , using the LDLH  factorization returned by nag_lapack_zpttrf (f07jr).


[rcond, info] = f07ju(d, e, anorm, 'n', n)
[rcond, info] = nag_lapack_zptcon(d, e, anorm, 'n', n)


nag_lapack_zptcon (f07ju) should be preceded by a call to nag_lapack_zpttrf (f07jr), which computes a modified Cholesky factorization of the matrix A  as
A=LDLH ,  
where L  is a unit lower bidiagonal matrix and D  is a diagonal matrix, with positive diagonal elements. nag_lapack_zptcon (f07ju) then utilizes the factorization to compute A-11  by a direct method, from which the reciprocal of the condition number of A , 1/κA  is computed as
1/κ1A=1 / A1 A-11 .  
1/κA  is returned, rather than κA , since when A  is singular κA  is infinite.


Higham N J (2002) Accuracy and Stability of Numerical Algorithms (2nd Edition) SIAM, Philadelphia


Compulsory Input Parameters

1:     d: – double array
The dimension of the array d must be at least max1,n
Must contain the n diagonal elements of the diagonal matrix D from the LDLH factorization of A.
2:     e: – complex array
The dimension of the array e must be at least max1,n-1
Must contain the n-1 subdiagonal elements of the unit lower bidiagonal matrix L. (e can also be regarded as the superdiagonal of the unit upper bidiagonal matrix U from the UHDU factorization of A.)
3:     anorm – double scalar
The 1-norm of the original matrix A. anorm must be computed either before calling nag_lapack_zpttrf (f07jr) or else from a copy of the original matrix A.
Constraint: anorm0.0.

Optional Input Parameters

1:     n int64int32nag_int scalar
Default: the dimension of the array d.
n, the order of the matrix A.
Constraint: n0.

Output Parameters

1:     rcond – double scalar
The reciprocal condition number, 1/κ1A=1/A1A-11.
2:     info int64int32nag_int scalar
info=0 unless the function detects an error (see Error Indicators and Warnings).

Error Indicators and Warnings

If info=-i, argument i had an illegal value. An explanatory message is output, and execution of the program is terminated.


The computed condition number will be the exact condition number for a closely neighbouring matrix.

Further Comments

The condition number estimation requires On  floating-point operations.
See Section 15.6 of Higham (2002) for further details on computing the condition number of tridiagonal matrices.
The real analogue of this function is nag_lapack_dptcon (f07jg).


This example computes the condition number of the Hermitian positive definite tridiagonal matrix A  given by
A = 16.0i+00.0 16.0-16.0i 0.0i+0.0 0.0i+0.0 16.0+16.0i 41.0i+00.0 18.0+9.0i 0.0i+0.0 0.0i+00.0 18.0-09.0i 46.0i+0.0 1.0+4.0i 0.0i+00.0 0.0i+00.0 1.0-4.0i 21.0i+0.0 .  
function f07ju_example

fprintf('f07ju example results\n\n');

% Hermitian tridiagonal A stored as two diagonals
d = [ 16            41          46            21];
e = [ 16 + 16i      18 - 9i      1 - 4i         ];

% Factorize
[df, ef, info] = f07jr( ...
                        d, e);

% Construct matrix an with same 1-norm
an = [0 e; d; e 0];
anorm = norm(an,1);

% Get reciprocal condition number
[rcond, info] = f07ju( ...
                       df, ef, anorm);

fprintf('Condition number of A = %7.2e\n',1/rcond);

f07ju example results

Condition number of A = 9.21e+03

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–2015