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
Dec 26, 2016

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 matrices #A,B,C#, respectively, and #AB = C#. That means if #A# is #I xx J# and #B# is #J xx K#, then #C# is #I xx K#.

Let the first and second indices indicate the row and column, respectively, for matrices #A# and #B# (i.e., we are in row major).

If you take the sum of the dot products of a GIVEN row #bb(i)# in #bb(A)# with each column in #bb(B)#, for EACH #i#, that's matrix multiplication.

That means:

  1. Multiply row 1 in #A# with column 1 in #B#. This entry goes in #c_(11)#.
  2. Multiply row 1 in #A# with column 2 in #B#. This entry goes in #c_(12)#.
  3. Multiply row 1 in #A# with column 3 in #B#. This entry goes in #c_(13)#.
  4. Multiply row 2 in #A# with column 1 in #B#. This entry goes in #c_(21)#.
  5. Multiply row 2 in #A# with column 2 in #B#. This entry goes in #c_(22)#.
  6. Multiply row 2 in #A# with column 3 in #B#. This entry goes in #c_(23)#.
  7. Multiply row 3 in #A# with column 1 in #B#. This entry goes in #c_(31)#.
  8. Multiply row 3 in #A# with column 2 in #B#. This entry goes in #c_(32)#.
  9. Multiply row 3 in #A# with column 3 in #B#. This entry goes in #c_(33)#.

This gives another #3xx3# matrix #C#:

#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)])#