Ch8 problem4 new

325 days ago by semele27

A=matrix(ZZ,[[3,-4],[-4,3]]) print A print print A.eigenvalues() print print A.right_eigenvectors() print P=matrix(ZZ,[A.right_eigenvectors()[0][1][0],A.right_eigenvectors()[1][1][0]]) .transpose() print P print D=P.inverse()*A*P print D print diagonal_matrix(A.eigenvalues()) 
       
[ 3 -4]
[-4  3]

[7, -1]

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

[ 1  1]
[-1  1]

[ 7  0]
[ 0 -1]

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

[7, -1]

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

[ 1  1]
[-1  1]

[ 7  0]
[ 0 -1]

[ 7  0]
[ 0 -1]