Matrix/scalar multiplication is also analogous to vector/scalar multiplication, but matrix/matrix multiplication is somewhat more complicated. The greatest difficulty students have with matrix multiplication is that it can be a long process and therefore tedious. Since lots of arithmetic has to be done, there are ample opportunities to make simple mistakes. The process itself is straightforward. Take an
![](../../Assets/Images/Img278.png)
matrix
![](../../Assets/Images/Img279.png)
which represents the product of an
![](../../Assets/Images/Img280.png)
matrix
![](../../Assets/Images/Img281.png)
with a
![](../../Assets/Images/Img282.png)
matrix
![](../../Assets/Images/Img283.png)
. An entry
![](../../Assets/Images/Img284.png)
is the dot product of the
![](../../Assets/Images/Img285.png)
th row of
![](../../Assets/Images/Img286.png)
(
![](../../Assets/Images/Img287.png)
) with the
![](../../Assets/Images/Img288.png)
th column of
![](../../Assets/Images/Img289.png)
(
![](../../Assets/Images/Img290.png)
). Using this definition iteratively for all the
![](../../Assets/Images/Img291.png)
rows of
![](../../Assets/Images/Img292.png)
and all the
![](../../Assets/Images/Img293.png)
columns of
![](../../Assets/Images/Img294.png)
will generate
![](../../Assets/Images/Img295.png)
. This definition constrains the resulting dimensions of
![](../../Assets/Images/Img296.png)
. Since the dot product is used, the number of columns in
![](../../Assets/Images/Img297.png)
must equal the number of rows in
![](../../Assets/Images/Img298.png)
so that the dotted vectors will have equal dimensions (in this case, both are equal to
![](../../Assets/Images/Img299.png)
). Also,
![](../../Assets/Images/Img300.png)
will have the same number of rows as
![](../../Assets/Images/Img301.png)
(
![](../../Assets/Images/Img302.png)
) and the same number of columns as
![](../../Assets/Images/Img303.png)
(
![](../../Assets/Images/Img304.png)
). This is easy to remember:
Additionally, matrix multiplication is
not commutative:
The reason is obvious when one looks back at the original definition. It is, however, both associative and distributive:
Excercise 3-2. For each of the following matrix pairs, state whether or not the multiplication is possible (do not perform the multiplication). If the multiplication is valid, state the resulting dimensions:
Valid (since
![](../../Assets/Images/Img310.png)
and
![](../../Assets/Images/Img311.png)
, Product Dimension:
![](../../Assets/Images/Img312.png)
)
Invalid (since
![](../../Assets/Images/Img314.png)
and
![](../../Assets/Images/Img315.png)
)
Valid (since
![](../../Assets/Images/Img317.png)
and
![](../../Assets/Images/Img318.png)
, Product Dimension:
![](../../Assets/Images/Img319.png)
)
Invalid (since
![](../../Assets/Images/Img321.png)
and
![](../../Assets/Images/Img322.png)
)