Ch-7-Prob-4-New-권의회

1874 days ago by matrix

A=matrix(2,4,[[4,-1,-2,3],[1,2,3,1]]) print A print A.rref() print "A.rank()=",A.rank() print "A.right_nullity()=",A.right_nullity() 
       
[ 4 -1 -2  3]
[ 1  2  3  1]
[   1    0 -1/9  7/9]
[   0    1 14/9  1/9]
A.rank()= 2
A.right_nullity()= 2
[ 4 -1 -2  3]
[ 1  2  3  1]
[   1    0 -1/9  7/9]
[   0    1 14/9  1/9]
A.rank()= 2
A.right_nullity()= 2
A=matrix(4,5,[[3,1,2,3,1],[1,0,0,3,4],[4,1,5,2,1],[2,0,0,2,3]]) print A print A.rref() print "A.rank()=",A.rank() print "A.right_nullity()=",A.right_nullity() 
       
[3 1 2 3 1]
[1 0 0 3 4]
[4 1 5 2 1]
[2 0 0 2 3]
[    1     0     0     0   1/4]
[    0     1     0     0 -25/6]
[    0     0     1     0   1/3]
[    0     0     0     1   5/4]
A.rank()= 4
A.right_nullity()= 1
[3 1 2 3 1]
[1 0 0 3 4]
[4 1 5 2 1]
[2 0 0 2 3]
[    1     0     0     0   1/4]
[    0     1     0     0 -25/6]
[    0     0     1     0   1/3]
[    0     0     0     1   5/4]
A.rank()= 4
A.right_nullity()= 1