Why Ranks Add Across Diagonal Blocks
A block diagonal matrix separates its action into independent row and column groups. Each diagonal block takes one group of input entries to the corresponding group of output entries, while all off-diagonal blocks are zero. Because the blocks act on separate groups, their images occupy separate row groups too. This separation is the reason their ranks add.
We work over \(\mathbb{R}\). Let \(\mathbf{A}_i\) be an \(m_i\times n_i\) matrix for each \(i=1,\dots,k\). The block diagonal matrix with these diagonal blocks is denoted by \(\operatorname{diag}(\mathbf{A}_1,\dots,\mathbf{A}_k)\): its diagonal blocks are the \(\mathbf{A}_i\), and every off-diagonal block is zero. The blocks need not be square, so the resulting matrix has \(\sum_i m_i\) rows and \(\sum_i n_i\) columns.
Here each zero block has the dimensions required to fill its position. The rank of a matrix is the dimension of its column space, equivalently the dimension of the image of the associated matrix-vector map. The rank of a zero block is zero.
A Dimension Fact for Separate Row Blocks
We first record why subspaces that occupy separate groups of coordinates have additive dimensions. This is the geometric fact behind the rank formula.
Proof. For each \(i\), choose a basis \(\mathcal{B}_i\) of \(U_i\), and embed every vector in \(\mathcal{B}_i\) into row block \(i\). The resulting collection spans the sum: any vector in that sum is a sum of vectors from the embedded subspaces, and each such vector is a linear combination of the corresponding embedded basis vectors. To prove independence, suppose a linear combination of the entire collection equals the zero vector. Look at row block \(i\). Only the embedded vectors from \(\mathcal{B}_i\) can have nonzero entries there, so their linear combination in that block must equal zero. Since \(\mathcal{B}_i\) is a basis, all its coefficients are zero. This holds for each \(i\), so every coefficient in the original combination is zero. The collection is therefore a basis of the sum. It contains \(\sum_i\dim U_i\) vectors, which proves the dimension formula. \(\square\)
The Rank Formula
Proof. Write \(\mathbf{D}=\operatorname{diag}(\mathbf{A}_1,\dots,\mathbf{A}_k)\). Split any input vector into consecutive groups \(\mathbf{x}_1,\dots,\mathbf{x}_k\), with \(\mathbf{x}_i\in\mathbb{R}^{n_i}\). Block matrix multiplication gives
Thus every output has its \(i\)-th row group in \(\operatorname{im}\mathbf{A}_i\). Conversely, take any vector whose \(i\)-th row group is \(\mathbf{y}_i\in\operatorname{im}\mathbf{A}_i\). By the definition of image, for each \(i\) there is an \(\mathbf{x}_i\) satisfying \(\mathbf{A}_i\mathbf{x}_i=\mathbf{y}_i\). Combining those inputs gives the stated output under \(\mathbf{D}\). Therefore the image of \(\mathbf{D}\) is exactly the sum of the images of the individual blocks, embedded in their separate row groups. By the lemma, its dimension is the sum of the dimensions of those images. Since rank is image dimension, the rank formula follows. \(\square\)
The argument works for any finite number of blocks and does not require them to be square. Its essential condition is the zero pattern: each block must act only between its own column group and its matching row group.
Worked Applications
Worked Example: One Block of Rank One and One of Rank Two
Find the rank of the block diagonal matrix with blocks \(\mathbf{A}_1=\begin{bmatrix}1&2\\2&4\end{bmatrix}\) and \(\mathbf{A}_2=\begin{bmatrix}1&1\\1&2\end{bmatrix}\).
First determine each block’s rank. For \(\mathbf{A}_1\), subtract twice row 1 from row 2:
There is one nonzero row, so \(\operatorname{rank}(\mathbf{A}_1)=1\). This also follows directly because the second column is twice the nonzero first column.
For \(\mathbf{A}_2\), subtract row 1 from row 2, then subtract the new row 2 from row 1:
There are two pivots, so \(\operatorname{rank}(\mathbf{A}_2)=2\). The rank formula now gives
Check: The first block contributes one independent column. The second block contributes two independent columns, as its reduction has a pivot in each column. Since the blocks occupy disjoint row groups, no nonzero combination from one block can cancel a combination from the other; together they contribute three independent directions.
Worked Example: Rectangular Blocks
Let \(\mathbf{A}_1=\begin{bmatrix}1&0&1\\0&1&1\end{bmatrix}\) and \(\mathbf{A}_2=\begin{bmatrix}2&4\end{bmatrix}\). Find the rank of their block diagonal matrix.
The first block has two independent rows and two pivots: its first two columns are \(\begin{bmatrix}1\\0\end{bmatrix}\) and \(\begin{bmatrix}0\\1\end{bmatrix}\). Its third column is their sum. Hence \(\operatorname{rank}(\mathbf{A}_1)=2\). The second block is a nonzero \(1\times2\) matrix, so its column space is spanned by \(\begin{bmatrix}2\end{bmatrix}\), and \(\operatorname{rank}(\mathbf{A}_2)=1\).
The full matrix has three rows and five columns. Scaling its third row by \(\tfrac12\) shows its three pivots directly:
The pivots are in columns 1, 2 and 4, so the full matrix has rank 3. This agrees with the theorem: \(2+1=3\).
Check: The third block row of the output depends on the last two input entries through \(2x_4+4x_5\), which can produce any real number, but only one independent output direction. The first two output entries can vary independently, giving two more directions. The total is three.
Worked Example: Including a Zero Block
Consider three diagonal blocks: \(\mathbf{A}_1=\begin{bmatrix}1&2\\2&4\end{bmatrix}\), \(\mathbf{A}_2=\begin{bmatrix}0&0\end{bmatrix}\), and \(\mathbf{A}_3=\begin{bmatrix}3\\6\end{bmatrix}\). Find the rank of the resulting matrix.
The first block has rank 1 because its second column is twice its first, and its first column is nonzero. The middle block has rank 0 because both columns are zero. The last block has rank 1 because it is a nonzero single column. The rank formula predicts a total rank of \(1+0+1=2\).
The full matrix is
Subtract twice row 1 from row 2, subtract twice row 4 from row 5, and scale row 4 by \(\tfrac13\):
The displayed row operations preserve rank, and the final matrix has two nonzero rows with pivots in columns 1 and 5. Therefore its rank is 2, as predicted.
Check: The first block contributes the direction \(\begin{bmatrix}1\\2\\0\\0\\0\end{bmatrix}\), while the last block contributes \(\begin{bmatrix}0\\0\\0\\0\\1\end{bmatrix}\) after rescaling. These are independent because their nonzero entries lie in different row groups. The zero block contributes no direction.
Common Misreadings
The rule is not for every partition into blocks. The off-diagonal blocks must actually be zero. For example, the matrix \(\begin{bmatrix}1&1\\1&1\end{bmatrix}\) is not block diagonal with the two diagonal entries as its only blocks: its off-diagonal entries are nonzero. Adding the ranks of the diagonal entries would give \(1+1=2\), which is wrong. In fact, subtracting row 1 from row 2 gives
so its rank is 1. The two columns are identical, not independent.
Do not confuse a zero block with a missing block. A zero diagonal block is allowed and contributes rank zero. It does not remove the row or column groups around it; it simply contributes no image directions. Also, do not use the largest block rank or multiply the block ranks. The theorem calls for their sum, including any zero contributions.
The result is useful whenever a matrix separates into independent smaller systems. It lets us calculate the rank of the full matrix by studying its diagonal blocks individually, even when the full matrix is rectangular or includes blocks with no pivots. The proof also explains exactly why the shortcut works: the output directions from distinct diagonal blocks live in disjoint row groups, so none can cancel another.
Check Your Understanding
Use the theorem and justify each block rank before giving the rank of the full matrix.
- Find the rank of \(\operatorname{diag}\left(\begin{bmatrix}1&0\\0&1\end{bmatrix},\begin{bmatrix}2&4\end{bmatrix}\right)\).
- What is the rank of a block diagonal matrix whose diagonal blocks have ranks \(2\), \(0\), and \(3\)?
- Explain why the rank-sum theorem applies to rectangular diagonal blocks.
- Find the rank of \(\begin{bmatrix}1&0&0\\0&0&0\\0&0&5\end{bmatrix}\) by viewing it as a block diagonal matrix.
- Why does adding the ranks of the diagonal entries give the wrong answer for \(\begin{bmatrix}1&1\\1&1\end{bmatrix}\)?