From Scalar Entries to Block Entries
Partitioning a matrix can expose its structure, but a partition does not change the underlying matrix product. Each entry of the product is still obtained by multiplying a row by a column and adding the results. When the partitions line up, those same calculations can be collected into smaller matrix products: each block of the answer is a sum of products of blocks. The essential discipline is to check that every block product is dimensionally defined before calculating it.
Suppose \(\mathbf{A}\) has \(m\) rows and \(n\) columns, and \(\mathbf{B}\) has \(n\) rows and \(p\) columns. Thus \(\mathbf{A}\mathbf{B}\) is defined. A partition divides rows or columns into consecutive groups, producing blocks. For block multiplication, the column groups of \(\mathbf{A}\) must have the same sizes as the row groups of \(\mathbf{B}\), in the same order. These matching groups are the shared dimension along which the products are summed.
If the row groups of \(\mathbf{A}\) have sizes \(s_1,\dots,s_q\) and the column groups of \(\mathbf{B}\) have sizes \(t_1,\dots,t_u\), the product is arranged in \(q\) block rows and \(u\) block columns. Its block in position \((i,\ell)\) has size \(s_i\times t_\ell\).
Proof. Fix a block row \(i\), a block column \(\ell\), and an entry within that block: its row index is \(a\) within row group \(i\), and its column index is \(b\) within column group \(\ell\). By ordinary matrix multiplication, that entry of \(\mathbf{A}\mathbf{B}\) is the sum of \(a\)-th row entries of \(\mathbf{A}\) times \(b\)-th column entries of \(\mathbf{B}\), summed over all \(n\) positions in their shared dimension. Divide those \(n\) positions into the consecutive groups of sizes \(r_1,\dots,r_k\). The contribution from group \(j\) is exactly the \((a,b)\)-entry of \(\mathbf{A}_{ij}\mathbf{B}_{j\ell}\), by the definition of matrix multiplication. Adding the contributions from all groups gives the \((a,b)\)-entry of \(\sum_{j=1}^{k}\mathbf{A}_{ij}\mathbf{B}_{j\ell}\). This holds for every entry in the block, proving the formula. \(\square\)
The formula is ordinary matrix multiplication with the shared dimension grouped into pieces. The order of factors remains important: each term has the form \(\mathbf{A}_{ij}\mathbf{B}_{j\ell}\), not \(\mathbf{B}_{j\ell}\mathbf{A}_{ij}\). The sizes make the order explicit.
Calculating with Matching Partitions
Worked Example: A Product with Four Blocks in Each Matrix
Partition each \(4\times4\) matrix into four \(2\times2\) blocks, and compute \(\mathbf{A}\mathbf{B}\). For each answer block, calculate both block products and then add them.
For the top-left block, multiply the first block row of \(\mathbf{A}\) by the first block column of \(\mathbf{B}\):
The other three blocks are computed in the same way, showing the individual products and sums:
Assembling the four answer blocks gives the \(4\times4\) product:
Check: Removing the block boundaries, the first row of \(\mathbf{A}\) is \((1,2,-1,0)\), and the columns of \(\mathbf{B}\) are \((1,2,0,1)^{\top}\), \((0,1,1,0)^{\top}\), \((1,0,2,1)^{\top}\), and \((1,1,0,1)^{\top}\). The four row-column products are \(5,1,-1,3\), matching the first row of \(\mathbf{C}\). For the remaining rows of \(\mathbf{A}\), the products with those columns are \((3,2,3,2)\), \((5,1,3,4)\), and \((2,1,4,2)\). These give the other rows above and verify the product by ordinary multiplication.
Rectangular Blocks Can Multiply
Blocks need not be square. The relevant requirement is that the number of columns in each left-hand block equals the number of rows in its partner. The resulting block has the outer dimensions: an \(a\times b\) block multiplied by a \(b\times c\) block gives an \(a\times c\) block.
Worked Example: A Compatible Partition with Different Block Sizes
Let \(\mathbf{A}\) be \(2\times3\), with column groups of sizes \(1\) and \(2\), and let \(\mathbf{B}\) be \(3\times2\), with matching row groups. Compute the product block by block.
Here \(\mathbf{A}_{11}\) and \(\mathbf{A}_{21}\) are \(1\times1\), while \(\mathbf{A}_{12}\) and \(\mathbf{A}_{22}\) are \(1\times2\). The corresponding blocks in the first block column of \(\mathbf{B}\) are \(1\times1\) and \(2\times1\). Thus both products contributing to each answer entry are defined. The four blocks are scalars:
Therefore \(\mathbf{C}=\begin{bmatrix}1&4\\1&1\end{bmatrix}\). Check: the first row of \(\mathbf{A}\), \((1,2,0)\), gives entries \(1(1)+2(0)+0(1)=1\) and \(1(2)+2(1)+0(0)=4\). Its second row, \((0,1,1)\), gives \(0(1)+1(0)+1(1)=1\) and \(0(2)+1(1)+1(0)=1\), as claimed.
When the Partitions Do Not Match
The full matrices can be multiplied even when the chosen partitions are incompatible. What fails is the proposed block calculation: a block product may not be defined, or the block groupings may not correspond to the same parts of the shared dimension. A standard fix is to refine the partitions. In the shared dimension, list all existing cut positions from both partitions and split the blocks at any cut that appears in only one partition. After refinement, both matrices have the same shared block sizes, so the block formula applies.
Worked Example: Refining Incompatible Partitions
Consider the following \(2\times4\) matrix \(\mathbf{A}\) and \(4\times2\) matrix \(\mathbf{B}\). The columns of \(\mathbf{A}\) are grouped \(1|3\), but the rows of \(\mathbf{B}\) are grouped \(2|2\). These partitions are incompatible.
For example, the first block of \(\mathbf{A}\) has size \(2\times1\), while the first block of \(\mathbf{B}\) has size \(2\times2\). Attempting to multiply them gives \((2\times1)(2\times2)\), which is undefined because the inner dimensions \(1\) and \(2\) do not match. The matrices themselves still have compatible full dimensions, \(2\times4\) and \(4\times2\).
The cut positions in the shared dimension are \(1\) for \(\mathbf{A}\) and \(2\) for \(\mathbf{B}\). Refining at both positions gives common group sizes \(1|1|2\):
Now multiply matching pieces of the shared dimension. The first contribution is the first column of \(\mathbf{A}\) times the first row of \(\mathbf{B}\); the second contribution uses their second column and row. The remaining contribution uses two columns and two rows:
Adding these contributions gives \(\mathbf{A}\mathbf{B}=\begin{bmatrix}6&4\\1&0\end{bmatrix}\). Check: by ordinary multiplication, the first row \((1,2,0,1)\) gives \(1+4+0+1=6\) and \(0+2+0+2=4\). The second row \((0,1,1,-1)\) gives \(0+2+0-1=1\) and \(0+1+1-2=0\). The direct calculation agrees with the refined block calculation.
Common Pitfall: Pairing Blocks by Position Alone
A common mistake is to pair the first block column of \(\mathbf{A}\) with the first block row of \(\mathbf{B}\), the second with the second, and proceed without checking their sizes. In the last example, that would try to multiply a \(2\times1\) block by a \(2\times2\) block. Writing down the mismatched inner dimensions exposes the error: \(1\ne2\). The correction is not to change the order of the factors or to force an invalid product. Refine the partitions to \(1|1|2\), then sum the three defined products.
Keep these checks in view when working with blocks:
- The full matrices must first have compatible dimensions: the number of columns of \(\mathbf{A}\) must equal the number of rows of \(\mathbf{B}\).
- For a block formula, the column-group sizes of \(\mathbf{A}\) must match the row-group sizes of \(\mathbf{B}\), in order.
- Every product in a block sum must be defined, and all terms in that sum must have the same size.
- Assemble the answer in the same block-row and block-column layout, then check it against ordinary multiplication when practical.
Block multiplication is useful because it organizes a large calculation into smaller ones. The blocks may reflect a matrix's structure or simply make dimensions easier to track. In either case, the calculation remains grounded in ordinary matrix multiplication: the partitions change how the work is grouped, not what the product means.
Check Your Understanding
For each question, pay attention to the dimensions of the blocks as well as the arithmetic.
- Suppose the column groups of \(\mathbf{A}\) have sizes \(2|1|3\). What must the row-group sizes of \(\mathbf{B}\) be for the block product formula to apply directly?
- Let \(\mathbf{A}=\begin{bmatrix}1&2&0\\0&1&1\end{bmatrix}\) and \(\mathbf{B}=\begin{bmatrix}1\\2\\-1\end{bmatrix}\), with shared groups \(1|2\). Calculate the product using blocks and check by ordinary multiplication.
- A matrix \(\mathbf{A}\) has shared-dimension groups \(1|3\), and \(\mathbf{B}\) has groups \(2|2\). Give the common refinement and explain why the original block pairings may fail.
- Why must all terms in the sum for a single answer block have the same dimensions?
- Explain why incompatible partitions do not imply that the full matrix product is undefined.