Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
7220 Discussions

SVD examples: incomplete left singular vectors?

0rbital
Beginner
2,526 Views

Dear Sir/Madam,

 

According to the example of the Singular Value Decomposition (SVD) functions, for instance dgesvd, the left singular vectors, U, should have the dimensions mxm (see snippet below).

The routine computes the singular value decomposition (SVD) of a real m-by-n matrix A, optionally computing the left and/or right singular vectors. The SVD is written as

A = U*SIGMA*VT

where SIGMA is an m-by-n matrix which is zero except for its min(m,n) diagonal elements, U is an m-by-m orthogonal matrix and VT (V transposed) is an n-by-n orthogonal matrix.

However, in the results snippet

 Left singular vectors (stored columnwise)
  -0.59   0.26   0.36   0.31   0.23
  -0.40   0.24  -0.22  -0.75  -0.36
  -0.03  -0.60  -0.45   0.23  -0.31
  -0.43   0.24  -0.69   0.33   0.16
  -0.47  -0.35   0.39   0.16  -0.52
   0.29   0.58  -0.02   0.38  -0.65

the matrix is only printed as mxn.

print_matrix( "Left singular vectors (stored columnwise)", m, n, u, ldu );

Shouldn't the line above be

print_matrix( "Left singular vectors (stored columnwise)", m, m, u, ldu );

 

Could you please update all SVD examples? Or in case I misunderstood, could you please explain to me why U is printed as mxn?

 

Kind regards

Labels (2)
0 Kudos
1 Solution
Fengrui
Moderator
2,388 Views

Good catch! U is mxm. We will correct it.

 

 

View solution in original post

0 Kudos
1 Reply
Fengrui
Moderator
2,389 Views

Good catch! U is mxm. We will correct it.

 

 

0 Kudos
Reply