print "Matrix Multiplication is not commutative"

var('A,B')  #initializing two matrices
A=matrix([[9,3],[-2,0]])
B=matrix([[1,-4],[2,5]])
print A
print B
print A*B   # multipling A and B in this order
print B*A   # multipling B and A in this order

Kreyszig-6.2-4 (last edited 2010-12-17 10:47:57 by jejiramchand)