CSVDC(3)

SYNOPSIS
SUBROUTINE CSVDC (X, LDX, N, P, S, E, U, LDU, V, LDV, WORK, JOB, + INFO)

NAME
csvdc - Perform the singular value decomposition of a rectangular matrix.

LIBRARY
SLATEC (LINPACK)

CATEGORY
D6

TYPE
COMPLEX (SSVDC-S, DSVDC-D, CSVDC-C)

KEYWORDS
LINEAR ALGEBRA, LINPACK, MATRIX, SINGULAR VALUE DECOMPOSITION

AUTHOR
Stewart, G. W., (U. of Maryland)

DESCRIPTION
CSVDC is a subroutine to reduce a complex NxP matrix X by unitary transformations U and V to diagonal form. The diagonal elements S(I) are the singular values of X. The columns of U are the corresponding left singular vectors, and the columns of V the right singular vectors. On Entry X COMPLEX(LDX,P), where LDX .GE. N. X contains the matrix whose singular value decomposition is to be computed. X is destroyed by CSVDC. LDX INTEGER. LDX is the leading dimension of the array X. N INTEGER. N is the number of rows of the matrix X. P INTEGER. P is the number of columns of the matrix X. LDU INTEGER. LDU is the leading dimension of the array U (see below). LDV INTEGER. LDV is the leading dimension of the array V (see below). WORK COMPLEX(N). WORK is a scratch array. JOB INTEGER. JOB controls the computation of the singular vectors. It has the decimal expansion AB with the following meaning A .EQ. 0 Do not compute the left singular vectors. A .EQ. 1 Return the N left singular vectors in U. A .GE. 2 Return the first MIN(N,P) left singular vectors in U. B .EQ. 0 Do not compute the right singular vectors. B .EQ. 1 Return the right singular vectors in V. On Return S COMPLEX(MM), where MM = MIN(N+1,P). The first MIN(N,P) entries of S contain the singular values of X arranged in descending order of magnitude. E COMPLEX(P). E ordinarily contains zeros. However see the discussion of INFO for exceptions. U COMPLEX(LDU,K), where LDU .GE. N. If JOBA .EQ. 1 then K .EQ. N. If JOBA .GE. 2 then K .EQ. MIN(N,P). U contains the matrix of right singular vectors. U is not referenced if JOBA .EQ. 0. If N .LE. P or if JOBA .GT. 2, then U may be identified with X in the subroutine call. V COMPLEX(LDV,P), where LDV .GE. P. V contains the matrix of right singular vectors. V is not referenced if JOB .EQ. 0. If P .LE. N, then V may be identified with X in the subroutine call. INFO INTEGER. The singular values (and their corresponding singular vectors) S(INFO+1),S(INFO+2),...,S(M) are correct (here M=MIN(N,P)). Thus if INFO.EQ. 0, all the singular values and their vectors are correct. In any event, the matrix B = CTRANS(U)*X*V is the bidiagonal matrix with the elements of S on its diagonal and the elements of E on its super-diagonal (CTRANS(U) is the conjugate-transpose of U). Thus the singular values of X and B are the same.

REFERENCES
J. J. Dongarra, J. R. Bunch, C. B. Moler, and G. W. Stewart, LINPACK Users' Guide, SIAM, 1979.

ROUTINES CALLED
CAXPY, CDOTC, CSCAL, CSROT, CSWAP, SCNRM2, SROTG

REVISION HISTORY (YYMMDD)
790319 DATE WRITTEN
890531 Changed all specific intrinsics to generic. (WRB)
890531 REVISION DATE from Version 3.2
891214 Prologue converted to Version 4.0 format. (BAB)
900326 Removed duplicate information from DESCRIPTION section. (WRB)
920501 Reformatted the REFERENCES section. (WRB)