How do you multiply ABC if A=((3, 10), (1, 2)), B=((1, 0, 4), (2, -1, 5)), C=((3), (1), (1))?

Apr 20, 2016

Multiply the matrices in order by grouping either $A \left(B C\right)$ or $\left(A B\right) C$ to find
$A B C = \left(\begin{matrix}121 \\ 27\end{matrix}\right)$

Explanation:

Matrices are multiplied by summing the products of the corresponding elements of the rows of the first matrix with the columns of the second. To do this, the first matrix must have the same number of columns as the second matrix has rows. This is often stated as having the same "inner" dimensions. In other words, the matrices must have sizes $m \times k$ and $k \times n$. The resulting matrix has dimensions $m \times n$.

To multiply more than two matrices, as in this example, one just needs to pick two and do the multiplication and then multiply that result by the third. It doesn't matter which 2 we choose so long as we keep the order the same - i.e. either of the following is valid:

$A \left(B C\right) = \left(A B\right) C$

To make this choice, it is good to think about what the dimensions of the results would be! For example, if we multiply $\left(A B\right)$ first

$s i z e \left(A B\right) = s i z e \left(\left(\textcolor{red}{2} \times 2\right) \cdot \left(2 \times \textcolor{red}{3}\right)\right) = \textcolor{red}{2 \times 3}$

Whereas

$s i z e \left(B C\right) = s i z e \left(\left(\textcolor{m a \ge n t a}{2} \times 3\right) \cdot \left(3 \times \textcolor{m a \ge n t a}{1}\right)\right) = \textcolor{m a \ge n t a}{2 \times 1}$

so to save some work, we should do the multiplication of $B C$ first!

$B C = \left(\begin{matrix}1 & 0 & 4 \\ 2 & - 1 & 5\end{matrix}\right) \cdot \left(\begin{matrix}3 \\ 1 \\ 1\end{matrix}\right) = \left(\begin{matrix}1 \cdot 3 + 0 \cdot 1 + 4 \cdot 1 \\ 2 \cdot 3 - 1 \cdot 1 + 5 \cdot 1\end{matrix}\right) = \left(\begin{matrix}7 \\ 10\end{matrix}\right)$

Now we continue by multiplying by $A$ by $B C$

$A \cdot \left(B C\right) = \left(\begin{matrix}3 & 10 \\ 1 & 2\end{matrix}\right) \cdot \left(\begin{matrix}7 \\ 10\end{matrix}\right) = \left(\begin{matrix}3 \cdot 7 + 10 \cdot 10 \\ 1 \cdot 7 + 2 \cdot 10\end{matrix}\right) = \left(\begin{matrix}121 \\ 27\end{matrix}\right)$