이반석

2043 days ago by math2013

A=matrix(QQ,3,3,[1,0,-1,0,1,2,2,1,2]) 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() 
       
λ= [2, 1, 1]
2 have 1 algebraic multiplicity.
1 have 2 algebraic multiplicity.
[(2, [
(1, -2, -1)
], 1), (1, [
(1, -2, 0)
], 2)]
λ= [2, 1, 1]
2 have 1 algebraic multiplicity.
1 have 2 algebraic multiplicity.
[(2, [
(1, -2, -1)
], 1), (1, [
(1, -2, 0)
], 2)]