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.

It is always suspect with a very late answer to a popular question, but I came here looking for what a compatible block partitioning is and did not find it:
For $\mathbf{AB}$ to work by blocks the important part is that the partition along the columns of $\mathbf A$ must match the partition along the rows of $\mathbf{B}$. This is analogous to how, when doing $\mathbf{AB}$ without blocks—which is of course just a partitioning into $1\times 1$ blocks—the number of columns in $\mathbf A$ must match the number of rows in $\mathbf B$.
Example: Let $\mathbf{M}_{mn}$ denote any matrix of $m$ rows and $n$ columns irrespective of contents. We know that $\mathbf{M}_{mn}\mathbf{M}_{nq}$ works and yields a matrix $\mathbf{M}_{mq}$. Split $\mathbf A$ by columns into a block of size $a$ and a block of size $b$, and do the same with $\mathbf B$ by rows. Then split $\mathbf A$ however you wish along its rows, same for $\mathbf B$ along its columns. Now we have
$$
A = \begin{bmatrix}
    \mathbf{M}_{ra} & \mathbf{M}_{rb} \\
    \mathbf{M}_{sa} & \mathbf{M}_{sb}
  \end{bmatrix}, 
B = \begin{bmatrix}
    \mathbf{M}_{at} & \mathbf{M}_{au} \\
    \mathbf{M}_{bt} & \mathbf{M}_{bu}
  \end{bmatrix},
$$
and
$$
AB = \begin{bmatrix}
    \mathbf{M}_{ra}\mathbf{M}_{at} + \mathbf{M}_{rb}\mathbf{M}_{bt}
& \mathbf{M}_{ra}\mathbf{M}_{au} + \mathbf{M}_{rb}\mathbf{M}_{bu} \\
    \mathbf{M}_{sa}\mathbf{M}_{at} + \mathbf{M}_{sb}\mathbf{M}_{bt} 
& \mathbf{M}_{sa}\mathbf{M}_{au} + \mathbf{M}_{sb}\mathbf{M}_{bu}
  \end{bmatrix}
=
\begin{bmatrix}
    \mathbf{M}_{rt} & \mathbf{M}_{ru} \\
    \mathbf{M}_{st} & \mathbf{M}_{su}
  \end{bmatrix}.
$$
All multiplications conform, all sums work out, and the resulting matrix is the size you'd expect. There is nothing special about splitting in two so long as you match any column split of $\mathbf A$ with a row split in $\mathbf B$ (try removing a block row from $\mathbf A$ or further splitting a block column of $\mathbf B$).
The nonworking example from the accepted answer is nonworking because the columns of $\mathbf A$ are split into $(1, 2)$ while the rows of $\mathbf B$ are split into $(2, 1)$.
