F04ZDF (PDF version)
F04 Chapter Contents
F04 Chapter Introduction
NAG Library Manual

NAG Library Routine Document


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.

+ Contents

    1  Purpose
    7  Accuracy

1  Purpose

F04ZDF estimates the 1-norm of a complex rectangular matrix without accessing the matrix explicitly. It uses reverse communication for evaluating matrix products. The routine may be used for estimating condition numbers of square matrices.

2  Specification

COMPLEX (KIND=nag_wp)  X(LDX,*), Y(LDY,*), WORK(M*T)

3  Description

F04ZDF computes an estimate (a lower bound) for the 1-norm
A1 = max 1jn i=1 m aij (1)
of an m by n complex matrix A=aij. The routine regards the matrix A as being defined by a user-supplied ‘Black Box’ which, given an n×t matrix X (with tn) or an m×t matrix Y, can return AX or AHY, where AH is the complex conjugate transpose. A reverse communication interface is used; thus control is returned to the calling program whenever a matrix product is required.
Note:  this routine is not recommended for use when the elements of A are known explicitly; it is then more efficient to compute the 1-norm directly from the formula (1) above.
The main use of the routine is for estimating B-11 for a square matrix B, and hence the condition number κ1B=B1B-11, without forming B-1 explicitly (A=B-1 above).
If, for example, an LU factorization of B is available, the matrix products B-1X and B-HY required by F04ZDF may be computed by back- and forward-substitutions, without computing B-1.
The routine can also be used to estimate 1-norms of matrix products such as A-1B and ABC, without forming the products explicitly. Further applications are described in Higham (1988).
Since A=AH1, F04ZDF can be used to estimate the -norm of A by working with AH instead of A.
The algorithm used is described in Higham and Tisseur (2000).

4  References

Higham N J (1988) FORTRAN codes for estimating the one-norm of a real or complex matrix, with applications to condition estimation ACM Trans. Math. Software 14 381–396
Higham N J and Tisseur F (2000) A block algorithm for matrix 1-norm estimation, with an application to 1-norm pseudospectra SIAM J. Matrix. Anal. Appl. 21 1185–1201

5  Parameters

Note:  this routine uses reverse communication. Its use involves an initial entry, intermediate exits and re-entries, and a final exit, as indicated by the parameter IREVCM. Between intermediate exits and re-entries, all parameters other than X and Y must remain unchanged.
1:     IREVCM – INTEGERInput/Output
On initial entry: must be set to 0.
On intermediate exit: IREVCM=1 or 2, and X and Y contain the elements of n×t and m×t matrices respectively. The calling program must
(a) if IREVCM=1, evaluate AX and store the result in Y
if IREVCM=2, evaluate AHY and store the result in X, where AH is the complex conjugate transpose;
(b) call F04ZDF once again, with all the parameters unchanged.
On intermediate re-entry: IREVCM must be unchanged.
On final exit: IREVCM=0.
2:     M – INTEGERInput
On entry: the number of rows of the matrix A.
Constraint: M0.
3:     N – INTEGERInput
On initial entry: n, the order of the matrix A.
Constraint: N0.
4:     X(LDX,*) – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array X must be at least max1,T.
On initial entry: need not be set.
On intermediate exit: if IREVCM=1, contains the current matrix X.
On intermediate re-entry: if IREVCM=2, must contain AHY.
On final exit: the array is undefined.
5:     LDX – INTEGERInput
On initial entry: the leading dimension of the array X as declared in the (sub)program from which F04ZDF is called.
Constraint: LDXN.
6:     Y(LDY,*) – COMPLEX (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array Y must be at least max1,T.
On initial entry: need not be set.
On intermediate exit: if IREVCM=2, contains the current matrix Y.
On intermediate re-entry: if IREVCM=1, must contain AX.
On final exit: the array is undefined.
7:     LDY – INTEGERInput
On initial entry: the leading dimension of the array Y as declared in the (sub)program from which F04ZDF is called.
Constraint: LDYM.
8:     ESTNRM – REAL (KIND=nag_wp)Input/Output
On initial entry: need not be set.
On intermediate re-entry: must not be changed.
On final exit: an estimate (a lower bound) for A1.
9:     T – INTEGERInput
On entry: the number of columns t of the matrices X and Y. This is a parameter that can be used to control the accuracy and reliability of the estimate and corresponds roughly to the number of columns of A that are visited during each iteration of the algorithm.
If T2 then a partly random starting matrix is used in the algorithm.
Suggested value: T=2.
Constraint: 1TM.
10:   SEED – INTEGERInput
On entry: the seed used for random number generation.
If T=1, SEED is not used.
11:   WORK(M×T) – COMPLEX (KIND=nag_wp) arrayCommunication Array
12:   RWORK(2×N) – REAL (KIND=nag_wp) arrayCommunication Array
13:   IWORK(2×N+5×T+20) – INTEGER arrayCommunication Array
On initial entry: need not be set.
On intermediate re-entry: must not be changed.
14:   IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to 0, -1​ or ​1. If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value -1​ or ​1 is recommended. If the output of error messages is undesirable, then the value 1 is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is 0. When the value -1​ or ​1 is used it is essential to test the value of IFAIL on exit.
On exit: IFAIL=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6  Error Indicators and Warnings

If on entry IFAIL=0 or -1, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
Internal error; please contact NAG.
On entry, IREVCM=value.
Constraint: IREVCM=0, 1 or 2.
On initial entry, IREVCM=value.
Constraint: IREVCM=0.
On entry, M=value.
Constraint: M0.
On entry, N=value.
Constraint: N0.
On entry, LDX=value and N=value.
Constraint: LDXN.
On entry, LDY=value and M=value.
Constraint: LDYM.
On entry, M=value and T=value.
Constraint: 1TM.

7  Accuracy

In extensive tests on random matrices of size up to m=n=450 the estimate ESTNRM has been found always to be within a factor two of A1; often the estimate has many correct figures. However, matrices exist for which the estimate is smaller than A1 by an arbitrary factor; such matrices are very unlikely to arise in practice. See Higham and Tisseur (2000) for further details.

8  Further Comments

8.1  Timing

For most problems the time taken during calls to F04ZDF will be negligible compared with the time spent evaluating matrix products between calls to F04ZDF.
The number of matrix products required depends on the matrix A. At most six products of the form Y=AX and five products of the form X=AHY will be required. The number of iterations is independent of the choice of t.

8.2  Overflow

It is your responsibility to guard against potential overflows during evaluation of the matrix products. In particular, when estimating B-11 using a triangular factorization of B, F04ZDF should not be called if one of the factors is exactly singular – otherwise division by zero may occur in the substitutions.

8.3  Choice of t

The parameter t controls the accuracy and reliability of the estimate. For t=1, the algorithm behaves similarly to the LAPACK estimator xLACON. Increasing t typically improves the estimate, without increasing the number of iterations required.
For t2, random matrices are used in the algorithm, so for repeatable results the value of SEED should be kept constant.
A value of t=2 is recommended for new users.

8.4  Use in Conjunction with NAG Library Routines

To estimate the 1-norm of the inverse of a matrix A, the following skeleton code can normally be used:
      ...  code to factorize A ...
      IF (A is not singular) THEN
         IREVCM = 0
         IF (IREVCM.NE.0) THEN
            IF (IREVCM.EQ.1) THEN
               ...  code to compute Y=inv(A)X ...
               ...  code to compute X=inv(herm(A))Y ...
            END IF
            GO TO 10
         END IF
      END IF
To compute A-1X or A-HY, solve the equation AY=X or AHX=Y storing the result in Y or X respectively. The code will vary, depending on the type of the matrix A, and the NAG routine used to factorize A.
The example program in Section 9 illustrates how F04ZDF can be used in conjunction with NAG Library routine for LU factorization of complex matrices F07ARF (ZGETRF)).
It is also straightforward to use F04ZDF for Hermitian positive definite matrices, using F06TFF, F07FRF (ZPOTRF) and F07FSF (ZPOTRS) for factorization and solution.
For upper or lower triangular square matrices, no factorization routine is needed: Y=A-1X and X=A-HY may be computed by calls to F06SJF (ZTRSV) (or F06SKF (ZTBSV) if the matrix is banded, or F06SLF (ZTPSV) if the matrix is stored in packed form).

9  Example

This example estimates the condition number A1A-11 of the order 6 matrix
A = 0.7+0.1i -0.2i+0.0 1.0i+0.0 0.0i+0.0 0.0i+0.0 0.1i+0.0 0.3i+0.0 0.7i+0.0 0.0i+0.0 1.0+0.2i 0.9i+0.0 0.2i+0.0 5.9i 0.0i+0.0 0.2i+0.0 0.7i+0.0 0.4+6.1i 1.1+0.4i 0.1i 0.1i -0.7i+0.0 0.2i+0.0 0.1i+0.0 0.1i+0.0 0.0i+0.0 4.0i+0.0 0.0i+0.0 1.0i+0.0 9.0i+0.0 0.1i 4.5+6.7i 0.1+0.4i 3.2i 1.2i+0.0 0.0i+0.0 7.8+0.2i .

9.1  Program Text

Program Text (f04zdfe.f90)

9.2  Program Data

Program Data (f04zdfe.d)

9.3  Program Results

Program Results (f04zdfe.r)

F04ZDF (PDF version)
F04 Chapter Contents
F04 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012