How do you multiply ((-2, -5, 3), (3, -1, 2), (1, 4, -2)) with ((1, 4, 3), (-3, -3, 2), (-2, -1, -2))?
1 Answer
The formal definition of matrix multiplication is:
c_(ik) = sum_(i,j,k) a_(ij)b_(jk) where
a,b,c are entries in the matricesA,B,C , respectively, andAB = C . That means ifA isI xx J andB isJ xx K , thenC isI xx K .
Let the first and second indices indicate the row and column, respectively, for matrices
If you take the sum of the dot products of a GIVEN row
That means:
- Multiply row 1 in
A with column 1 inB . This entry goes inc_(11) . - Multiply row 1 in
A with column 2 inB . This entry goes inc_(12) . - Multiply row 1 in
A with column 3 inB . This entry goes inc_(13) . - Multiply row 2 in
A with column 1 inB . This entry goes inc_(21) . - Multiply row 2 in
A with column 2 inB . This entry goes inc_(22) . - Multiply row 2 in
A with column 3 inB . This entry goes inc_(23) . - Multiply row 3 in
A with column 1 inB . This entry goes inc_(31) . - Multiply row 3 in
A with column 2 inB . This entry goes inc_(32) . - Multiply row 3 in
A with column 3 inB . This entry goes inc_(33) .
This gives another
color(blue)(C) = AB
= [(-2, -5, 3), (3, -1, 2), (1, 4, -2)]xx[(1, 4, 3), (-3, -3, 2), (-2, -1, -2)]
[(sum_j a_(1j)b_(j1),sum_j a_(1j)b_(j2),sum_j a_(1j)b_(j3)),(sum_j a_(2j)b_(j1),sum_j a_(2j)b_(j2),sum_j a_(2j)b_(j3)),(sum_j a_(3j)b_(j1),sum_j a_(3j)b_(j2),sum_j a_(3j)b_(j3))]
[(-2*1 - 5*-3 - 3*2,-2*4-5*-3-1*3,-2*3-5*2-3*2),(3*1-1*-3-2*2,3*4-1*-3-1*2,3*3-1*2-2*2),(1*1-4*3-2*-2,1*4-3*4-1*-2,1*3+2*4-2*-2)]
[(-2 + 15 - 6,-8 + 15 - 3,-6 - 10 - 6),(3 + 3 - 4,12 + 3 - 2,9-2-4),(1 - 12 + 4,4 - 12 + 2,3 + 8 + 4)]
color(blue)([(7,4,-22),(2,13,3),(-7,-6,15)])