Block matrix

From HandWiki
Short description: Matrix defined using smaller matrices called blocks

In mathematics, a block matrix or a partitioned matrix is a matrix that is interpreted as having been broken into sections called blocks or submatrices.[1] Intuitively, a matrix interpreted as a block matrix can be visualized as the original matrix with a collection of horizontal and vertical lines, which break it up, or partition it, into a collection of smaller matrices.[2] Any matrix may be interpreted as a block matrix in one or more ways, with each interpretation defined by how its rows and columns are partitioned.

This notion can be made more precise for an [math]\displaystyle{ n }[/math] by [math]\displaystyle{ m }[/math] matrix [math]\displaystyle{ M }[/math] by partitioning [math]\displaystyle{ n }[/math] into a collection [math]\displaystyle{ \text{rowgroups} }[/math], and then partitioning [math]\displaystyle{ m }[/math] into a collection [math]\displaystyle{ \text{colgroups} }[/math]. The original matrix is then considered as the "total" of these groups, in the sense that the [math]\displaystyle{ (i, j) }[/math] entry of the original matrix corresponds in a 1-to-1 way with some [math]\displaystyle{ (s, t) }[/math] offset entry of some [math]\displaystyle{ (x,y) }[/math], where [math]\displaystyle{ x \in \text{rowgroups} }[/math] and [math]\displaystyle{ y \in \text{colgroups} }[/math].

Block matrix algebra arises in general from biproducts in categories of matrices.[3]

Example

A 168×168 element block matrix with 12×12, 12×24, 24×12, and 24×24 sub-matrices. Non-zero elements are in blue, zero elements are grayed.

The matrix

[math]\displaystyle{ \mathbf{P} = \begin{bmatrix} 1 & 2 & 2 & 7 \\ 1 & 5 & 6 & 2 \\ 3 & 3 & 4 & 5 \\ 3 & 3 & 6 & 7 \end{bmatrix} }[/math]

can be partitioned into four 2×2 blocks

[math]\displaystyle{ \mathbf{P}_{11} = \begin{bmatrix} 1 & 2 \\ 1 & 5 \end{bmatrix},\quad \mathbf{P}_{12} = \begin{bmatrix} 2 & 7\\ 6 & 2 \end{bmatrix},\quad \mathbf{P}_{21} = \begin{bmatrix} 3 & 3 \\ 3 & 3 \end{bmatrix},\quad \mathbf{P}_{22} = \begin{bmatrix} 4 & 5 \\ 6 & 7 \end{bmatrix}. }[/math]

The partitioned matrix can then be written as

[math]\displaystyle{ \mathbf{P} = \begin{bmatrix} \mathbf{P}_{11} & \mathbf{P}_{12} \\ \mathbf{P}_{21} & \mathbf{P}_{22} \end{bmatrix}. }[/math]

Block matrix multiplication

It is possible to use a block partitioned matrix product that involves only algebra on submatrices of the factors. The partitioning of the factors is not arbitrary, however, and requires "conformable partitions"[4] between two matrices [math]\displaystyle{ A }[/math] and [math]\displaystyle{ B }[/math] such that all submatrix products that will be used are defined.[5] Given an [math]\displaystyle{ (m \times p) }[/math] matrix [math]\displaystyle{ \mathbf{A} }[/math] with [math]\displaystyle{ q }[/math] row partitions and [math]\displaystyle{ s }[/math] column partitions

[math]\displaystyle{ \mathbf{A} = \begin{bmatrix} \mathbf{A}_{11} & \mathbf{A}_{12} & \cdots & \mathbf{A}_{1s} \\ \mathbf{A}_{21} & \mathbf{A}_{22} & \cdots & \mathbf{A}_{2s} \\ \vdots & \vdots & \ddots & \vdots \\ \mathbf{A}_{q1} & \mathbf{A}_{q2} & \cdots & \mathbf{A}_{qs} \end{bmatrix} }[/math]

and a [math]\displaystyle{ (p \times n) }[/math] matrix [math]\displaystyle{ \mathbf{B} }[/math] with [math]\displaystyle{ s }[/math] row partitions and [math]\displaystyle{ r }[/math] column partitions

[math]\displaystyle{ \mathbf{B} = \begin{bmatrix} \mathbf{B}_{11} & \mathbf{B}_{12} & \cdots &\mathbf{B}_{1r} \\ \mathbf{B}_{21} & \mathbf{B}_{22} & \cdots &\mathbf{B}_{2r} \\ \vdots & \vdots & \ddots &\vdots \\ \mathbf{B}_{s1} & \mathbf{B}_{s2} & \cdots &\mathbf{B}_{sr} \end{bmatrix}, }[/math]

that are compatible with the partitions of [math]\displaystyle{ A }[/math], the matrix product

[math]\displaystyle{ \mathbf{C}=\mathbf{A}\mathbf{B} }[/math]

can be performed blockwise, yielding [math]\displaystyle{ \mathbf{C} }[/math] as an [math]\displaystyle{ (m \times n) }[/math] matrix with [math]\displaystyle{ q }[/math] row partitions and [math]\displaystyle{ r }[/math] column partitions. The matrices in the resulting matrix [math]\displaystyle{ \mathbf{C} }[/math] are calculated by multiplying:

[math]\displaystyle{ \mathbf{C}_{q r} = \sum^s_{i=1}\mathbf{A}_{q i}\mathbf{B}_{i r}. }[/math]

Or, using the Einstein notation that implicitly sums over repeated indices:

[math]\displaystyle{ \mathbf{C}_{q r} = \mathbf{A}_{q i}\mathbf{B}_{i r}. }[/math]

Block matrix inversion

If a matrix is partitioned into four blocks, it can be inverted blockwise as follows:

[math]\displaystyle{ \mathbf{P} = \begin{bmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{C} & \mathbf{D} \end{bmatrix}^{-1} = \begin{bmatrix} \mathbf{A}^{-1} + \mathbf{A}^{-1}\mathbf{B}\left(\mathbf{D} - \mathbf{CA}^{-1}\mathbf{B}\right)^{-1}\mathbf{CA}^{-1} & -\mathbf{A}^{-1}\mathbf{B}\left(\mathbf{D} - \mathbf{CA}^{-1}\mathbf{B}\right)^{-1} \\ -\left(\mathbf{D}-\mathbf{CA}^{-1}\mathbf{B}\right)^{-1}\mathbf{CA}^{-1} & \left(\mathbf{D} - \mathbf{CA}^{-1}\mathbf{B}\right)^{-1} \end{bmatrix}, }[/math]

where A and D are square blocks of arbitrary size, and B and C are conformable with them for partitioning. Furthermore, A and the Schur complement of A in P: P/A = DCA−1B must be invertible.[6]

Equivalently, by permuting the blocks:

[math]\displaystyle{ \mathbf{P} = \begin{bmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{C} & \mathbf{D} \end{bmatrix}^{-1} = \begin{bmatrix} \left(\mathbf{A} - \mathbf{BD}^{-1}\mathbf{C}\right)^{-1} & -\left(\mathbf{A}-\mathbf{BD}^{-1}\mathbf{C}\right)^{-1}\mathbf{BD}^{-1} \\ -\mathbf{D}^{-1}\mathbf{C}\left(\mathbf{A} - \mathbf{BD}^{-1}\mathbf{C}\right)^{-1} & \quad \mathbf{D}^{-1} + \mathbf{D}^{-1}\mathbf{C}\left(\mathbf{A} - \mathbf{BD}^{-1}\mathbf{C}\right)^{-1}\mathbf{BD}^{-1} \end{bmatrix}. }[/math]

Here, D and the Schur complement of D in P: P/D = ABD−1C must be invertible.

If A and D are both invertible, then:

[math]\displaystyle{ \begin{bmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{C} & \mathbf{D} \end{bmatrix}^{-1} = \begin{bmatrix} \left(\mathbf{A} - \mathbf{B} \mathbf{D}^{-1} \mathbf{C}\right)^{-1} & \mathbf{0} \\ \mathbf{0} & \left(\mathbf{D} - \mathbf{C} \mathbf{A}^{-1} \mathbf{B}\right)^{-1} \end{bmatrix} \begin{bmatrix} \mathbf{I} & -\mathbf{B} \mathbf{D}^{-1} \\ -\mathbf{C} \mathbf{A}^{-1} & \mathbf{I} \end{bmatrix}. }[/math]

By the Weinstein–Aronszajn identity, one of the two matrices in the block-diagonal matrix is invertible exactly when the other is.

Block matrix determinant

The formula for the determinant of a [math]\displaystyle{ 2 \times 2 }[/math]-matrix above continues to hold, under appropriate further assumptions, for a matrix composed of four submatrices [math]\displaystyle{ A, B, C, D }[/math]. The easiest such formula, which can be proven using either the Leibniz formula or a factorization involving the Schur complement, is

[math]\displaystyle{ \det\begin{pmatrix}A& 0\\ C& D\end{pmatrix} = \det(A) \det(D) = \det\begin{pmatrix}A& B\\ 0& D\end{pmatrix}. }[/math]

Using this formula, we can derive that characteristic polynomials of [math]\displaystyle{ \begin{pmatrix}A& 0\\ C& D\end{pmatrix} }[/math] and [math]\displaystyle{ \begin{pmatrix}A& B\\ 0& D\end{pmatrix} }[/math] are same and equal to the product of characteristic polynomials of [math]\displaystyle{ A }[/math] and [math]\displaystyle{ D }[/math]. Furthermore, If [math]\displaystyle{ \begin{pmatrix}A& 0\\ C& D\end{pmatrix} }[/math] or [math]\displaystyle{ \begin{pmatrix}A& B\\ 0& D\end{pmatrix} }[/math] is diagonalizable, then [math]\displaystyle{ A }[/math] and [math]\displaystyle{ D }[/math] are diagonalizable too. The converse is false; simply check [math]\displaystyle{ \begin{pmatrix}1& 1\\ 0& 1\end{pmatrix} }[/math].

If [math]\displaystyle{ A }[/math] is invertible (and similarly if [math]\displaystyle{ D }[/math] is invertible[7]), one has

[math]\displaystyle{ \det\begin{pmatrix}A& B\\ C& D\end{pmatrix} = \det(A) \det\left(D - C A^{-1} B\right) . }[/math]

If [math]\displaystyle{ D }[/math] is a [math]\displaystyle{ 1 \times 1 }[/math]-matrix, this simplifies to [math]\displaystyle{ \det (A) (D - CA^{-1}B) }[/math].

If the blocks are square matrices of the same size further formulas hold. For example, if [math]\displaystyle{ C }[/math] and [math]\displaystyle{ D }[/math] commute (i.e., [math]\displaystyle{ CD=DC }[/math]), then

[math]\displaystyle{ \det\begin{pmatrix}A& B\\ C& D\end{pmatrix} = \det(AD - BC). }[/math][8]

This formula has been generalized to matrices composed of more than [math]\displaystyle{ 2 \times 2 }[/math] blocks, again under appropriate commutativity conditions among the individual blocks.[9]

For [math]\displaystyle{ A = D }[/math] and [math]\displaystyle{ B=C }[/math], the following formula holds (even if [math]\displaystyle{ A }[/math] and [math]\displaystyle{ B }[/math] do not commute)[citation needed]

[math]\displaystyle{ \det\begin{pmatrix}A& B\\ B& A\end{pmatrix} = \det(A - B) \det(A + B). }[/math]

Block diagonal matrices

A block diagonal matrix is a block matrix that is a square matrix such that the main-diagonal blocks are square matrices and all off-diagonal blocks are zero matrices. That is, a block diagonal matrix A has the form

[math]\displaystyle{ \mathbf{A} = \begin{bmatrix} \mathbf{A}_1 & \mathbf{0} & \cdots & \mathbf{0} \\ \mathbf{0} & \mathbf{A}_2 & \cdots & \mathbf{0} \\ \vdots & \vdots & \ddots & \vdots \\ \mathbf{0} & \mathbf{0} & \cdots & \mathbf{A}_n \end{bmatrix} }[/math]

where Ak is a square matrix for all k = 1, ..., n. In other words, matrix A is the direct sum of A1, ..., An. It can also be indicated as A1 ⊕ A2 ⊕ ... ⊕ An or diag(A1, A2, ..., An)  (the latter being the same formalism used for a diagonal matrix). Any square matrix can trivially be considered a block diagonal matrix with only one block.

For the determinant and trace, the following properties hold

[math]\displaystyle{ \begin{align} \det\mathbf{A} &= \det\mathbf{A}_1 \times \cdots \times \det\mathbf{A}_n, \\ \operatorname{tr}\mathbf{A} &= \operatorname{tr} \mathbf{A}_1 + \cdots + \operatorname{tr} \mathbf{A}_n.\end{align} }[/math]

A block diagonal matrix is invertible if and only if each of its main-diagonal blocks are invertible, and in this case its inverse is another block diagonal matrix given by

[math]\displaystyle{ \begin{bmatrix} \mathbf{A}_{1} & \mathbf{0} & \cdots & \mathbf{0} \\ \mathbf{0} & \mathbf{A}_{2} & \cdots & \mathbf{0} \\ \vdots & \vdots & \ddots & \vdots \\ \mathbf{0} & \mathbf{0} & \cdots & \mathbf{A}_{n} \end{bmatrix}^{-1} = \begin{bmatrix} \mathbf{A}_{1}^{-1} & \mathbf{0} & \cdots & \mathbf{0} \\ \mathbf{0} & \mathbf{A}_{2}^{-1} & \cdots & \mathbf{0} \\ \vdots & \vdots & \ddots & \vdots \\ \mathbf{0} & \mathbf{0} & \cdots & \mathbf{A}_{n}^{-1} \end{bmatrix}. }[/math]

The eigenvalues and eigenvectors of [math]\displaystyle{ \mathbf{A} }[/math] are simply those of the [math]\displaystyle{ \mathbf{A}_k }[/math]s combined.

Block tridiagonal matrices

A block tridiagonal matrix is another special block matrix, which is just like the block diagonal matrix a square matrix, having square matrices (blocks) in the lower diagonal, main diagonal and upper diagonal, with all other blocks being zero matrices. It is essentially a tridiagonal matrix but has submatrices in places of scalars. A block tridiagonal matrix A has the form

[math]\displaystyle{ \mathbf{A} = \begin{bmatrix} \mathbf{B}_{1} & \mathbf{C}_{1} & & & \cdots & & \mathbf{0} \\ \mathbf{A}_{2} & \mathbf{B}_{2} & \mathbf{C}_{2} & & & & \\ & \ddots & \ddots & \ddots & & & \vdots \\ & & \mathbf{A}_{k} & \mathbf{B}_{k} & \mathbf{C}_{k} & & \\ \vdots & & & \ddots & \ddots & \ddots & \\ & & & & \mathbf{A}_{n-1} & \mathbf{B}_{n-1} & \mathbf{C}_{n-1} \\ \mathbf{0} & & \cdots & & & \mathbf{A}_{n} & \mathbf{B}_{n} \end{bmatrix} }[/math]

where Ak, Bk and Ck are square sub-matrices of the lower, main and upper diagonal respectively.

Block tridiagonal matrices are often encountered in numerical solutions of engineering problems (e.g., computational fluid dynamics). Optimized numerical methods for LU factorization are available and hence efficient solution algorithms for equation systems with a block tridiagonal matrix as coefficient matrix. The Thomas algorithm, used for efficient solution of equation systems involving a tridiagonal matrix can also be applied using matrix operations to block tridiagonal matrices (see also Block LU decomposition).

Block Toeplitz matrices

A block Toeplitz matrix is another special block matrix, which contains blocks that are repeated down the diagonals of the matrix, as a Toeplitz matrix has elements repeated down the diagonal.

A block Toeplitz matrix A has the form

[math]\displaystyle{ \mathbf{A} = \begin{bmatrix} \mathbf{A}_{(1,1)} & \mathbf{A}_{(1,2)} & & & \cdots & \mathbf{A}_{(1,n-1)} & \mathbf{A}_{(1,n)} \\ \mathbf{A}_{(2,1)} & \mathbf{A}_{(1,1)} & \mathbf{A}_{(1,2)} & & & & \mathbf{A}_{(1,n-1)} \\ & \ddots & \ddots & \ddots & & & \vdots \\ & & \mathbf{A}_{(2,1)} & \mathbf{A}_{(1,1)} & \mathbf{A}_{(1,2)} & & \\ \vdots & & & \ddots & \ddots & \ddots & \\ \mathbf{A}_{(n-1,1)} & & & & \mathbf{A}_{(2,1)} & \mathbf{A}_{(1,1)} & \mathbf{A}_{(1,2)} \\ \mathbf{A}_{(n,1)} & \mathbf{A}_{(n-1,1)} & \cdots & & & \mathbf{A}_{(2,1)} & \mathbf{A}_{(1,1)} \end{bmatrix}. }[/math]

Block transpose

A special form of matrix transpose can also be defined for block matrices, where individual blocks are reordered but not transposed. Let [math]\displaystyle{ A=(B_{ij}) }[/math] be a [math]\displaystyle{ k \times l }[/math] block matrix with [math]\displaystyle{ m \times n }[/math] blocks [math]\displaystyle{ B_{ij} }[/math], the block transpose of [math]\displaystyle{ A }[/math] is the [math]\displaystyle{ l \times k }[/math] block matrix [math]\displaystyle{ A^\mathcal{B} }[/math] with [math]\displaystyle{ m \times n }[/math] blocks [math]\displaystyle{ \left(A^\mathcal{B}\right)_{ij} = B_{ji} }[/math].[10]

As with the conventional trace operator, the block transpose is a linear mapping such that [math]\displaystyle{ (A + C)^\mathcal{B} = A^\mathcal{B} + C^\mathcal{B} }[/math]. However, in general the property [math]\displaystyle{ (A C)^\mathcal{B} = C^\mathcal{B} A^\mathcal{B} }[/math] does not hold unless the blocks of [math]\displaystyle{ A }[/math] and [math]\displaystyle{ C }[/math] commute.

Direct sum

For any arbitrary matrices A (of size m × n) and B (of size p × q), we have the direct sum of A and B, denoted by A [math]\displaystyle{ \oplus }[/math] B and defined as

[math]\displaystyle{ \mathbf{A} \oplus \mathbf{B} = \begin{bmatrix} a_{11} & \cdots & a_{1n} & 0 & \cdots & 0 \\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ a_{m1} & \cdots & a_{mn} & 0 & \cdots & 0 \\ 0 & \cdots & 0 & b_{11} & \cdots & b_{1q} \\ \vdots & \ddots & \vdots & \vdots & \ddots & \vdots \\ 0 & \cdots & 0 & b_{p1} & \cdots & b_{pq} \end{bmatrix}. }[/math]

For instance,

[math]\displaystyle{ \begin{bmatrix} 1 & 3 & 2 \\ 2 & 3 & 1 \end{bmatrix} \oplus \begin{bmatrix} 1 & 6 \\ 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 3 & 2 & 0 & 0 \\ 2 & 3 & 1 & 0 & 0 \\ 0 & 0 & 0 & 1 & 6 \\ 0 & 0 & 0 & 0 & 1 \end{bmatrix}. }[/math]

This operation generalizes naturally to arbitrary dimensioned arrays (provided that A and B have the same number of dimensions).

Note that any element in the direct sum of two vector spaces of matrices could be represented as a direct sum of two matrices.

Application

In linear algebra terms, the use of a block matrix corresponds to having a linear mapping thought of in terms of corresponding 'bunches' of basis vectors. That again matches the idea of having distinguished direct sum decompositions of the domain and range. It is always particularly significant if a block is the zero matrix; that carries the information that a summand maps into a sub-sum.

Given the interpretation via linear mappings and direct sums, there is a special type of block matrix that occurs for square matrices (the case m = n). For those we can assume an interpretation as an endomorphism of an n-dimensional space V; the block structure in which the bunching of rows and columns is the same is of importance because it corresponds to having a single direct sum decomposition on V (rather than two). In that case, for example, the diagonal blocks in the obvious sense are all square. This type of structure is required to describe the Jordan normal form.

This technique is used to cut down calculations of matrices, column-row expansions, and many computer science applications, including VLSI chip design. An example is the Strassen algorithm for fast matrix multiplication, as well as the Hamming(7,4) encoding for error detection and recovery in data transmissions.

The technique can also be used where the elements of the A,B,C, and D matrices do not all require the same field for their elements. For example, The matrix A can be over the field of complex numbers, while the matrix D can be over the field of real numbers. This can lead to valid operations involving the matrices, while simplifying the operations within one of the matrices. For example, if D has only real elements finding its inverse takes less calculations than if complex elements must be considered. But the reals is a subfield of the complex numbers (further it can be considered a projection), so the matrices operations can be well defined.

See also

Notes

  1. Eves, Howard (1980). Elementary Matrix Theory (reprint ed.). New York: Dover. p. 37. ISBN 0-486-63946-0. https://archive.org/details/elementarymatrix0000eves_r2m2. Retrieved 24 April 2013. "We shall find that it is sometimes convenient to subdivide a matrix into rectangular blocks of elements. This leads us to consider so-called partitioned, or block, matrices." 
  2. Anton, Howard (1994). Elementary Linear Algebra (7th ed.). New York: John Wiley. p. 30. ISBN 0-471-58742-7. "A matrix can be subdivided or partitioned into smaller matrices by inserting horizontal and vertical rules between selected rows and columns." 
  3. Macedo, H.D.; Oliveira, J.N. (2013). "Typing linear algebra: A biproduct-oriented approach". Science of Computer Programming 78 (11): 2160–2191. doi:10.1016/j.scico.2012.07.012. 
  4. Eves, Howard (1980). Elementary Matrix Theory (reprint ed.). New York: Dover. p. 37. ISBN 0-486-63946-0. https://archive.org/details/elementarymatrix0000eves_r2m2. Retrieved 24 April 2013. "A partitioning as in Theorem 1.9.4 is called a conformable partition of A and B." 
  5. Anton, Howard (1994). Elementary Linear Algebra (7th ed.). New York: John Wiley. p. 36. ISBN 0-471-58742-7. "...provided the sizes of the submatrices of A and B are such that the indicated operations can be performed." 
  6. Bernstein, Dennis (2005). Matrix Mathematics. Princeton University Press. pp. 44. ISBN 0-691-11802-7. 
  7. Taboga, Marco (2021). "Determinant of a block matrix", Lectures on matrix algebra.
  8. Silvester, J. R. (2000). "Determinants of Block Matrices". Math. Gaz. 84 (501): 460–467. doi:10.2307/3620776. http://www.ee.iisc.ernet.in/new/people/faculty/prasantg/downloads/blocks.pdf. Retrieved 2021-06-25. 
  9. Sothanaphan, Nat (January 2017). "Determinants of block matrices with noncommuting blocks". Linear Algebra and Its Applications 512: 202–218. doi:10.1016/j.laa.2016.10.004. 
  10. Mackey, D. Steven (2006). Structured linearizations for matrix polynomials (PDF) (Thesis). University of Manchester. ISSN 1749-9097. OCLC 930686781.

References