ch8-exercise5_noh

329 days ago by kyunganoh

A=matrix(QQ,4,4,[1,2,3,4,1,2,3,4,1,2,3,4,1,2,3,4]) print "λ= "+str(A.eigenvalues()) ev=A.eigenvalues() temp=0 i=0 for sol in ev: if(sol != temp): i=ev.count(sol) print str(sol) + " have " + str(i) + " algebraic multiplicity." temp=sol A.eigenvectors_right() 
       
λ= [10, 0, 0, 0]
10 have 1 algebraic multiplicity.
0 have 3 algebraic multiplicity.
[(10, [
(1, 1, 1, 1)
], 1), (0, [
(1, 0, 0, -1/4),
(0, 1, 0, -1/2),
(0, 0, 1, -3/4)
], 3)]
λ= [10, 0, 0, 0]
10 have 1 algebraic multiplicity.
0 have 3 algebraic multiplicity.
[(10, [
(1, 1, 1, 1)
], 1), (0, [
(1, 0, 0, -1/4),
(0, 1, 0, -1/2),
(0, 0, 1, -3/4)
], 3)]