{{indexmenu_n>999}} ====== Mul ====== ### You can multiply matrices with numbers or with other matrices. The latter is implemented as matrix multiplication ### ===== Example ===== ==== Input ==== A = Matrix.New({{1,2},{3,4},{5,6}}) B = Matrix.New({{1,2},{3,4}}) C = A*B D = 2*B E = B*2 print(C) print(D) print(E) ==== Result ==== { { 7 , 10 } , { 15 , 22 } , { 23 , 34 } } { { 2 , 4 } , { 6 , 8 } } { { 2 , 4 } , { 6 , 8 } } ===== Table of contents ===== {{indexmenu>..:#2|tsort}}
A = Matrix.New({{1,2},{3,4},{5,6}}) B = Matrix.New({{1,2},{3,4}}) C = A*B D = 2*B E = B*2 print(C) print(D) print(E)