LA+Chapter+8+EX+6+solved+by+Leenaeul

2037 days ago by math2013

A=matrix(QQ,3,3,[1,2,2,2,1,-2,2,-2,1]) print A.eigenvalues() print print A.eigenvectors_right() x1=vector([1,-1,-1]) x2=vector([1,0,1]) x3=vector([0,1,-1]) print print x1.norm() print x2.norm() print x3.norm() x11 = vector([1/sqrt(3), -1/sqrt(3), -1/sqrt(3)]) x22 = vector([1/sqrt(2), 0/sqrt(2), 1/sqrt(2)]) x33 = vector([0/sqrt(2), 1/sqrt(2), -1/sqrt(2)]) print print x11 print x22 print x33 print P = matrix([x11, x22, x33]) print P D = P.inverse()*A*P print print D 
       
[-3, 3, 3]

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

sqrt(3)
sqrt(2)
sqrt(2)

(1/3*sqrt(3), -1/3*sqrt(3), -1/3*sqrt(3))
(1/2*sqrt(2), 0, 1/2*sqrt(2))
(0, 1/2*sqrt(2), -1/2*sqrt(2))

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

[                                       1/9*(6*sqrt(2) +
sqrt(3))*sqrt(3) + 1/3*sqrt(2)*sqrt(3)                      
-1/6*(3*sqrt(2) - 2*sqrt(3))*sqrt(2) - 1/9*(6*sqrt(2) + sqrt(3))*sqrt(3)
1/6*(3*sqrt(2) - 2*sqrt(3))*sqrt(2) - 1/9*(6*sqrt(2) + sqrt(3))*sqrt(3)
+ 1/3*sqrt(2)*sqrt(3)]
[                      -1/6*(3*sqrt(2) + 2*sqrt(3))*sqrt(2) +
1/9*(6*sqrt(2) - sqrt(3))*sqrt(3)                                      
-1/9*(6*sqrt(2) - sqrt(3))*sqrt(3) - 1/3*sqrt(2)*sqrt(3) -1/6*(3*sqrt(2)
+ 2*sqrt(3))*sqrt(2) - 1/9*(6*sqrt(2) - sqrt(3))*sqrt(3) +
1/3*sqrt(2)*sqrt(3)]
[                                                     1/6*(3*sqrt(2) -
2*sqrt(3))*sqrt(2) - 1/3                                                
-1/6*(3*sqrt(2) + 2*sqrt(3))*sqrt(2) + 1/3                1/6*(3*sqrt(2)
- 2*sqrt(3))*sqrt(2) + 1/6*(3*sqrt(2) + 2*sqrt(3))*sqrt(2) + 1/3]
[-3, 3, 3]

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

sqrt(3)
sqrt(2)
sqrt(2)

(1/3*sqrt(3), -1/3*sqrt(3), -1/3*sqrt(3))
(1/2*sqrt(2), 0, 1/2*sqrt(2))
(0, 1/2*sqrt(2), -1/2*sqrt(2))

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

[                                       1/9*(6*sqrt(2) + sqrt(3))*sqrt(3) + 1/3*sqrt(2)*sqrt(3)                       -1/6*(3*sqrt(2) - 2*sqrt(3))*sqrt(2) - 1/9*(6*sqrt(2) + sqrt(3))*sqrt(3)  1/6*(3*sqrt(2) - 2*sqrt(3))*sqrt(2) - 1/9*(6*sqrt(2) + sqrt(3))*sqrt(3) + 1/3*sqrt(2)*sqrt(3)]
[                      -1/6*(3*sqrt(2) + 2*sqrt(3))*sqrt(2) + 1/9*(6*sqrt(2) - sqrt(3))*sqrt(3)                                       -1/9*(6*sqrt(2) - sqrt(3))*sqrt(3) - 1/3*sqrt(2)*sqrt(3) -1/6*(3*sqrt(2) + 2*sqrt(3))*sqrt(2) - 1/9*(6*sqrt(2) - sqrt(3))*sqrt(3) + 1/3*sqrt(2)*sqrt(3)]
[                                                     1/6*(3*sqrt(2) - 2*sqrt(3))*sqrt(2) - 1/3                                                     -1/6*(3*sqrt(2) + 2*sqrt(3))*sqrt(2) + 1/3                1/6*(3*sqrt(2) - 2*sqrt(3))*sqrt(2) + 1/6*(3*sqrt(2) + 2*sqrt(3))*sqrt(2) + 1/3]