ch7 exercises3

376 days ago by ghkdgnf

A=matrix(ZZ, 1, 5, [1,2,3,4,5]) A.right_nullity()#해공간의 차원 = nullity(A)=4 A.right_kernel() x1=vector([1,0,0,0,-1]) x2=vector([0,1,0,2,-2]) x3=vector([0,0,1,3,-3]) x4=vector([0,0,0,5,-4]) C=matrix([x1,x2,x3,x4]) print C.rref() 
       
[   1    0    0    0   -1]
[   0    1    0    0 -2/5]
[   0    0    1    0 -3/5]
[   0    0    0    1 -4/5]
[   1    0    0    0   -1]
[   0    1    0    0 -2/5]
[   0    0    1    0 -3/5]
[   0    0    0    1 -4/5]
x1=vector([-2,1,0,0,0]) x2=vector([-3,0,1,0,0]) x3=vector([-4,0,0,1,0]) x4=vector([-5,0,0,0,1]) B=matrix([x1,x2,x3,x4]) print B.rref() 
       
[   1    0    0    0 -1/5]
[   0    1    0    0 -2/5]
[   0    0    1    0 -3/5]
[   0    0    0    1 -4/5]
[   1    0    0    0 -1/5]
[   0    1    0    0 -2/5]
[   0    0    1    0 -3/5]
[   0    0    0    1 -4/5]