F01BUF (PDF version)
F01 Chapter Contents
F01 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

F01BUF performs a ULDLTUT decomposition of a real symmetric positive definite band matrix.

2  Specification

REAL (KIND=nag_wp)  A(LDA,N), W(M1)

3  Description

The symmetric positive definite matrix A, of order n and bandwidth 2m+1, is divided into the leading principal sub-matrix of order k and its complement, where mkn. A UDUT decomposition of the latter and an LDLT decomposition of the former are obtained by means of a sequence of elementary transformations, where U is unit upper triangular, L is unit lower triangular and D is diagonal. Thus if k=n, an LDLT decomposition of A is obtained.
This routine is specifically designed to precede F01BVF for the transformation of the symmetric-definite eigenproblem Ax=λBx by the method of Crawford where A and B are of band form. In this context, k is chosen to be close to n/2 and the decomposition is applied to the matrix B.

4  References

Wilkinson J H (1965) The Algebraic Eigenvalue Problem Oxford University Press, Oxford
Wilkinson J H and Reinsch C (1971) Handbook for Automatic Computation II, Linear Algebra Springer–Verlag

5  Parameters

1:     N – INTEGERInput
On entry: n, the order of the matrix A.
2:     M1 – INTEGERInput
On entry: m+1, where m is the number of nonzero superdiagonals in A. Normally M1N.
3:     K – INTEGERInput
On entry: k, the change-over point in the decomposition.
Constraint: M1-1KN.
4:     A(LDA,N) – REAL (KIND=nag_wp) arrayInput/Output
On entry: the upper triangle of the n by n symmetric band matrix A, with the diagonal of the matrix stored in the m+1th row of the array, and the m superdiagonals within the band stored in the first m rows of the array. Each column of the matrix is stored in the corresponding column of the array. For example, if n=6 and m=2, the storage scheme is
* * a13 a24 a35 a46 * a12 a23 a34 a45 a56 a11 a22 a33 a44 a55 a66
Elements in the top left corner of the array are not used. The following code assigns the matrix elements within the band to the correct elements of the array:
    DO 20 J = 1, N
       DO 10 I = MAX(1,J-M1+1), J
          A(I-J+M1,J) = matrix(I,J)
On exit: A is overwritten by the corresponding elements of L, D and U.
5:     LDA – INTEGERInput
On entry: the first dimension of the array A as declared in the (sub)program from which F01BUF is called.
Constraint: LDAM1.
6:     W(M1) – REAL (KIND=nag_wp) arrayWorkspace
7:     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:
On entry,K<M1 or K>N.
The matrix A is not positive definite, perhaps as a result of rounding errors, giving an element of D which is zero or negative. IFAIL=3 when the failure occurs in the leading principal sub-matrix of order K and IFAIL=2 when it occurs in the complement.

7  Accuracy

The Cholesky decomposition of a positive definite matrix is known for its remarkable numerical stability (see Wilkinson (1965)). The computed U, L and D satisfy the relation ULDLTUT=A+E where the 2-norms of A and E are related by Ec m+1 2εA where c is a constant of order unity and ε is the machine precision. In practice, the error is usually appreciably smaller than this.

8  Further Comments

The time taken by F01BUF is approximately proportional to nm2+3nm.
This routine is specifically designed for use as the first stage in the solution of the generalized symmetric eigenproblem Ax=λBx by Crawford's method which preserves band form in the transformation to a similar standard problem. In this context, for maximum efficiency, k should be chosen as the multiple of m nearest to n/2.
The matrix U is such that U-1AU-T is diagonal in its last n-k rows and columns, L is such that L-1U-1AU-TL-T=D and D is diagonal. To find U, L and D where A=ULDLTUT requires nmm+3/2-mm+1m+2/3 multiplications and divisions which, is independent of k.

9  Example

This example finds a ULDLTUT decomposition of the real symmetric positive definite matrix
3 -9 6 -9 31 -2 -4 6 -2 123 -66 15 -4 -66 145 -24 4 15 -24 61 -74 -18 4 -74 98 24 -18 24 6 .

9.1  Program Text

Program Text (f01bufe.f90)

9.2  Program Data

Program Data (f01bufe.d)

9.3  Program Results

Program Results (f01bufe.r)

F01BUF (PDF version)
F01 Chapter Contents
F01 Chapter Introduction
NAG Library Manual

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