So after a bit more testing it looks to me like eigenmatrix_right() is 
returning the complex conjugate of the eigenvectors for some reason. If I 
put

A=random_matrix(CDF,10,10)
D,P=A.eigenmatrix_right()
P=P.conjugate()
print('error')
(P^(-1)*A*P-D).norm()

I get only a small numerical error.

On Saturday, February 6, 2016 at 7:50:55 PM UTC-5, Fabian Haiden wrote:
>
> Hi I'm pretty new to sage, so maybe I'm doing something wrong.
>
> If I try something like 
>
> A=matrix(CDF,2,2,[[0,1],[-1,0]])
> D,P=A.eigenmatrix_right()
> print('A')
> A
> print('D')
> D
> print('P')
> P
> print('test')
> (P^(-1))*A*P
>  
> it looks like the order of eigenvalues does not match the order of 
> eigenvectors. This only happens for CDF, not QQ.
> Testing some random RDF matrices, it looks like the switch of complex 
> conjugate roots happens every time.
> For CDF matrices, the result looks completely wrong (should have D closed 
> to (P^(-1))*A*P):
>
> A=random_matrix(CDF,2,2)
> D,P=A.eigenmatrix_right()
>
> print('A')
> A
> print('D')
> D
> print('P')
> P
> print('test')
> (P^(-1))*A*P
>
> I'm using sage cloud.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to