LA Ch8 Exs Prob4 by 김지윤

382 days ago by jykim

A=matrix(ZZ,[[3,-4],[-4,3]]) print A print print A.eigenvalues() print print A.right_eigenvectors() print z1=A.right_eigenvectors()[0][1][0]/A.right_eigenvectors()[0][1][0].norm() z2=A.right_eigenvectors()[1][1][0]/A.right_eigenvectors()[1][1][0].norm() P=column_matrix([z1,z2]) print P print D=P.transpose()*A*P print D print diagonal_matrix(A.eigenvalues()) 
       
[ 3 -4]
[-4  3]

[7, -1]

[(7, [
(1, -1)
], 1), (-1, [
(1, 1)
], 1)]

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

[ 7  0]
[ 0 -1]

[ 7  0]
[ 0 -1]
[ 3 -4]
[-4  3]

[7, -1]

[(7, [
(1, -1)
], 1), (-1, [
(1, 1)
], 1)]

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

[ 7  0]
[ 0 -1]

[ 7  0]
[ 0 -1]