ch.8 Problem.10

383 days ago by g1.kjiwon

A=matrix(2, 2, [1, -1, -1, 1]) print A.eigenvalues() 
       
[2, 0]
[2, 0]
print A.eigenvectors_right() 
       
[(2, [
(1, -1)
], 1), (0, [
(1, 1)
], 1)]
[(2, [
(1, -1)
], 1), (0, [
(1, 1)
], 1)]
G=matrix([[1, -1], [1, 1]]) # Constructing a matrix whose columns are eigenvectors P=matrix([1/G.row(j).norm()*G.row(j) for j in range(0,2)]) # Normalizing the row vectors (The orthogonality follows from the # fact that the eigenvalues are distinct) P=P.transpose() # Constructing a matrix whose columns are # orthonormal eigenvectors print P 
       
[ 1/2*sqrt(2)  1/2*sqrt(2)]
[-1/2*sqrt(2)  1/2*sqrt(2)]
[ 1/2*sqrt(2)  1/2*sqrt(2)]
[-1/2*sqrt(2)  1/2*sqrt(2)]