<?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 Wrong results while solving for eign vectors! in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Wrong-results-while-solving-for-eign-vectors/m-p/1007111#M18969</link>
    <description>&lt;P&gt;&lt;A href="https://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_lapack_examples/lapacke_dsyev_row.c.htm"&gt;i am trying to use the dsyev routine&lt;/A&gt;. Now i modified your default example slightly by solving for matrix:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;2,1,3,
1,2,3,
3,3,20	&lt;/PRE&gt;

&lt;P&gt;i am getting :&lt;BR /&gt;
	Eigenvalues&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; 1.00&amp;nbsp;&amp;nbsp; 2.00&amp;nbsp; 21.00&lt;BR /&gt;
	Eigenvectors (stored columnwise)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; 0.71&amp;nbsp;&amp;nbsp; 0.69&amp;nbsp;&amp;nbsp; 0.16&lt;BR /&gt;
	&amp;nbsp; -0.71&amp;nbsp;&amp;nbsp; 0.69&amp;nbsp;&amp;nbsp; 0.16&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; 0.00&amp;nbsp; -0.23&amp;nbsp;&amp;nbsp; 0.97&lt;/P&gt;

&lt;P&gt;i again tried with vector:&lt;BR /&gt;
	1,2&lt;BR /&gt;
	2,1&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Eigenvalues&lt;BR /&gt;
	&amp;nbsp; -1.00&amp;nbsp;&amp;nbsp; 3.00&lt;BR /&gt;
	Eigenvectors (stored columnwise)&lt;BR /&gt;
	&amp;nbsp; -0.71&amp;nbsp;&amp;nbsp; 0.71&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; 0.71&amp;nbsp;&amp;nbsp; 0.71&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	eign values are fine , but why eign vectors are wrong !&lt;BR /&gt;
	according to&lt;A href="https://www.youtube.com/watch?v=r5dIXpssvrA"&gt; this &lt;/A&gt;and &lt;A href="https://www.youtube.com/watch?v=nSMoZuA44v8"&gt;this &lt;/A&gt;the eign vectors should have been :&lt;BR /&gt;
	[-1 , 1 , 0] , [-3,-3,1] , [1,1,6]&lt;BR /&gt;
	and [1,-1] , [1,1]&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;  
/*******************************************************************************
*  Copyright (C) 2009-2015 Intel Corporation. All Rights Reserved.
*  The information and material ("Material") provided below is owned by Intel
*  Corporation or its suppliers or licensors, and title to such Material remains
*  with Intel Corporation or its suppliers or licensors. The Material contains
*  proprietary information of Intel or its suppliers and licensors. The Material
*  is protected by worldwide copyright laws and treaty provisions. No part of
*  the Material may be copied, reproduced, published, uploaded, posted,
*  transmitted, or distributed in any way without Intel's prior express written
*  permission. No license under any patent, copyright or other intellectual
*  property rights in the Material is granted to or conferred upon you, either
*  expressly, by implication, inducement, estoppel or otherwise. Any license
*  under such intellectual property rights must be express and approved by Intel
*  in writing.
*
********************************************************************************
*/
/*
   LAPACKE_dsyev Example.
   ======================

   Program computes all eigenvalues and eigenvectors of a real symmetric
   matrix A:

     1.96  -6.49  -0.47  -7.20  -0.65
    -6.49   3.80  -6.39   1.50  -6.34
    -0.47  -6.39   4.17  -1.51   2.67
    -7.20   1.50  -1.51   5.70   1.80
    -0.65  -6.34   2.67   1.80  -7.10

   Description.
   ============

   The routine computes all eigenvalues and, optionally, eigenvectors of an
   n-by-n real symmetric matrix A. The eigenvector v(j) of A satisfies

   A*v(j) = lambda(j)*v(j)

   where lambda(j) is its eigenvalue. The computed eigenvectors are
   orthonormal.

   Example Program Results.
   ========================

 LAPACKE_dsyev (row-major, high-level) Example Program Results

 Eigenvalues
 -11.07  -6.23   0.86   8.87  16.09

 Eigenvectors (stored columnwise)
  -0.30  -0.61   0.40  -0.37   0.49
  -0.51  -0.29  -0.41  -0.36  -0.61
  -0.08  -0.38  -0.66   0.50   0.40
   0.00  -0.45   0.46   0.62  -0.46
  -0.80   0.45   0.17   0.31   0.16
*/
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include "mkl_lapacke.h"

/* Auxiliary routines prototypes */
extern void print_matrix( char* desc, MKL_INT m, MKL_INT n, double* a, MKL_INT lda );

/* Parameters */
#define N 2
#define LDA N

/* Main program */
int main() {
        /* Locals */
        MKL_INT n = N, lda = LDA, info;
        /* Local arrays */
        double w&lt;N&gt;;
        double a[LDA*N] = {
		1,2,
		2,1		
        };
        /* Executable statements */
        printf( "LAPACKE_dsyev (row-major, high-level) Example Program Results\n" );
        /* Solve eigenproblem */
        info = LAPACKE_dsyev( LAPACK_ROW_MAJOR, 'V', 'U', n, a, lda, w );
        /* Check for convergence */
        if( info &amp;gt; 0 ) {
                printf( "The algorithm failed to compute eigenvalues.\n" );
                exit( 1 );
        }
        /* Print eigenvalues */
        print_matrix( "Eigenvalues", 1, n, w, 1 );
        /* Print eigenvectors */
        print_matrix( "Eigenvectors (stored columnwise)", n, n, a, lda );
        exit( 0 );
} /* End of LAPACKE_dsyev Example */

/* Auxiliary routine: printing a matrix */
void print_matrix( char* desc, MKL_INT m, MKL_INT n, double* a, MKL_INT lda ) {
        MKL_INT i, j;
        printf( "\n %s\n", desc );
        for( i = 0; i &amp;lt; m; i++ ) {
                for( j = 0; j &amp;lt; n; j++ ) printf( " %6.2f", a[i*lda+j] );
                printf( "\n" );
        }
}
&lt;/N&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Sep 2015 06:29:27 GMT</pubDate>
    <dc:creator>psing51</dc:creator>
    <dc:date>2015-09-01T06:29:27Z</dc:date>
    <item>
      <title>Wrong results while solving for eign vectors!</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Wrong-results-while-solving-for-eign-vectors/m-p/1007111#M18969</link>
      <description>&lt;P&gt;&lt;A href="https://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/mkl_lapack_examples/lapacke_dsyev_row.c.htm"&gt;i am trying to use the dsyev routine&lt;/A&gt;. Now i modified your default example slightly by solving for matrix:&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;2,1,3,
1,2,3,
3,3,20	&lt;/PRE&gt;

&lt;P&gt;i am getting :&lt;BR /&gt;
	Eigenvalues&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; 1.00&amp;nbsp;&amp;nbsp; 2.00&amp;nbsp; 21.00&lt;BR /&gt;
	Eigenvectors (stored columnwise)&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; 0.71&amp;nbsp;&amp;nbsp; 0.69&amp;nbsp;&amp;nbsp; 0.16&lt;BR /&gt;
	&amp;nbsp; -0.71&amp;nbsp;&amp;nbsp; 0.69&amp;nbsp;&amp;nbsp; 0.16&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; 0.00&amp;nbsp; -0.23&amp;nbsp;&amp;nbsp; 0.97&lt;/P&gt;

&lt;P&gt;i again tried with vector:&lt;BR /&gt;
	1,2&lt;BR /&gt;
	2,1&lt;/P&gt;

&lt;P&gt;&amp;nbsp;Eigenvalues&lt;BR /&gt;
	&amp;nbsp; -1.00&amp;nbsp;&amp;nbsp; 3.00&lt;BR /&gt;
	Eigenvectors (stored columnwise)&lt;BR /&gt;
	&amp;nbsp; -0.71&amp;nbsp;&amp;nbsp; 0.71&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; 0.71&amp;nbsp;&amp;nbsp; 0.71&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;BR /&gt;
	eign values are fine , but why eign vectors are wrong !&lt;BR /&gt;
	according to&lt;A href="https://www.youtube.com/watch?v=r5dIXpssvrA"&gt; this &lt;/A&gt;and &lt;A href="https://www.youtube.com/watch?v=nSMoZuA44v8"&gt;this &lt;/A&gt;the eign vectors should have been :&lt;BR /&gt;
	[-1 , 1 , 0] , [-3,-3,1] , [1,1,6]&lt;BR /&gt;
	and [1,-1] , [1,1]&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;  
/*******************************************************************************
*  Copyright (C) 2009-2015 Intel Corporation. All Rights Reserved.
*  The information and material ("Material") provided below is owned by Intel
*  Corporation or its suppliers or licensors, and title to such Material remains
*  with Intel Corporation or its suppliers or licensors. The Material contains
*  proprietary information of Intel or its suppliers and licensors. The Material
*  is protected by worldwide copyright laws and treaty provisions. No part of
*  the Material may be copied, reproduced, published, uploaded, posted,
*  transmitted, or distributed in any way without Intel's prior express written
*  permission. No license under any patent, copyright or other intellectual
*  property rights in the Material is granted to or conferred upon you, either
*  expressly, by implication, inducement, estoppel or otherwise. Any license
*  under such intellectual property rights must be express and approved by Intel
*  in writing.
*
********************************************************************************
*/
/*
   LAPACKE_dsyev Example.
   ======================

   Program computes all eigenvalues and eigenvectors of a real symmetric
   matrix A:

     1.96  -6.49  -0.47  -7.20  -0.65
    -6.49   3.80  -6.39   1.50  -6.34
    -0.47  -6.39   4.17  -1.51   2.67
    -7.20   1.50  -1.51   5.70   1.80
    -0.65  -6.34   2.67   1.80  -7.10

   Description.
   ============

   The routine computes all eigenvalues and, optionally, eigenvectors of an
   n-by-n real symmetric matrix A. The eigenvector v(j) of A satisfies

   A*v(j) = lambda(j)*v(j)

   where lambda(j) is its eigenvalue. The computed eigenvectors are
   orthonormal.

   Example Program Results.
   ========================

 LAPACKE_dsyev (row-major, high-level) Example Program Results

 Eigenvalues
 -11.07  -6.23   0.86   8.87  16.09

 Eigenvectors (stored columnwise)
  -0.30  -0.61   0.40  -0.37   0.49
  -0.51  -0.29  -0.41  -0.36  -0.61
  -0.08  -0.38  -0.66   0.50   0.40
   0.00  -0.45   0.46   0.62  -0.46
  -0.80   0.45   0.17   0.31   0.16
*/
#include &amp;lt;stdlib.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include "mkl_lapacke.h"

/* Auxiliary routines prototypes */
extern void print_matrix( char* desc, MKL_INT m, MKL_INT n, double* a, MKL_INT lda );

/* Parameters */
#define N 2
#define LDA N

/* Main program */
int main() {
        /* Locals */
        MKL_INT n = N, lda = LDA, info;
        /* Local arrays */
        double w&lt;N&gt;;
        double a[LDA*N] = {
		1,2,
		2,1		
        };
        /* Executable statements */
        printf( "LAPACKE_dsyev (row-major, high-level) Example Program Results\n" );
        /* Solve eigenproblem */
        info = LAPACKE_dsyev( LAPACK_ROW_MAJOR, 'V', 'U', n, a, lda, w );
        /* Check for convergence */
        if( info &amp;gt; 0 ) {
                printf( "The algorithm failed to compute eigenvalues.\n" );
                exit( 1 );
        }
        /* Print eigenvalues */
        print_matrix( "Eigenvalues", 1, n, w, 1 );
        /* Print eigenvectors */
        print_matrix( "Eigenvectors (stored columnwise)", n, n, a, lda );
        exit( 0 );
} /* End of LAPACKE_dsyev Example */

/* Auxiliary routine: printing a matrix */
void print_matrix( char* desc, MKL_INT m, MKL_INT n, double* a, MKL_INT lda ) {
        MKL_INT i, j;
        printf( "\n %s\n", desc );
        for( i = 0; i &amp;lt; m; i++ ) {
                for( j = 0; j &amp;lt; n; j++ ) printf( " %6.2f", a[i*lda+j] );
                printf( "\n" );
        }
}
&lt;/N&gt;&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 06:29:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Wrong-results-while-solving-for-eign-vectors/m-p/1007111#M18969</guid>
      <dc:creator>psing51</dc:creator>
      <dc:date>2015-09-01T06:29:27Z</dc:date>
    </item>
    <item>
      <title>Please define "wrong</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Wrong-results-while-solving-for-eign-vectors/m-p/1007112#M18970</link>
      <description>&lt;P&gt;Please define "wrong eigenvector". Did you forget that if &lt;EM&gt;A.x =&amp;nbsp;λx&lt;/EM&gt;, it is also true that&amp;nbsp;&lt;EM&gt;&lt;SPAN style="font-size: 12.1949996948242px; line-height: 12.1949996948242px;"&gt;A.y =&amp;nbsp;&lt;/SPAN&gt;&lt;/EM&gt;&lt;SPAN style="font-size: 12.1949996948242px; line-height: 12.1949996948242px;"&gt;&lt;EM&gt;λy&lt;/EM&gt;, where &lt;EM&gt;y = c.x&lt;/EM&gt;, with &lt;EM&gt;c&lt;/EM&gt; a scalar multiplier? The eigenvectors (that you reported as those that were given by Lapack) happen to be scaled so that they have norm = 1, but other choices are equally valid.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 11:42:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Wrong-results-while-solving-for-eign-vectors/m-p/1007112#M18970</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2015-09-01T11:42:00Z</dc:date>
    </item>
  </channel>
</rss>

