<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic SVD examples: incomplete left singular vectors? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/SVD-examples-incomplete-left-singular-vectors/m-p/1710512#M37292</link>
    <description>&lt;P&gt;Dear Sir/Madam,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the example of the Singular Value Decomposition (SVD) functions, for instance &lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/code-samples-lapack/2025-0/lapacke-dgesvd-example-c-row.html" target="_self"&gt;dgesvd&lt;/A&gt;, the left singular vectors, U, should have the dimensions mxm (see snippet below).&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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.&lt;/LI-CODE&gt;&lt;P&gt;However, in the results snippet&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; 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&lt;/LI-CODE&gt;&lt;P&gt;the matrix is only printed as mxn.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;print_matrix( "Left singular vectors (stored columnwise)", m, n, u, ldu );&lt;/LI-CODE&gt;&lt;P&gt;Shouldn't the line above be&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;print_matrix( "Left singular vectors (stored columnwise)", m, m, u, ldu );&lt;/LI-CODE&gt;&lt;P&gt;?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please update all SVD examples? Or in case I misunderstood, could you please explain to me why U is printed as mxn?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;</description>
    <pubDate>Tue, 19 Aug 2025 13:02:46 GMT</pubDate>
    <dc:creator>0rbital</dc:creator>
    <dc:date>2025-08-19T13:02:46Z</dc:date>
    <item>
      <title>SVD examples: incomplete left singular vectors?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/SVD-examples-incomplete-left-singular-vectors/m-p/1710512#M37292</link>
      <description>&lt;P&gt;Dear Sir/Madam,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to the example of the Singular Value Decomposition (SVD) functions, for instance &lt;A href="https://www.intel.com/content/www/us/en/docs/onemkl/code-samples-lapack/2025-0/lapacke-dgesvd-example-c-row.html" target="_self"&gt;dgesvd&lt;/A&gt;, the left singular vectors, U, should have the dimensions mxm (see snippet below).&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;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.&lt;/LI-CODE&gt;&lt;P&gt;However, in the results snippet&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; 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&lt;/LI-CODE&gt;&lt;P&gt;the matrix is only printed as mxn.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;print_matrix( "Left singular vectors (stored columnwise)", m, n, u, ldu );&lt;/LI-CODE&gt;&lt;P&gt;Shouldn't the line above be&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;print_matrix( "Left singular vectors (stored columnwise)", m, m, u, ldu );&lt;/LI-CODE&gt;&lt;P&gt;?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please update all SVD examples? Or in case I misunderstood, could you please explain to me why U is printed as mxn?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 13:02:46 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/SVD-examples-incomplete-left-singular-vectors/m-p/1710512#M37292</guid>
      <dc:creator>0rbital</dc:creator>
      <dc:date>2025-08-19T13:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: SVD examples: incomplete left singular vectors?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/SVD-examples-incomplete-left-singular-vectors/m-p/1710852#M37297</link>
      <description>&lt;P&gt;Good catch! U is mxm. We will correct it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Aug 2025 21:37:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/SVD-examples-incomplete-left-singular-vectors/m-p/1710852#M37297</guid>
      <dc:creator>Fengrui</dc:creator>
      <dc:date>2025-08-20T21:37:42Z</dc:date>
    </item>
  </channel>
</rss>

