A=matrix([[2,3,1],[1,-2,1],[-1,0,-2]])
B = A.with_rescaled_row(0, 3)
B.add_multiple_of_row(1,0,-1)
r=A.det()
e=B.det()
r
e