Ch3-Prob-1-Final-이승진

1916 days ago by matrix

A = matrix(QQ,[[1,3],[4,-1]]) B = matrix(QQ,[[-1,2,5],[1,-1,4]]) C = matrix(QQ,[[1,0],[2,-1],[3,2]]) print "A(BC)=" print A*(B*C) print print "(AB)C=" print (A*B)*C 
       
A(BC)=
[51 35]
[61 23]

(AB)C=
[51 35]
[61 23]
A(BC)=
[51 35]
[61 23]

(AB)C=
[51 35]
[61 23]