block matrix multiplication

If $A,B$ are $2 \times 2$ matrices of real or complex numbers, then

$$AB = \left[ \begin{array}{cc} a_{11} & a_{12} \\ a_{21} & a_{22} \end{array} \right]\cdot \left[ \begin{array}{cc} b_{11} & b_{12} \\ b_{21} & b_{22} \end{array} \right] = \left[ \begin{array}{cc} a_{11}b_{11}+a_{12}b_{21} & a_{11}b_{12}+a_{12}b_{22} \\ a_{21}b_{11}+a_{22}b_{21} & a_{22}b_{12}+a_{22}b_{22} \end{array} \right]$$

What if the entries $a_{ij}, b_{ij}$ are themselves $2 \times 2$ matrices? Does matrix multiplication hold in some sort of "block" form ?

$$AB = \left[ \begin{array}{c|c} A_{11} & A_{12} \\\hline A_{21} & A_{22} \end{array} \right]\cdot \left[ \begin{array}{c|c} B_{11} & B_{12} \\\hline B_{21} & B_{22} \end{array} \right] = \left[ \begin{array}{c|c} A_{11}B_{11}+A_{12}B_{21} & A_{11}B_{12}+A_{12}B_{22} \\\hline A_{21}B_{11}+A_{22}B_{21} & A_{22}B_{12}+A_{22}B_{22} \end{array} \right]$$ This identity would be very useful in my research.

• Yes it does if the "blocking" is "conforming". – Algebraic Pavel May 9 '14 at 14:12
• Yes. (The blocking is "confirming" in the situation you have given.) Discussed in detail in §6.12 of cip.ifi.lmu.de/~grinberg/primes2015/sols.pdf (specifically Exercise 38 and Remark 6.73; search for "block-matrix notation" if these numbers change). – darij grinberg Dec 4 '15 at 10:16

1 Answer

It depends on how you partition it, not all partitions work. For example, if you partition these two matrices

$$\begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}, \begin{bmatrix} a' & b' & c' \\ d' & e' & f' \\ g' & h' & i' \end{bmatrix}$$

in this way

$$\left[\begin{array}{c|cc}a&b&c\\ d&e&f\\ \hline g&h&i \end{array}\right], \left[\begin{array}{c|cc}a'&b'&c'\\ d'&e'&f'\\ \hline g'&h'&i' \end{array}\right]$$

and then multiply them, it won't work. But this would

$$\left[\begin{array}{c|cc}a&b&c\\ \hline d&e&f\\ g&h&i \end{array}\right] ,\left[\begin{array}{c|cc}a'&b'&c'\\ \hline d'&e'&f'\\ g'&h'&i' \end{array}\right]$$

What's the difference? Well, in the first case, all submatrix products are not defined, like $\begin{bmatrix} a \\ d \\ \end{bmatrix}$ cannot be multiplied with $\begin{bmatrix} a' \\ d' \\ \end{bmatrix}$

So, what is the general rule? (Taken entirely from the Wiki page on Block matrix)

Given, an $(m \times p)$ matrix $\mathbf{A}$ with $q$ row partitions and $s$ column partitions $$\begin{bmatrix} \mathbf{A}_{11} & \mathbf{A}_{12} & \cdots &\mathbf{A}_{1s}\\ \mathbf{A}_{21} & \mathbf{A}_{22} & \cdots &\mathbf{A}_{2s}\\ \vdots & \vdots & \ddots &\vdots \\ \mathbf{A}_{q1} & \mathbf{A}_{q2} & \cdots &\mathbf{A}_{qs}\end{bmatrix}$$

and a $(p \times n)$ matrix $\mathbf{B}$ with $s$ row partitions and $r$ column parttions

$$\begin{bmatrix} \mathbf{B}_{11} & \mathbf{B}_{12} & \cdots &\mathbf{B}_{1r}\\ \mathbf{B}_{21} & \mathbf{B}_{22} & \cdots &\mathbf{B}_{2r}\\ \vdots & \vdots & \ddots &\vdots \\ \mathbf{B}_{s1} & \mathbf{B}_{s2} & \cdots &\mathbf{B}_{sr}\end{bmatrix}$$

that are compatible with the partitions of $\mathbf{A}$, the matrix product

$\mathbf{C}=\mathbf{A}\mathbf{B}$

can be formed blockwise, yielding $\mathbf{C}$ as an $(m\times n)$ matrix with $q$ row partitions and $r$ column partitions.

• Use \pmatrix{a&b&c\\d&e&f\\g&h&i} – Berci May 9 '14 at 14:37
• @Berci I know that. But getting those horizontal and vertical lines is the difficult part. – The very fluffy Panda May 9 '14 at 14:38
• @PandaBear You can use $\color{blue}{\text{colors}}$ :) – Algebraic Pavel May 9 '14 at 14:45
• @PavelJiranek Your comment is funny looking. – The very fluffy Panda May 9 '14 at 14:46
• I think this is wrong. You can't partition both of them same way. If you partition after x rows in first matrix , you've to partition after x columns (not rows ) in the second matrix. Otherwise while multiplying you'll have to multiply mn block with another mn block which is not possible. (you need np block) Try it with your example. – A Googler Oct 1 '15 at 18:08