Post · 7 min read· pp. 630–633

What Is a Block Matrix?

A matrix is a rectangular array of numbers treated as a single object. A block matrix is a matrix whose elements are themselves matrices, which are called submatrices. By allowing a matrix to be viewed at different levels of abstraction, the block matrix viewpoint enables elegant proofs of results and facilitates the development and understanding of numerical algorithms.

A block matrix is defined in terms of a partitioning, which breaks a matrix into contiguous pieces. The most common and important case is for an n×nn\times n matrix to be partitioned as a block 2×22\times 2 matrix (two block rows and two block columns). For n=4n = 4, partitioning into 2×22\times 2 blocks gives

A=[a11a12a13a14a21a22a23a24a31a32a33a34a41a42a43a44]=[A11A12A21A22],\notag A = \left[\begin{array}{cc|cc} a_{11} & a_{12} & a_{13} & a_{14}\\ a_{21} & a_{22} & a_{23} & a_{24}\\\hline a_{31} & a_{32} & a_{33} & a_{34}\\ a_{41} & a_{42} & a_{43} & a_{44}\\ \end{array}\right] = \begin{bmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{bmatrix},

where

A11=A(1 ⁣:2,1 ⁣:2)=[a11a12a21a22],\notag A_{11} = A(1\colon2,1\colon2) = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix},

and similarly for the other blocks. The diagonal blocks in a partitioning of a square matrix are usually square (but not necessarily so), and they do not have to be of the same dimensions. This same 4×44\times 4 matrix could be partitioned as

A=[a11a12a13a14a21a22a23a24a31a32a33a34a41a42a43a44]=[A11A12A21A22],\notag A = \left[\begin{array}{c|ccc} a_{11} & a_{12} & a_{13} & a_{14}\\\hline a_{21} & a_{22} & a_{23} & a_{24}\\ a_{31} & a_{32} & a_{33} & a_{34}\\ a_{41} & a_{42} & a_{43} & a_{44}\\ \end{array}\right] = \begin{bmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{bmatrix},

where A11=(a11)A_{11} = (a_{11}) is a scalar, A21A_{21} is a column vector, and A12A_{12} is a row vector.

The sum C=A+BC = A + B of two block matrices A=(Aij)A = (A_{ij}) and B=(Bij)B = (B_{ij}) of the same dimension is obtained by adding blockwise as long as AijA_{ij} and BijB_{ij} have the same dimensions for all ii and jj, and the result has the same block structure: Cij=Aij+BijC_{ij} = A_{ij}+B_{ij},

The product C=ABC = AB of an m×nm\times n matrix A=(Aij)A = (A_{ij}) and an n×pn\times p matrix B=(Bij)B = (B_{ij}) can be computed as Cij=∑kAikBkjC_{ij} = \sum_k A_{ik}B_{kj} as long as the products AikBkjA_{ik}B_{kj} are all defined. In this case the matrices AA and BB are said to be conformably partitioned for multiplication. Here, CC has as many block rows as AA and as many block columns as BB. For example,

AB=[A11A12A21A22][B11B12B21B22]=[A11B11+A12B21A11B12+A12B22A21B11+A22B21A21B12+A22B22]\notag AB = \begin{bmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{bmatrix} \begin{bmatrix} B_{11} & B_{12} \\ B_{21} & B_{22} \end{bmatrix} = \begin{bmatrix} 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_{21} B_{12} + A_{22} B_{22} \end{bmatrix}

as long as all the eight products AikBkjA_{ik}B_{kj} are defined.

Block matrix notation is an essential tool in numerical linear algebra. Here are some examples of its usage.

Matrix Factorization

For an n×nn\times n matrix AA with nonzero (1,1)(1,1) element α\alpha we can write

A=[αbTcD]=[10c/αIn−1][αbT0D−cbT/α]=:L1U1\notag A = \begin{bmatrix} \alpha & b^T \\ c & D \end{bmatrix} = \begin{bmatrix} 1 & 0 \\ c/\alpha & I_{n-1} \end{bmatrix} \begin{bmatrix} \alpha & b^T \\ 0 & D - cb^T/\alpha \end{bmatrix} = : L_1U_1

The first row and column of L1L_1 have the correct form for a unit lower triangular matrix and likewise the first row and column of U1U_1 have the correct form for an upper triangular matrix. If we can find an LU factorization D−cbT/α=L2U2D - cb^T/\alpha = L_2U_2 of the (n−1)×(n−1)(n-1)\times (n-1) Schur complement DD then A=L1diag(1,L2)⋅diag(1,U2)U1A = L_1\mathrm{diag}(1,L_2)\cdot \mathrm{diag}(1,U_2)U_1 is an LU factorization of AA. This construction is the basis of an inductive proof of the existence of an LU factorization (provided all the pivots are nonzero) and it also yields an algorithm for computing it.

The same type of construction applies to other factorizations, such as Cholesky factorization, QR factorization, and the Schur decomposition.

Matrix Inverse

A useful formula for the inverse of a nonsingular block triangular matrix

T=[T11T120T22]\notag T = \begin{bmatrix} T_{11} & T_{12} \\ 0 & T_{22} \end{bmatrix}

is

T−1=[T11−1−T11−1T12T22−10T22−1],\notag T^{-1} = \begin{bmatrix} T_{11}^{-1} & - T_{11}^{-1}T_{12}T_{22}^{-1}\\ 0 & T_{22}^{-1} \end{bmatrix},

which has the special case

[IX0I]−1=[I−X0I].\notag \begin{bmatrix} I & X \\ 0 & I \end{bmatrix}^{-1} = \begin{bmatrix} I & -X\\ 0 & I \end{bmatrix}.

If TT is upper triangular then so are T11T_{11} and T22T_{22}. By taking T11T_{11} of dimension the nearest integer to n/2n/2 this formula can be used to construct a divide and conquer algorithm for computing T−1T^{-1}.

We note that det⁡(T)=det⁡(T11)det⁡(T22)\det(T) = \det(T_{11}) \det(T_{22}), a fact that will be used in the next section.

Determinantal Formulas

Block matrices provides elegant proofs of many results involving determinants. For example, consider the equations

[I−A0I][I+AB0BI]=[I−ABI]=[I0BI+BA][I−A0I],\notag \begin{bmatrix} I & -A \\ 0 & I \end{bmatrix} \begin{bmatrix} I+AB & 0 \\ B & I \end{bmatrix} = \begin{bmatrix} I & -A\\ B & I \end{bmatrix} = \begin{bmatrix} I & 0 \\ B & I+BA \end{bmatrix} \begin{bmatrix} I & -A \\ 0 & I \end{bmatrix},

which hold for any AA and BB such that ABAB and BABA are defined. Taking determinants gives the formula det⁡(I+AB)=det⁡(I+BA)\det(I + AB) = \det(I + BA). In particular we can take A=xA = x, B=yTB = y^T, for nn-vectors xx and yy, giving det⁡(I+xyT)=1+yTx\det(I + xy^T) = 1 + y^Tx.

Constructing Matrices with Required Properties

We can sometimes build a matrix with certain desired properties by a block construction. For example, if XX is an n×nn\times n involutory matrix (X2=IX^2 = I) then

[XI0−X]\notag \begin{bmatrix} X & I \\ 0 & -X \end{bmatrix}

is a (block triangular) 2n×2n2n\times 2n involutory matrix. And if AA and BB are any two n×nn\times n matrices then

[I−BAB2A−ABAAB−I]\notag \begin{bmatrix} I - BA & B \\ 2A-ABA & AB-I \end{bmatrix}

is involutory.

The Anti Block Diagonal Trick

For n×nn\times n matrices AA and BB consider the anti block diagonal matrix

X=[0AB0].\notag X = \begin{bmatrix} 0 & A \\ B & 0 \end{bmatrix}.

Note that

X2=[AB00BA],X−1=[0B−1A−10].\notag X^2 = \begin{bmatrix} AB & 0 \\ 0 & BA \end{bmatrix}, \quad X^{-1} = \begin{bmatrix} 0 & B^{-1} \\ A^{-1} & 0 \end{bmatrix}.

Using these properties one can show a relation between the matrix sign function and the principal matrix square root:

sign([0AI0])=[0A1/2A−1/20].\notag \mathrm{sign}\left( \begin{bmatrix} 0 & A \\ I & 0 \end{bmatrix} \right) = \begin{bmatrix} 0 & A^{1/2} \\ A^{-1/2} & 0 \end{bmatrix}.

This allows one to derive iterations for computing the matrix square root and its inverse from iterations for computing the matrix sign function.

It is easy to derive explicit formulas for all the powers of XX, and hence for any power series evaluated at XX. In particular, we have the formula

eX=[cosh⁡ABA(BA)−1sinh⁡BAB(AB)−1sinh⁡ABcosh⁡BA],\notag \mathrm{e}^X = \left[\begin{array}{cc} \cosh\sqrt{AB} & A (\sqrt{BA})^{-1} \sinh \sqrt{BA} \\[3pt] B(\sqrt{AB})^{-1} \sinh \sqrt{AB} & \cosh\sqrt{BA} \end{array}\right],

where Y\sqrt{Y} denotes any square root of YY. With B=IB = I, this formula arises in the solution of the ordinary differential equation initial value problem y′′+Ay=0y'' + Ay = 0, y(0)=y0y(0)=y_0, y′(0)=y0′y'(0)=y'_0,

The most well known instance of the trick is when B=ATB = A^T. The eigenvalues of

X=[0AAT0]\notag X = \begin{bmatrix} 0 & A \\ A^T & 0 \end{bmatrix}

are plus and minus the singular values of AA, together with ∣m−n∣|m-n| additional zeros if AA is m×nm\times n with m≠nm \ne n, and the eigenvectors of XX and the singular vectors of AA are also related. Consequently, by applying results or algorithms for symmetric matrices to XX one obtains results or algorithms for the singular value decomposition of AA.

References

This is a minimal set of references, which contain further useful references within.

  • Gene Golub and Charles F. Van Loan, Matrix Computations, fourth edition, Johns Hopkins University Press, Baltimore, MD, USA, 2013.
  • Nicholas J. Higham, Functions of Matrices: Theory and Computation, Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 2008. (Sections 1.5 and 1.6 for the theory of matrix square roots.)
  • Roger A. Horn and Charles R. Johnson, Matrix Analysis, second edition, Cambridge University Press, 2013. My review of the second edition.

This article is part of the “What Is” series, available from https://nhigham.com/category/what-is and in PDF form from the GitHub repository https://github.com/higham/what-is.