A1=matrix([[1],[4],[2]])
print A1
A2=matrix([[2,-1,2]])
print A2
A=A1*A2
print A
A.det()
U=matrix([[4,4,8,8],[0,1,2,2],[0,0,2,6],[0,0,0,2]])
print U
print U.det()
U1=U.transpose()
print U1
print U1.det()
U2=U.inverse()
print U2
print U2.det()
M=matrix([[0,0,0,2],[0,0,2,6],[0,1,2,2],[4,4,8,8]])
print M
M.swap_rows(0,3)
print M
M.swap_rows(2,1)
print M.det()

Strang-4.2 5-U (last edited 2010-12-18 07:21:34 by pratyureepu)