1SGESDD(1)             LAPACK driver routine (version 3.2)            SGESDD(1)
2
3
4

NAME

6       SGESDD  -  computes the singular value decomposition (SVD) of a real M-
7       by-N matrix A, optionally computing the left and right singular vectors
8

SYNOPSIS

10       SUBROUTINE SGESDD( JOBZ, M, N, A, LDA,  S,  U,  LDU,  VT,  LDVT,  WORK,
11                          LWORK, IWORK, INFO )
12
13           CHARACTER      JOBZ
14
15           INTEGER        INFO, LDA, LDU, LDVT, LWORK, M, N
16
17           INTEGER        IWORK( * )
18
19           REAL           A(  LDA,  *  ),  S( * ), U( LDU, * ), VT( LDVT, * ),
20                          WORK( * )
21

PURPOSE

23       SGESDD computes the singular value decomposition (SVD) of a real M-by-N
24       matrix A, optionally computing the left and right singular vectors.  If
25       singular vectors are desired, it uses a divide-and-conquer algorithm.
26       The SVD is written
27            A = U * SIGMA * transpose(V)
28       where SIGMA is an M-by-N matrix which is zero except for  its  min(m,n)
29       diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N
30       orthogonal matrix.  The diagonal elements of  SIGMA  are  the  singular
31       values  of  A;  they  are  real  and  non-negative, and are returned in
32       descending order.  The first min(m,n) columns of U and V are  the  left
33       and right singular vectors of A.
34       Note that the routine returns VT = V**T, not V.
35       The  divide  and  conquer  algorithm  makes very mild assumptions about
36       floating point arithmetic. It will work on machines with a guard  digit
37       in add/subtract, or on those binary machines without guard digits which
38       subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2. It  could
39       conceivably  fail on hexadecimal or decimal machines without guard dig‐
40       its, but we know of none.
41

ARGUMENTS

43       JOBZ    (input) CHARACTER*1
44               Specifies options for computing all or part of the matrix U:
45               = 'A':  all M columns of U and all N rows of V**T are  returned
46               in the arrays U and VT; = 'S':  the first min(M,N) columns of U
47               and the first min(M,N) rows of V**T are returned in the  arrays
48               U and VT; = 'O':  If M >= N, the first N columns of U are over‐
49               written on the array A and all rows of V**T are returned in the
50               array VT; otherwise, all columns of U are returned in the array
51               U and the first M rows of V**T are overwritten in the array  A;
52               = 'N':  no columns of U or rows of V**T are computed.
53
54       M       (input) INTEGER
55               The number of rows of the input matrix A.  M >= 0.
56
57       N       (input) INTEGER
58               The number of columns of the input matrix A.  N >= 0.
59
60       A       (input/output) REAL array, dimension (LDA,N)
61               On  entry,  the M-by-N matrix A.  On exit, if JOBZ = 'O',  A is
62               overwritten with the first N columns of U  (the  left  singular
63               vectors,  stored  columnwise)  if M >= N; A is overwritten with
64               the first M rows of V**T (the right  singular  vectors,  stored
65               rowwise)  otherwise.   if  JOBZ .ne. 'O', the contents of A are
66               destroyed.
67
68       LDA     (input) INTEGER
69               The leading dimension of the array A.  LDA >= max(1,M).
70
71       S       (output) REAL array, dimension (min(M,N))
72               The singular values of A, sorted so that S(i) >= S(i+1).
73
74       U       (output) REAL array, dimension (LDU,UCOL)
75               UCOL = M if JOBZ = 'A' or JOBZ = 'O' and M < N; UCOL = min(M,N)
76               if  JOBZ  = 'S'.  If JOBZ = 'A' or JOBZ = 'O' and M < N, U con‐
77               tains the M-by-M orthogonal matrix U; if JOBZ = 'S', U contains
78               the  first  min(M,N)  columns  of U (the left singular vectors,
79               stored columnwise); if JOBZ = 'O' and M >= N, or JOBZ = 'N',  U
80               is not referenced.
81
82       LDU     (input) INTEGER
83               The  leading dimension of the array U.  LDU >= 1; if JOBZ = 'S'
84               or 'A' or JOBZ = 'O' and M < N, LDU >= M.
85
86       VT      (output) REAL array, dimension (LDVT,N)
87               If JOBZ = 'A' or JOBZ = 'O' and M >= N, VT contains the  N-by-N
88               orthogonal  matrix  V**T;  if JOBZ = 'S', VT contains the first
89               min(M,N) rows of V**T (the right singular vectors, stored  row‐
90               wise); if JOBZ = 'O' and M < N, or JOBZ = 'N', VT is not refer‐
91               enced.
92
93       LDVT    (input) INTEGER
94               The leading dimension of the array VT.  LDVT >= 1;  if  JOBZ  =
95               'A' or JOBZ = 'O' and M >= N, LDVT >= N; if JOBZ = 'S', LDVT >=
96               min(M,N).
97
98       WORK    (workspace/output) REAL array, dimension (MAX(1,LWORK))
99               On exit, if INFO = 0, WORK(1) returns the optimal LWORK;
100
101       LWORK   (input) INTEGER
102               The dimension of the array WORK. LWORK >= 1.  If  JOBZ  =  'N',
103               LWORK >= 3*min(M,N) + max(max(M,N),6*min(M,N)).  If JOBZ = 'O',
104               LWORK            >=            3*min(M,N)*min(M,N)            +
105               max(max(M,N),5*min(M,N)*min(M,N)+4*min(M,N)).  If JOBZ = 'S' or
106               'A'        LWORK        >=        3*min(M,N)*min(M,N)         +
107               max(max(M,N),4*min(M,N)*min(M,N)+4*min(M,N)).  For good perfor‐
108               mance, LWORK should generally be larger.  If  LWORK  =  -1  but
109               other  input  arguments  are legal, WORK(1) returns the optimal
110               LWORK.
111
112       IWORK   (workspace) INTEGER array, dimension (8*min(M,N))
113
114       INFO    (output) INTEGER
115               = 0:  successful exit.
116               < 0:  if INFO = -i, the i-th argument had an illegal value.
117               > 0:  SBDSDC did not converge, updating process failed.
118

FURTHER DETAILS

120       Based on contributions by
121          Ming Gu and Huan Ren, Computer Science Division, University of
122          California at Berkeley, USA
123
124
125
126 LAPACK driver routine (version 3.N2o)vember 2008                       SGESDD(1)
Impressum