Ch-8-Prob-7-new-강산

1840 days ago by matrix

A = matrix(2,2,[3,-6,-6,3]) print A.eigenvalues() print x1 = vector([-2,2]) x2 = vector([5,5]) P = column_matrix([(1/x1.norm())*x1,(1/x2.norm())*x2]) print P.transpose()*P print print P.transpose()*A*P 
       
[9, -3]

[1 0]
[0 1]

[ 9  0]
[ 0 -3]
[9, -3]

[1 0]
[0 1]

[ 9  0]
[ 0 -3]
A = matrix(2,2,[7,2,2,4]) print A.eigenvalues() print x1 = vector([2,1]) x2 = vector([1,-2]) P = column_matrix([(1/x1.norm())*x1,(1/x2.norm())*x2]) print P.transpose()*P print print P.transpose()*A*P 
       
[8, 3]

[1 0]
[0 1]

[8 0]
[0 3]
[8, 3]

[1 0]
[0 1]

[8 0]
[0 3]