Two Dimension Checks for a Block Product
Partitioning a matrix into blocks lets us treat rectangular groups of entries as units. But the blocks in two factors must fit together in a specific way before they can be multiplied block by block. There are two checks to keep separate: whether the full matrices can be multiplied at all, and whether the chosen block partitions line up for block multiplication.
Throughout, the matrices have real entries. A block is itself a matrix, so its size matters: a block with \(r\) rows and \(s\) columns is an \(r\times s\) matrix. Recall that an ordinary product \(\mathbf{A}\mathbf{B}\) is defined when the number of columns of \(\mathbf{A}\) equals the number of rows of \(\mathbf{B}\). Block multiplication imposes an additional requirement: the column widths of the blocks in \(\mathbf{A}\) must match the row heights of the blocks in \(\mathbf{B}\), in order.
The condition \(k=q\) says the two inner partitions have the same number of blocks. The conditions \(s_j=t_j\) say that the corresponding block dimensions match, not merely that the totals match. If the partitions are compatible, every block product used in forming the result has a defined matrix product. The output block in position \((i,\ell)\) has \(r_i\) rows and \(u_\ell\) columns.
A Dimension Rule for the Output Layout
Proof. Since the block column widths of \(\mathbf{A}\) are \(s_1,\dots,s_k\), its total number of columns is \(s_1+\cdots+s_k\). The block row heights of \(\mathbf{B}\) are \(t_1,\dots,t_k\), so its total number of rows is \(t_1+\cdots+t_k\). Compatibility gives \(s_j=t_j\) for each \(j\), and therefore the two totals are equal. Thus the ordinary product \(\mathbf{A}\mathbf{B}\) is defined. In that product, rows are grouped according to the row groups of \(\mathbf{A}\), so block row \(i\) has height \(r_i\). Columns are grouped according to the column groups of \(\mathbf{B}\), so block column \(\ell\) has width \(u_\ell\). Their intersection, the output block in position \((i,\ell)\), consequently has \(r_i\) rows and \(u_\ell\) columns. \(\square\)
This theorem gives the layout without requiring any entries of the product to be calculated. It also explains the central bookkeeping rule: the outer block partitions determine the output. The row partition comes from the first factor, and the column partition comes from the second.
Worked Example: A Compatible Product with Three Inner Blocks
Suppose \(\mathbf{A}\) has block row heights \((2,3)\) and block column widths \((2,1,2)\). Suppose \(\mathbf{B}\) has block row heights \((2,1,2)\) and block column widths \((3,2)\). Determine whether block multiplication is dimensionally compatible and give the size of each output block.
The inner block counts are both \(3\). Compare the corresponding dimensions in order:
All three pairs match, so the partitions are compatible. The first factor has total size \((2+3)\times(2+1+2)=5\times5\), and the second has total size \((2+1+2)\times(3+2)=5\times5\). The ordinary product is therefore defined as well.
The result inherits row heights \((2,3)\) and column widths \((3,2)\), so its block layout and block sizes are
Check: the output has total size \((2+3)\times(3+2)=5\times5\), as required for the product of a \(5\times5\) matrix with a \(5\times5\) matrix. Each displayed block has the height of its block row and the width of its block column.
When the Full Product Exists but the Blocks Do Not Line Up
An ordinary product can be defined even when the given block partitions are not compatible. In that situation, the obstacle is not the overall matrix dimensions. It is that the chosen internal boundaries do not match. Sometimes the partitions can be refined—that is, split into smaller blocks—until the boundaries agree.
Proof. Let the shared inner dimension be \(N\). Describe each partition by its boundary positions among \(0,1,\dots,N\), including \(0\) and \(N\). For example, block sizes \((2,3)\) give boundaries \(0,2,5\). Take the union of the boundary positions from the two partitions and list its distinct elements in increasing order. Consecutive positions in this list define positive block sizes, since distinct consecutive positions differ by at least \(1\). Every new interval lies within an original block of each partition: no original boundary lies strictly inside one of the intervals, because all original boundaries were included in the union. Thus each original block can be split at the new boundaries, and both partitions become the same sequence of interval lengths. These common block sizes give the required refinement. \(\square\)
Worked Example: Refining Two Different Inner Partitions
Let \(\mathbf{A}\) have size \(4\times6\), with row heights \((1,3)\) and column widths \((2,4)\). Let \(\mathbf{B}\) have size \(6\times5\), with row heights \((3,3)\) and column widths \((2,3)\). The ordinary product is defined because both inner dimensions are \(6\). Are the displayed partitions compatible? If not, find a common refinement and the resulting block layout.
The inner block counts are both \(2\), but the corresponding sizes are \((2,4)\) and \((3,3)\). Since \(2\ne3\), the partitions are not compatible as given. To refine them, list their boundary positions: the column widths \((2,4)\) give \(0,2,6\), and the row heights \((3,3)\) give \(0,3,6\). The combined boundaries are \(0,2,3,6\), giving common block sizes \((2,1,3)\).
Split the second block column of \(\mathbf{A}\), of width \(4\), into widths \(1\) and \(3\). Split the first block row of \(\mathbf{B}\), of height \(3\), into heights \(2\) and \(1\). Both inner partitions now have sizes \((2,1,3)\), so block multiplication is dimensionally compatible.
The output keeps the row heights \((1,3)\) of \(\mathbf{A}\) and the column widths \((2,3)\) of \(\mathbf{B}\). Its layout is
Check: the output size is \((1+3)\times(2+3)=4\times5\), matching the ordinary product of a \(4\times6\) matrix and a \(6\times5\) matrix. The refined inner block sizes agree term by term: \(2=2\), \(1=1\), and \(3=3\).
Compatibility Is More Than Matching Block Counts
Having the same number of inner blocks is necessary, but not sufficient. The dimensions must match in corresponding positions. Conversely, when two inner partitions have the same total size, differing boundaries can be repaired by a common refinement; the refinement does not change either full matrix or the ordinary product.
Worked Example: Same Block Count, Incompatible Dimensions
Suppose the inner block widths of \(\mathbf{A}\) are \((1,3)\), while the inner block heights of \(\mathbf{B}\) are \((2,2)\). Both partitions have two blocks, and both totals are \(4\). Decide whether the displayed partitions are compatible and, if not, give matching refined sizes.
The first pair has dimensions \(1\) and \(2\), so it does not match. The second pair has dimensions \(3\) and \(2\), so it does not match either. Equal block counts and equal totals do not make the original partitions compatible.
The boundary positions are \(0,1,4\) for \((1,3)\) and \(0,2,4\) for \((2,2)\). Their union gives \(0,1,2,4\), so the matching refined sizes are \((1,1,2)\). The block of width \(3\) in \(\mathbf{A}\) is split into widths \(1\) and \(2\); the block of height \(2\) at the start of \(\mathbf{B}\) is split into heights \(1\) and \(1\).
Check: after refinement, the corresponding dimensions are \(1=1\), \(1=1\), and \(2=2\). The total inner dimension remains \(1+1+2=4\) for each factor.
A Common Mistake and a Reliable Check
Common mistake: checking only the number of inner blocks. For the partitions \((1,3)\) and \((2,2)\), a wrong calculation might say, “There are two blocks on each side, so the block product is defined.” That conclusion ignores the dimensions of the paired blocks: the first attempted block product would have inner dimensions \(1\) and \(2\), and the second would have inner dimensions \(3\) and \(2\). Neither pair matches. The correction is to compare each width with the height in the same position. If they differ but the total inner dimensions agree, find the union of boundary positions and refine before applying block multiplication.
For any proposed block product, use this order of checks:
- Compare the total number of columns of the first matrix with the total number of rows of the second. If they differ, the ordinary product is not defined.
- Compare the number of inner blocks. If the counts differ, the displayed partitions are not compatible.
- Compare each corresponding block width and block height. Every pair must be equal.
- Read the output layout from the outer partitions: first-factor block row heights, second-factor block column widths.
This separation prevents a common confusion. A failure of block compatibility does not by itself imply that the ordinary matrix product fails to exist. If the total inner dimensions agree, the ordinary product is defined; the given block divisions may simply need to be refined to make blockwise multiplication available.
Check Your Understanding
For each question, focus on the dimensions and partitions; no entries of a product need to be calculated.
- \(\mathbf{A}\) has block row heights \((2,1)\) and column widths \((1,3)\). \(\mathbf{B}\) has block row heights \((1,3)\) and column widths \((2,2)\). Are the partitions compatible, and what is the output block layout?
- Suppose the inner partitions have sizes \((2,4)\) and \((3,3)\). Find the boundary positions and a common refinement.
- A \(3\times5\) matrix is multiplied by a \(4\times2\) matrix. Can a refinement make the ordinary product defined? Explain using the total dimensions.
- If the output block row heights are \((1,3)\) and its block column widths are \((2,1,2)\), state the size of the block in position \((2,3)\) and the total size of the product.
- Explain why equal inner block counts do not by themselves guarantee compatibility.