# If AB and BA are defined then A and B are square
a=matrix([[1,2,],[1,3]])
print a
b=matrix([[2,3],[2,4]])
print b
print a*b
print b*a
c=matrix([[1,2],[1,4],[1,6]])
print c
print a*c
#matrix multiplication is possible when number of columns first matrix is equal to second matrix rows.
# In the above example A have 2x2 and C has 3x2 t 

  

Strang-1.4-40 B)-U (last edited 2010-12-17 11:33:09 by sree123)