ch.10 problem.3-8

318 days ago by g1.kjiwon

A=matrix(QQ, [[1,2,3,4], [5,6,7,8], [9,8,7,6],[5,4,3,2]]) print "f_A(x) = ", A.charpoly() # characteristic equation of A 
       
f_A(x) =  x^4 - 16*x^3 - 80*x^2
f_A(x) =  x^4 - 16*x^3 - 80*x^2
print solve(x^4 - 16*x^3 - 80*x^2==0, x) 
       
[
x == 20,
x == -4,
x == 0
]
[
x == 20,
x == -4,
x == 0
]
print A.eigenvalues() # eigenvalues of A 
       
[20, -4, 0, 0]
[20, -4, 0, 0]
print (0-A).rank() print print ((0-A)^2).rank() 
       
2

2
2

2
J=A.jordan_form() print J 
       
[20| 0| 0| 0]
[--+--+--+--]
[ 0|-4| 0| 0]
[--+--+--+--]
[ 0| 0| 0| 0]
[--+--+--+--]
[ 0| 0| 0| 0]
[20| 0| 0| 0]
[--+--+--+--]
[ 0|-4| 0| 0]
[--+--+--+--]
[ 0| 0| 0| 0]
[--+--+--+--]
[ 0| 0| 0| 0]