## Linear Algebra and Its Applications, exercise 1.4.24

Exercise 1.4.24. The following matrices can be multiplied using block multiplication, with the indicated submatrices within the matrices multiplied together: $\begin{bmatrix} x&x&\vline&x \\ x&x&\vline&x \\ \hline x&x&\vline&x \end{bmatrix} \begin{bmatrix} x&x&\vline&x \\ x&x&\vline&x \\ \hline x&x&\vline&x \end{bmatrix} \quad \rm or \quad \begin{bmatrix} x&x&\vline&x&x \\ x&x&\vline&x&x \end{bmatrix} \begin{bmatrix} x&x \\ x&x \\ \hline x&x \\ x&x \end{bmatrix}$

1. Provide example matrices matching the templates above and use block multiplication to multiply them together.
2. Provide two example templates for multiplying a 3×4 matrix A and 4×2 matrix B using block multiplication.

Answer: (a) For the first example we multiply the following matrices using block multiplication on the indicated submatrices: $\begin{bmatrix} 1&2&\vline&3 \\ 2&1&\vline&2 \\ \hline 1&2&\vline&1 \end{bmatrix} \begin{bmatrix} 4&6&\vline&1 \\ 2&3&\vline&2 \\ \hline 1&5&\vline&3 \end{bmatrix}$

To do block multiplication we must multiply all submatrices that are capable of being multiplied, i.e., the number of columns in the first submatrix is equal to the number of columns rows in the second submatrix. We then take the product of each pair of submatrices, assign it a spot in the final product matrix, and sum the resulting matrices to get the answer.

In the above example we start by multiplying the upper left 2×2 submatrix in the first matrix with the upper left 2×2 submatrix in the second matrix: $\begin{bmatrix} 1&2&\vline& \\ 2&1&\vline& \\ \hline &&\vline& \end{bmatrix} \begin{bmatrix} 4&6&\vline& \\ 2&3&\vline& \\ \hline &&\vline& \end{bmatrix} = \begin{bmatrix} 8&12&\vline& \\ 10&15&\vline& \\ \hline &&\vline& \end{bmatrix}$

and then with the upper right 2×1 submatrix in the second matrix: $\begin{bmatrix} 1&2&\vline& \\ 2&1&\vline& \\ \hline &&\vline& \end{bmatrix} \begin{bmatrix} &&\vline&1 \\ &&\vline&2 \\ \hline &&\vline& \end{bmatrix} = \begin{bmatrix} &&\vline&5 \\ &&\vline&4 \\ \hline &&\vline& \end{bmatrix}$

We next multiply the 2×1 upper right submatrix in the first matrix with the 1×2 lower left submatrix in the second matrix: $\begin{bmatrix} &&\vline&3 \\ &&\vline&2 \\ \hline &&\vline& \end{bmatrix} \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline 1&5&\vline& \end{bmatrix} = \begin{bmatrix} 3&15&\vline& \\ 2&10&\vline& \\ \hline &&\vline& \end{bmatrix}$

and then with the 1×1 lower right submatrix in the second matrix: $\begin{bmatrix} &&\vline&3 \\ &&\vline&2 \\ \hline &&\vline& \end{bmatrix} \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline &&\vline&3 \end{bmatrix} = \begin{bmatrix} &&\vline&9 \\ &&\vline&6 \\ \hline &&\vline& \end{bmatrix}$

We next multiply the lower left 1×2 submatrix in the first matrix with the upper left 2×2 submatrix in the second matrix: $\begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline 1&2&\vline& \end{bmatrix} \begin{bmatrix} 4&6&\vline& \\ 2&3&\vline& \\ \hline &&\vline& \end{bmatrix} = \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline 8&12&\vline& \end{bmatrix}$

and then with the upper right 2×1 submatrix in the second matrix: $\begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline 1&2&\vline& \end{bmatrix} \begin{bmatrix} &&\vline&1 \\ &&\vline&2 \\ \hline &&\vline& \end{bmatrix} = \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline &&\vline&5 \end{bmatrix}$

Finally we multiple the 1×1 submatrix in the lower right of the first matrix with the 1×2 submatrix in the lower left of the second matrix: $\begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline &&\vline&1 \end{bmatrix} \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline 1&5&\vline& \end{bmatrix} = \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline 1&5&\vline& \end{bmatrix}$

and with the 1×1 submatrix in the lower right of the second matrix: $\begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline &&\vline&1 \end{bmatrix} \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline &&\vline&3 \end{bmatrix} = \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline &&\vline&3 \end{bmatrix}$

Then we add all of the resulting matrices together: $\begin{bmatrix} 8&12&\vline& \\ 10&15&\vline& \\ \hline &&\vline& \end{bmatrix} + \begin{bmatrix} &&\vline&5 \\ &&\vline&4 \\ \hline &&\vline& \end{bmatrix} + \begin{bmatrix} 3&15&\vline& \\ 2&10&\vline& \\ \hline &&\vline& \end{bmatrix}$ $+ \begin{bmatrix} &&\vline&9 \\ &&\vline&6 \\ \hline &&\vline& \end{bmatrix} + \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline 8&12&\vline& \end{bmatrix} + \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline &&\vline&5 \end{bmatrix}$ $+ \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline 1&5&\vline& \end{bmatrix} + \begin{bmatrix} &&\vline& \\ &&\vline& \\ \hline &&\vline&3 \end{bmatrix} = \begin{bmatrix} 11&27&\vline&14 \\ 12&25&\vline&10 \\ \hline 9&17&\vline&8 \end{bmatrix}$

and compare to the result of conventional matrix multiplication: $\begin{bmatrix} 1&2&3 \\ 2&1&2 \\ 1&2&1 \end{bmatrix} \begin{bmatrix} 4&6&1 \\ 2&3&2 \\ 1&5&3 \end{bmatrix} = \begin{bmatrix} 4+4+3&6+6+15&1+4+9 \\ 8+2+2&12+3+10&2+2+6 \\ 4+4+1&6+6+5&1+4+3 \end{bmatrix} = \begin{bmatrix} 11&27&14 \\ 12&25&10 \\ 9&17&8 \end{bmatrix}$

For the second example we multiply the following matrices using block multiplication on the indicated submatrices: $\begin{bmatrix} 1&2&\vline&4&2 \\ 3&4&\vline&3&5 \end{bmatrix} \begin{bmatrix} 3&5 \\ 1&2 \\ \hline 7&6 \\ 1&2 \end{bmatrix}$

We start by multiplying the left 2×2 submatrix in the first matrix with the upper 2×2 submatrix in the second matrix: $\begin{bmatrix} 1&2&\vline&& \\ 3&4&\vline&& \end{bmatrix} \begin{bmatrix} 3&5 \\ 1&2 \\ \hline & \\ & \end{bmatrix} = \begin{bmatrix} 5&9 \\ 13&23 \end{bmatrix}$

and then multiply the right 2×2 submatrix in the first matrix with the lower 2×2 submatrix in the second matrix: $\begin{bmatrix} &&\vline&4&2 \\ &&\vline&3&5 \end{bmatrix} \begin{bmatrix} & \\ & \\ \hline 7&6 \\ 1&2 \end{bmatrix} = \begin{bmatrix} 30&28 \\ 26&28 \end{bmatrix}$

Then we add the two resulting matrices together: $\begin{bmatrix} 5&9 \\ 13&23 \end{bmatrix} + \begin{bmatrix} 30&28 \\ 26&28 \end{bmatrix} = \begin{bmatrix} 35&37 \\ 39&51 \end{bmatrix}$

and compare to the result of conventional matrix multiplication: $\begin{bmatrix} 1&2&4&2 \\ 3&4&3&5 \end{bmatrix} \begin{bmatrix} 3&5 \\ 1&2 \\ 7&6 \\ 1&2 \end{bmatrix} = \begin{bmatrix} 3+2+28+2&5+4+24+4 \\ 9+4+21+5&15+8+18+10 \end{bmatrix} = \begin{bmatrix} 35&37 \\ 39&51 \end{bmatrix}$

(b) In multiplying a 3×4 matrix by a 4×2 matrix using block multiplication, one possible way to divide the matrices is as follows: $\begin{bmatrix} x&x&\vline&x&x \\ x&x&\vline&x&x \\ x&x&\vline&x&x \end{bmatrix} \begin{bmatrix} x&x \\ x&x \\ \hline x&x \\ x&x \end{bmatrix}$

This results in multiplying the left 3×2 submatrix of the first matrix by the upper 2×2 submatrix of the second matrix to produce a 3×2 matrix, and multiplying the right 3×2 submatrix of the first matrix by the lower 2×2 submatrix of the second matrix to produce a second 3×2 matrix. The two 3×2 matrices are then added to produce the final 3×2 product matrix.

Another slightly more complicated approach is as follows: $\begin{bmatrix} x&x&x&\vline&x \\ x&x&x&\vline&x \\ x&x&x&\vline&x \end{bmatrix} \begin{bmatrix} x&x \\ x&x \\ x&x \\ \hline x&x \end{bmatrix}$

This results in multiplying the left 3×3 submatrix of the first matrix by the upper 3×2 submatrix of the second matrix to produce a 3×2 matrix, and multiplying the right 3×1 submatrix of the first matrix by the lower 1×2 submatrix of the second matrix to produce a second 3×2 matrix. The two 3×2 matrices are then added to produce the final 3×2 product matrix.

NOTE: This continues a series of posts containing worked out exercises from the (out of print) book Linear Algebra and Its Applications, Third Edition by Gilbert Strang.

If you find these posts useful I encourage you to also check out the more current Linear Algebra and Its Applications, Fourth Edition , Dr Strang’s introductory textbook Introduction to Linear Algebra, Fourth Edition and the accompanying free online course, and Dr Strang’s other books .

This entry was posted in linear algebra. Bookmark the permalink.