4 Multiplying two 3 × 3 matrices

The definition of the product C = A B where A and B are two 3 × 3 matrices is as follows

C = a b c d e f g h i r s t u v w x y z = a r + b u + c x a s + b v + c y a t + b w + c z d r + e u + f x d s + e v + f y d t + e w + f z g r + h u + i x g s + h v + i y g t + h w + i z

This looks a rather daunting amount of algebra but in fact the construction of the matrix on the right-hand side is straightforward if we follow the simple rule from Key Point 4 that the element in the i th row and j th column of C is obtained by multiplying the i th row of A with the j th column of B .

For example, to obtain the element in row 2, column 3 of C we take row 2 of A : [ d , e , f ] and multiply it with column 3 of B in the usual way to produce [ d t + e w + f z ] .

By repeating this process we obtain every element of C .

Task!

Calculate A B = 1 2 1 3 4 0 1 5 2 2 1 3 1 2 1 0 3 2

First find the element in row 2 column 1 of the product:

Row 2 of A is ( 3 , 4 , 0 ) column 1 of B is 2 1 0

The combination required is 3 × 2 + 4 × 1 + ( 0 ) × ( 0 ) = 10 .

Now complete the multiplication to find all the elements of the matrix A B :

In full detail, the elements of A B are:

1 × 2 + 2 × 1 + ( 1 ) × 0 1 × ( 1 ) + 2 × ( 2 ) + ( 1 ) × 3 1 × 3 + 2 × 1 + ( 1 ) × ( 2 ) 3 × 2 + 4 × 1 + 0 × 0 3 × ( 1 ) + 4 × ( 2 ) + 0 × 3 3 × 3 + 4 × 1 + 0 × ( 2 ) 1 × 2 + 5 × 1 + ( 2 ) × 0 1 × ( 1 ) + 5 × ( 2 ) + ( 2 ) × 3 1 × 3 + 5 × 1 + ( 2 ) × ( 2 )

i.e. A B = 4 8 7 10 11 13 7 17 12

The 3 × 3 unit matrix is: I = 1 0 0 0 1 0 0 0 1   andas in the 2 × 2 case this has the property that    A I = I A = A

The 3 × 3 zero matrix is 0 0 0 0 0 0 0 0 0