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

NAME

6       DGESVD  -  computes the singular value decomposition (SVD) of a real M-
7       by-N matrix A, optionally computing the left and/or right singular vec‐
8       tors
9

SYNOPSIS

11       SUBROUTINE DGESVD( JOBU,  JOBVT,  M,  N,  A,  LDA, S, U, LDU, VT, LDVT,
12                          WORK, LWORK, INFO )
13
14           CHARACTER      JOBU, JOBVT
15
16           INTEGER        INFO, LDA, LDU, LDVT, LWORK, M, N
17
18           DOUBLE         PRECISION A( LDA, * ), S( * ),  U(  LDU,  *  ),  VT(
19                          LDVT, * ), WORK( * )
20

PURPOSE

22       DGESVD computes the singular value decomposition (SVD) of a real M-by-N
23       matrix A, optionally computing the left and/or right singular  vectors.
24       The SVD is written
25            A = U * SIGMA * transpose(V)
26       where  SIGMA  is an M-by-N matrix which is zero except for its min(m,n)
27       diagonal elements, U is an M-by-M orthogonal matrix, and V is an N-by-N
28       orthogonal  matrix.   The  diagonal  elements of SIGMA are the singular
29       values of A; they are  real  and  non-negative,  and  are  returned  in
30       descending  order.   The first min(m,n) columns of U and V are the left
31       and right singular vectors of A.
32       Note that the routine returns V**T, not V.
33

ARGUMENTS

35       JOBU    (input) CHARACTER*1
36               Specifies options for computing all or part of the matrix U:
37               = 'A':  all M columns of U are returned in array U:
38               = 'S':  the first min(m,n) columns of U (the left singular vec‐
39               tors)  are  returned in the array U; = 'O':  the first min(m,n)
40               columns of U (the left singular vectors) are overwritten on the
41               array A; = 'N':  no columns of U (no left singular vectors) are
42               computed.
43
44       JOBVT   (input) CHARACTER*1
45               Specifies options for computing all or part of the matrix V**T:
46               = 'A':  all N rows of V**T are returned in the array VT;
47               = 'S':  the first min(m,n) rows of  V**T  (the  right  singular
48               vectors)  are  returned  in  the  array  VT;  = 'O':  the first
49               min(m,n) rows of V**T (the right singular  vectors)  are  over‐
50               written  on the array A; = 'N':  no rows of V**T (no right sin‐
51               gular vectors) are computed.  JOBVT and  JOBU  cannot  both  be
52               'O'.
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) DOUBLE PRECISION array, dimension (LDA,N)
61               On  entry,  the M-by-N matrix A.  On exit, if JOBU = 'O',  A is
62               overwritten with the first min(m,n) columns of U (the left sin‐
63               gular  vectors,  stored columnwise); if JOBVT = 'O', A is over‐
64               written with the first min(m,n) rows of V**T (the right  singu‐
65               lar  vectors,  stored rowwise); if JOBU .ne. 'O' and JOBVT .ne.
66               'O', the contents of A are destroyed.
67
68       LDA     (input) INTEGER
69               The leading dimension of the array A.  LDA >= max(1,M).
70
71       S       (output) DOUBLE PRECISION array, dimension (min(M,N))
72               The singular values of A, sorted so that S(i) >= S(i+1).
73
74       U       (output) DOUBLE PRECISION array, dimension (LDU,UCOL)
75               (LDU,M) if JOBU = 'A' or (LDU,min(M,N)) if JOBU = 'S'.  If JOBU
76               =  'A',  U  contains  the M-by-M orthogonal matrix U; if JOBU =
77               'S', U contains the first min(m,n) columns of U (the left  sin‐
78               gular  vectors,  stored columnwise); if JOBU = 'N' or 'O', U is
79               not referenced.
80
81       LDU     (input) INTEGER
82               The leading dimension of the array U.  LDU >= 1; if JOBU =  'S'
83               or 'A', LDU >= M.
84
85       VT      (output) DOUBLE PRECISION array, dimension (LDVT,N)
86               If  JOBVT = 'A', VT contains the N-by-N orthogonal matrix V**T;
87               if JOBVT = 'S', VT contains the first  min(m,n)  rows  of  V**T
88               (the right singular vectors, stored rowwise); if JOBVT = 'N' or
89               'O', VT is not referenced.
90
91       LDVT    (input) INTEGER
92               The leading dimension of the array VT.  LDVT >= 1; if  JOBVT  =
93               'A', LDVT >= N; if JOBVT = 'S', LDVT >= min(M,N).
94
95       WORK       (workspace/output)   DOUBLE   PRECISION   array,   dimension
96       (MAX(1,LWORK))
97               On exit, if INFO = 0, WORK(1) returns  the  optimal  LWORK;  if
98               INFO > 0, WORK(2:MIN(M,N)) contains the unconverged superdiago‐
99               nal elements of an upper bidiagonal matrix B whose diagonal  is
100               in  S  (not necessarily sorted). B satisfies A = U * B * VT, so
101               it has the same singular values  as  A,  and  singular  vectors
102               related by U and VT.
103
104       LWORK   (input) INTEGER
105               The    dimension    of    the    array    WORK.     LWORK    >=
106               MAX(1,3*MIN(M,N)+MAX(M,N),5*MIN(M,N)).  For  good  performance,
107               LWORK  should  generally  be  larger.   If  LWORK  = -1, then a
108               workspace query is assumed; the  routine  only  calculates  the
109               optimal size of the WORK array, returns this value as the first
110               entry of the WORK array, and no error message related to  LWORK
111               is issued by XERBLA.
112
113       INFO    (output) INTEGER
114               = 0:  successful exit.
115               < 0:  if INFO = -i, the i-th argument had an illegal value.
116               >  0:   if  DBDSQR  did  not  converge, INFO specifies how many
117               superdiagonals of an intermediate bidiagonal  form  B  did  not
118               converge  to  zero.  See  the  description  of  WORK  above for
119               details.
120
121
122
123 LAPACK driver routine (version 3.N2o)vember 2008                       DGESVD(1)
Impressum