(new book)Ch-3-exam-11-New-황성빈

1900 days ago by matrix

A=matrix(4,5,[2,-2,-4,-2,2,2,-1,-3,-3,2,-2,2,5,1,-3,2,-2,-4,-1,5]) b=vector([2,3,-1,2]) print A.augment(b).rref(A) 
       
[1 0 0 0 9 3]
[0 1 0 0 1 0]
[0 0 1 0 2 1]
[0 0 0 1 3 0]
[1 0 0 0 9 3]
[0 1 0 0 1 0]
[0 0 1 0 2 1]
[0 0 0 1 3 0]
A=matrix(4,5,[4,0,1,1,10,2,4,1,6,1,2,4,2,4,1,2,-4,-1,0,5]) print A.rref() 
       
[   1    0    0    0  7/2]
[   0    1    0    0  7/6]
[   0    0    1    0 -8/3]
[   0    0    0    1 -4/3]
[   1    0    0    0  7/2]
[   0    1    0    0  7/6]
[   0    0    1    0 -8/3]
[   0    0    0    1 -4/3]