[Final] Chapter 8 Problem 7 solved by 이나을 revised by 백지원 finalized by 강민혁+이나을

2016 days ago by math2013

A=matrix(QQ, 2,2, [-3,6,6,-3]) x1 = vector([-2, 2]) z1 = x1 / x1.norm() x2 = vector([5,5]) z2 = x2 / x2.norm() P = column_matrix([z1, z2]) print "Matrix P : " print P print print "Matrix D : " print P.transpose() * A * P 
       
Matrix P : 
[-1/2*sqrt(2)  1/2*sqrt(2)]
[ 1/2*sqrt(2)  1/2*sqrt(2)]

Matrix D : 
[-9  0]
[ 0  3]
Matrix P : 
[-1/2*sqrt(2)  1/2*sqrt(2)]
[ 1/2*sqrt(2)  1/2*sqrt(2)]

Matrix D : 
[-9  0]
[ 0  3]
A=matrix(QQ,2,2,[-3,6,6,-3]) print A.eigenvalues() print A.eigenvectors_right() 
       
[3, -9]
[(3, [
(1, 1)
], 1), (-9, [
(1, -1)
], 1)]
[3, -9]
[(3, [
(1, 1)
], 1), (-9, [
(1, -1)
], 1)]
A=matrix(QQ, 2,2, [7,2,2,4]) x1 = vector([2, 1]) z1 = x1 / x1.norm() x2 = vector([1,-2]) z2 = x2 / x2.norm() P = column_matrix([z1, z2]) print "Matrix P : " print P print print "Matrix D : " print P.transpose() * A * P 
       
Matrix P : 
[ 2/5*sqrt(5)  1/5*sqrt(5)]
[ 1/5*sqrt(5) -2/5*sqrt(5)]

Matrix D : 
[8 0]
[0 3]
Matrix P : 
[ 2/5*sqrt(5)  1/5*sqrt(5)]
[ 1/5*sqrt(5) -2/5*sqrt(5)]

Matrix D : 
[8 0]
[0 3]
A=matrix(QQ,2,2,[7,2,2,4]) print A.eigenvalues() print A.eigenvectors_right() 
       
[8, 3]
[(8, [
(1, 1/2)
], 1), (3, [
(1, -2)
], 1)]
[8, 3]
[(8, [
(1, 1/2)
], 1), (3, [
(1, -2)
], 1)]