A = Matrix([[3,0,2,2],[-6,42,24,54],[21,-21,0,-15]])
print A
A = Matrix([[3,0,2,2],[-6,42,24,54],[21,-21,0,-15]])
cols=A.columns()
print cols
mult1=cols[0].cross_product(cols[1])
print mult1
mult1!=(0,0,0)
print "Rank is at least 2"
mult2=cols[1].cross_product(cols[2])
print mult2
mult2*(-3/2)
mult2*(-3/2)==mult1
These 3 vectors r linearly dependent
Therefore rank is 2

SageDays/Kreyszig-PageNo-334-Example1 -S (last edited 2010-12-16 12:16:53 by 172)