Ch-8-Prob-4-New-강산

1842 days ago by matrix

A1 = matrix(2,2,[3,-4,-4,3]) print A1.eigenvectors_left() print P1 = matrix(2,2,[1,1,-1,1]) print P1 print D1 = P1.inverse()*A1*P1 print D1 print A2 = matrix(3,3,[2,1,1,1,2,1,1,1,2]) print A2.eigenvectors_left() print P2 = matrix(3,3,[1,1,0,1,0,1,1,-1,-1]) print P2 print D2 = P2.inverse()*A2*P2 print D2 
       
[(7, [
(1, -1)
], 1), (-1, [
(1, 1)
], 1)]

[ 1  1]
[-1  1]

[ 7  0]
[ 0 -1]

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

[ 1  1  0]
[ 1  0  1]
[ 1 -1 -1]

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

[ 1  1]
[-1  1]

[ 7  0]
[ 0 -1]

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

[ 1  1  0]
[ 1  0  1]
[ 1 -1 -1]

[4 0 0]
[0 1 0]
[0 0 1]