F08LEF (DGBBRD) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

F08LEF (DGBBRD)

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

F08LEF (DGBBRD) reduces a real m by n band matrix to upper bidiagonal form.

2  Specification

SUBROUTINE F08LEF ( VECT, M, N, NCC, KL, KU, AB, LDAB, D, E, Q, LDQ, PT, LDPT, C, LDC, WORK, INFO)
INTEGER  M, N, NCC, KL, KU, LDAB, LDQ, LDPT, LDC, INFO
REAL (KIND=nag_wp)  AB(LDAB,*), D(min(M,N)), E(min(M,N)-1), Q(LDQ,*), PT(LDPT,*), C(LDC,*), WORK(2*max(M,N))
CHARACTER(1)  VECT
The routine may be called by its LAPACK name dgbbrd.

3  Description

F08LEF (DGBBRD) reduces a real m by n band matrix to upper bidiagonal form B by an orthogonal transformation: A=QBPT. The orthogonal matrices Q and PT, of order m and n respectively, are determined as a product of Givens rotation matrices, and may be formed explicitly by the routine if required. A matrix C may also be updated to give C~=QTC.
The routine uses a vectorizable form of the reduction.

4  References

None.

5  Parameters

1:     VECT – CHARACTER(1)Input
On entry: indicates whether the matrices Q and/or PT are generated.
VECT='N'
Neither Q nor PT is generated.
VECT='Q'
Q is generated.
VECT='P'
PT is generated.
VECT='B'
Both Q and PT are generated.
Constraint: VECT='N', 'Q', 'P' or 'B'.
2:     M – INTEGERInput
On entry: m, the number of rows of the matrix A.
Constraint: M0.
3:     N – INTEGERInput
On entry: n, the number of columns of the matrix A.
Constraint: N0.
4:     NCC – INTEGERInput
On entry: nC, the number of columns of the matrix C.
Constraint: NCC0.
5:     KL – INTEGERInput
On entry: the number of subdiagonals, kl, within the band of A.
Constraint: KL0.
6:     KU – INTEGERInput
On entry: the number of superdiagonals, ku, within the band of A.
Constraint: KU0.
7:     AB(LDAB,*) – REAL (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array AB must be at least max1,N.
On entry: the original m by n band matrix A.
The matrix is stored in rows 1 to kl+ku+1, more precisely, the element Aij must be stored in
ABku+1+i-jj  for ​max1,j-kuiminm,j+kl.
On exit: AB is overwritten by values generated during the reduction.
8:     LDAB – INTEGERInput
On entry: the first dimension of the array AB as declared in the (sub)program from which F08LEF (DGBBRD) is called.
Constraint: LDABKL+KU+1.
9:     D(minM,N) – REAL (KIND=nag_wp) arrayOutput
On exit: the diagonal elements of the bidiagonal matrix B.
10:   E(minM,N-1) – REAL (KIND=nag_wp) arrayOutput
On exit: the superdiagonal elements of the bidiagonal matrix B.
11:   Q(LDQ,*) – REAL (KIND=nag_wp) arrayOutput
Note: the second dimension of the array Q must be at least max1,M if VECT='Q' or 'B', and at least 1 otherwise.
On exit: if VECT='Q' or 'B', contains the m by m orthogonal matrix Q.
If VECT='N' or 'P', Q is not referenced.
12:   LDQ – INTEGERInput
On entry: the first dimension of the array Q as declared in the (sub)program from which F08LEF (DGBBRD) is called.
Constraints:
  • if VECT='Q' or 'B', LDQ max1,M ;
  • otherwise LDQ1.
13:   PT(LDPT,*) – REAL (KIND=nag_wp) arrayOutput
Note: the second dimension of the array PT must be at least max1,N if VECT='P' or 'B', and at least 1 otherwise.
On exit: the n by n orthogonal matrix PT, if VECT='P' or 'B'. If VECT='N' or 'Q', PT is not referenced.
14:   LDPT – INTEGERInput
On entry: the first dimension of the array PT as declared in the (sub)program from which F08LEF (DGBBRD) is called.
Constraints:
  • if VECT='P' or 'B', LDPT max1,N ;
  • otherwise LDPT1.
15:   C(LDC,*) – REAL (KIND=nag_wp) arrayInput/Output
Note: the second dimension of the array C must be at least max1,NCC.
On entry: an m by nC matrix C.
On exit: C is overwritten by QTC. If NCC=0, C is not referenced.
16:   LDC – INTEGERInput
On entry: the first dimension of the array C as declared in the (sub)program from which F08LEF (DGBBRD) is called.
Constraints:
  • if NCC>0, LDC max1,M ;
  • if NCC=0, LDC1.
17:   WORK(2×maxM,N) – REAL (KIND=nag_wp) arrayWorkspace
18:   INFO – INTEGEROutput
On exit: INFO=0 unless the routine detects an error (see Section 6).

6  Error Indicators and Warnings

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

7  Accuracy

The computed bidiagonal form B satisfies QBPT=A+E, where
E2 c n ε A2 ,
cn is a modestly increasing function of n, and ε is the machine precision.
The elements of B themselves may be sensitive to small perturbations in A or to rounding errors in the computation, but this does not affect the stability of the singular values and vectors.
The computed matrix Q differs from an exactly orthogonal matrix by a matrix F such that
F2 = Oε .
A similar statement holds for the computed matrix PT.

8  Further Comments

The total number of real floating point operations is approximately the sum of: where k=kl+ku, assuming nk. For this section we assume that m=n.
The complex analogue of this routine is F08LSF (ZGBBRD).

9  Example

This example reduces the matrix A to upper bidiagonal form, where
A = -0.57 -1.28 0.00 0.00 -1.93 1.08 -0.31 0.00 2.30 0.24 0.40 -0.35 0.00 0.64 -0.66 0.08 0.00 0.00 0.15 -2.13 -0.00 0.00 0.00 0.50 .

9.1  Program Text

Program Text (f08lefe.f90)

9.2  Program Data

Program Data (f08lefe.d)

9.3  Program Results

Program Results (f08lefe.r)


F08LEF (DGBBRD) (PDF version)
F08 Chapter Contents
F08 Chapter Introduction
NAG Library Manual

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