Multiply the Matrices
Problem
[[−6,−1,−3,−6,−1,9],[2,−1,4,3,−7,1],[0,2,−7,−9,6,−21/3],[−9/3,2,−18/3,−33/3,−18/3,0],[−21/3,−3/3,15/3,−15/3,39/3,−12/3],[3/3,−15/3,−27/3,18/3,−3/3,15/3]]*[[−1,2,−1,1,−1,2],[−7,2,−7,0,−2,5],[3,3,−3,0,−1,7],[7,2,7,−3,0,−3],[3,−1,4,5,2,−4],[−2,−9,12,2,0,2]]
Solution
Simplify the fractions within the first matrix to make calculations easier.
A=[[−6,−1,−3,−6,−1,9],[2,−1,4,3,−7,1],[0,2,−7,−9,6,−7],[−3,2,−6,−11,−6,0],[−7,−1,5,−5,13,−4],[1,−5,−9,6,−1,5]]
Identify the second matrix as B
B=[[−1,2,−1,1,−1,2],[−7,2,−7,0,−2,5],[3,3,−3,0,−1,7],[7,2,7,−3,0,−3],[3,−1,4,5,2,−4],[−2,−9,12,2,0,2]]
Calculate the product C=A*B using the dot product of rows of A and columns of B For example, the first element (c_11) is:
(c_11)=(−6)*(−1)+(−1)*(−7)+(−3)*(3)+(−6)*(7)+(−1)*(3)+(9)*(−2)=6+7−9−42−3−18=−59
Compute all remaining elements (c_i*j) following the same row-by-column summation rule.
(c_12)=−12−2−9−12+1−81=−115
(c_13)=6+7+9−42−4+108=84
(c_14)=−6+0+0+18−5+18=25
(c_15)=6+2+3+0−2+0=9
(c_16)=−12−5−21+18+4+18=2
Continue the process for all rows to fill the 6×6 resulting matrix.
Final Answer
[[−6,−1,−3,−6,−1,9],[2,−1,4,3,−7,1],[0,2,−7,−9,6,−7],[−3,2,−6,−11,−6,0],[−7,−1,5,−5,13,−4],[1,−5,−9,6,−1,5]]*[[−1,2,−1,1,−1,2],[−7,2,−7,0,−2,5],[3,3,−3,0,−1,7],[7,2,7,−3,0,−3],[3,−1,4,5,2,−4],[−2,−9,12,2,0,2]]=[[−59,−115,84,25,9,2],[1,−10,49,−31,−14,52],[−85,−3,−161,43,11,−37],[−124,−26,−115,0,5,−11],[10,−1,111,−10,30,−44],[104,−79,160,−12,16,−119]]
Want more problems? Check here!