Untitled

516 days ago by s2s2111

A=matrix([[1,-1],[-1,1]]) print A.eigenvectors_right() print x1=vector([1,-1]) x2=vector([1,1]) a=x1.norm() b=x2.norm() z1=1/a*x1 z2=1/b*x2 P=column_matrix([z1, z2]) print P print C=matrix([[1,-1],[-1,1]]) print P.transpose()*C*P print 
       
[(2, [
(1, -1)
], 1), (0, [
(1, 1)
], 1)]

[ 1/2*sqrt(2)  1/2*sqrt(2)]
[-1/2*sqrt(2)  1/2*sqrt(2)]

[2 0]
[0 0]
[(2, [
(1, -1)
], 1), (0, [
(1, 1)
], 1)]

[ 1/2*sqrt(2)  1/2*sqrt(2)]
[-1/2*sqrt(2)  1/2*sqrt(2)]

[2 0]
[0 0]