How do you multiply ((2, 1, 0, 0), (3, 4, 2, 1), (-1, 0, 0, 1), (0, 1, 0, 0)) and ((1, 0, 0, 0), (0, 0, 1, 1), (1, 1, -1, 0), (1, 2, 3, 0))?

1 Answer
Jun 2, 2016

((2, 1, 0, 0),(3, 4, 2, 1), (-1, 0, 0, 1), (0, 1, 0, 0))*((1,0,0,0),(0,0,1,1),(1,1,-1,0),(1,2,3,0))=((2, 0, 1, 1),(6, 4, 5, 4),(0, 2, 3, 0), (0, 0, 1, 1)).

Explanation:

The matrix multiplication is done raws by column. An example is better than thousand words.

Consider the first raw of the first matrix (2,1,0,0) and the first column of the second matrix
((1),(0), (1), (1))

we multiply them element by element and we sum everything

2*1+1*0+0*1+0*1 = 2
This is the first element of our final matrix.
Now we repeat the same for each raw of the first matrix and each column of the second matrix.

2*0+1*0+0*1+0*2=0 (first raw, second column)
2*0+1*1+0*(-1)+0*3=1 (first raw, third column)
2*0+1*1+0*0+0*0=1 (first raw, fourth column)

Then the first raw of the final matrix will read (2, 0, 1, 1)

Second raw

3*1 +4*0 +2*1 +1*1=6 (second raw, first column)
3*0 +4*0 +2*1 1*2=4 (second raw, second column)
3*0 +4*1 +2*(-1) +1*3=5 (second raw, third column)
3*0 +4*1 +2*0 +1*0=4 (second raw, fourth column)

The second raw of the final matrix will read (6, 4, 5, 4)

Third raw

-1*1+ 0*0+ 0*1+ 1*1 = 0 (third raw, first column)
-1*0+ 0*0+ 0*1+ 1*2 = 2 (third raw, second column)
-1*0+ 0*1+ 0*(-1)+ 1*3 = 3 (third raw, third column)
-1*0+ 0*1+ 0*0+ 1*0 = 0 (third raw, fourth column)

The third raw of the final matrix will read (0, 2, 3, 0)

Fourth raw

0*1+ 1*0+ 0*1+ 0*1 =0 (fourth raw, first column)
0*0+ 1*0+ 0*1+ 0*2 =0 (fourth raw, second column)
0*0+ 1*1+ 0*(-1)+ 0*3 =1 (fourth raw, third column)
0*0+ 1*1+ 0*0+ 0*0 =1 (fourth raw, fourth column)

The fourth raw of the final matrix will read (0, 0, 1, 1).

The product is then

((2, 1, 0, 0),(3, 4, 2, 1), (-1, 0, 0, 1), (0, 1, 0, 0))*((1,0,0,0),(0,0,1,1),(1,1,-1,0),(1,2,3,0))=((2, 0, 1, 1),(6, 4, 5, 4),(0, 2, 3, 0), (0, 0, 1, 1)).