ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 13 Apr 2016 17:19:52 -0500Bug in eigenmatrix command?http://ask.sagemath.org/question/33084/bug-in-eigenmatrix-command/I'm new to sage, so this might be my bad, but I think there is a mismatch between complex conjugate eigevector/values in what the eigenmatrix_right() returns:
In my case:
J = matrix(CDF, [[-2.53634347567, 2.04801738686, -0.0, -62.166145304], [ 0.7, -0.6, 0.0, 0.0], [0.547271128842, 0.0, -0.3015, -21.7532081652], [0.0, 0.0, 0.3, -0.4]])
D, P = J.eigenmatrix_right()
D has two (almost) purely imaginary complex conjugate eigenvalues.
I thought
A1 = J * P
and
A2 = P * D
should be identical, but the complex conjugate eigenvalues are interchanged, so two columns in A1 and A2 differ by a multiple of (-1).
In my case things work ok if I interchange D[1][1] and D[2][2].
Am I missing something?Tue, 12 Apr 2016 12:22:23 -0500http://ask.sagemath.org/question/33084/bug-in-eigenmatrix-command/Comment by calc314 for <p>I'm new to sage, so this might be my bad, but I think there is a mismatch between complex conjugate eigevector/values in what the eigenmatrix_right() returns:</p>
<p>In my case:</p>
<pre><code>J = matrix(CDF, [[-2.53634347567, 2.04801738686, -0.0, -62.166145304], [ 0.7, -0.6, 0.0, 0.0], [0.547271128842, 0.0, -0.3015, -21.7532081652], [0.0, 0.0, 0.3, -0.4]])
D, P = J.eigenmatrix_right()
</code></pre>
<p>D has two (almost) purely imaginary complex conjugate eigenvalues.
I thought</p>
<pre><code>A1 = J * P
</code></pre>
<p>and </p>
<pre><code>A2 = P * D
</code></pre>
<p>should be identical, but the complex conjugate eigenvalues are interchanged, so two columns in A1 and A2 differ by a multiple of (-1).
In my case things work ok if I interchange D[1][1] and D[2][2].</p>
<p>Am I missing something?</p>
http://ask.sagemath.org/question/33084/bug-in-eigenmatrix-command/?comment=33088#post-id-33088I think there is something odd going on here. In Octave in the Jupyter notebook in SageMathCloud, I am getting what you expected; that is, JP = PD. The real part of the entries of P in Sage are negatives of the real part of the entries of P in Octave.Wed, 13 Apr 2016 09:19:15 -0500http://ask.sagemath.org/question/33084/bug-in-eigenmatrix-command/?comment=33088#post-id-33088Answer by tmonteil for <p>I'm new to sage, so this might be my bad, but I think there is a mismatch between complex conjugate eigevector/values in what the eigenmatrix_right() returns:</p>
<p>In my case:</p>
<pre><code>J = matrix(CDF, [[-2.53634347567, 2.04801738686, -0.0, -62.166145304], [ 0.7, -0.6, 0.0, 0.0], [0.547271128842, 0.0, -0.3015, -21.7532081652], [0.0, 0.0, 0.3, -0.4]])
D, P = J.eigenmatrix_right()
</code></pre>
<p>D has two (almost) purely imaginary complex conjugate eigenvalues.
I thought</p>
<pre><code>A1 = J * P
</code></pre>
<p>and </p>
<pre><code>A2 = P * D
</code></pre>
<p>should be identical, but the complex conjugate eigenvalues are interchanged, so two columns in A1 and A2 differ by a multiple of (-1).
In my case things work ok if I interchange D[1][1] and D[2][2].</p>
<p>Am I missing something?</p>
http://ask.sagemath.org/question/33084/bug-in-eigenmatrix-command/?answer=33095#post-id-33095This definitely looks like a bug. Thanks for reporting ! It is now [trac ticket 20439](http://trac.sagemath.org/ticket/20439).
Wed, 13 Apr 2016 17:19:52 -0500http://ask.sagemath.org/question/33084/bug-in-eigenmatrix-command/?answer=33095#post-id-33095