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.
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.
Block matrix algebra arises in general from biproducts in categories of matrices.
thumb|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.
Example
The matrix
<math display="block">\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 visualized as divided into four blocks, as
<math display="block">\mathbf{P} = \left[
\begin{array}{cc|cc}
1 & 2 & 2 & 7 \\
1 & 5 & 6 & 2 \\
\hline
3 & 3 & 4 & 5 \\
3 & 3 & 6 & 7
\end{array}
\right].</math>
The horizontal and vertical lines have no special mathematical meaning, but are a common way to visualize a partition.
<math display="block">\mathbf{P} = \begin{bmatrix}
\mathbf{P}_{11} & \mathbf{P}_{12} \\
\mathbf{P}_{21} & \mathbf{P}_{22}
\end{bmatrix}.</math>
Formal definition
Let <math>A \in \mathbb{C}^{m \times n}</math>. A partitioning of <math>A</math> is a representation of <math>A</math> in the form
<math display="block">A = \begin{bmatrix}
A_{11} & A_{12} & \cdots & A_{1q} \\
A_{21} & A_{22} & \cdots & A_{2q} \\
\vdots & \vdots & \ddots & \vdots \\
A_{p1} & A_{p2} & \cdots & A_{pq}
\end{bmatrix},</math>
where <math>A_{ij} \in \mathbb{C}^{m_i \times n_j}</math> are contiguous submatrices, <math display="inline">\sum_{i=1}^{p} m_i = m</math>, and <math display="inline">\sum_{j=1}^{q} n_j = n</math>. The elements <math>A_{ij}</math> of the partition are called blocks. As with the conventional trace operator, the block transpose is a linear mapping such that <math>(A + C)^\mathcal{B} = A^\mathcal{B} + C^\mathcal{B} </math>. between two matrices <math>A</math> and <math>B</math> such that all submatrix products that will be used are defined.
Let <math>A</math> be the matrix defined in , and let <math>B</math> be the matrix defined in . Then the matrix product
<math display="block"> C = AB </math>
can be performed blockwise, yielding <math>C</math> as an <math>(p \times s)</math> matrix. The matrices in the resulting matrix <math>C</math> are calculated by multiplying:
<math display="block"> C_{ij} = \sum_{k=1}^{q} A_{ik}B_{kj}. </math>
Or, using the Einstein notation that implicitly sums over repeated indices:
<math display="block"> C_{ij} = A_{ik}B_{kj}. </math>
Depicting <math>C</math> as a matrix, we have
Equivalently, by permuting the blocks:<sup>, Sect. 11, pp. 413-414 </sup>.
Computing submatrix inverses from the full inverse
By the symmetry between a matrix and its inverse in the block inversion formula, if a matrix P and its inverse P<sup>−1</sup> are partitioned conformally:
<math display="block">P = \begin{bmatrix}
{A} & {B} \\
{C} & {D}
\end{bmatrix}, \quad P^{-1} = \begin{bmatrix}
{E} & {F} \\
{G} & {H}
\end{bmatrix}</math>
then the inverse of any principal submatrix can be computed from the corresponding blocks of P<sup>−1</sup>:
<math display="block">{A}^{-1} = {E} - {FH}^{-1}{G}</math>
<math display="block">{D}^{-1} = {H} - {GE}^{-1}{F}</math>
This relationship follows from recognizing that E<sup>−1</sup> = A − BD<sup>−1</sup>C (the Schur complement), and applying the same block inversion formula with the roles of P and P<sup>−1</sup> reversed.
Determinant
The formula for the determinant of a <math>2 \times 2</math>-matrix above continues to hold, under appropriate further assumptions, for a matrix composed of four submatrices <math>A, B, C, D</math> with <math>A</math> and <math>D</math> square. The easiest such formula, which can be proven using either the Leibniz formula or a factorization involving the Schur complement, is
<math display="block">\det\begin{bmatrix}A& B\\ C& D\end{bmatrix} = \det(AD - BC).</math>
Similar statements hold when <math>AB=BA</math>, <math>AC=CA</math>, or . Namely, if <math>AC = CA</math>, then
<math display="block">\det\begin{bmatrix}A& B\\ C& D\end{bmatrix} = \det(AD - CB).</math>
Note the change in order of <math>C</math> and <math>B</math> (we have <math>CB</math> instead of <math>BC</math>). Similarly, if <math>BD = DB</math>, then <math>AD</math> should be replaced with <math>DA</math> (i.e. we get <math>\det(DA - BC)</math>) and if <math>AB = BA</math>, then we should have <math>\det(DA - CB)</math>. Note for the last two results, you have to use commutativity of the underlying ring, but not for the first two.
This formula has been generalized to matrices composed of more than <math>2 \times 2</math> blocks, again under appropriate commutativity conditions among the individual blocks.
For <math>A = D </math> and <math>B=C</math>, the following formula holds (even if <math>A</math> and <math>B</math> do not commute) That is, a block diagonal matrix A has the form
<math display="block">{A} = \begin{bmatrix}
A_1 & 0 & \cdots & 0 \\
0 & A_2 & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & A_n
\end{bmatrix}</math>
where A<sub>k</sub> is a square matrix for all k = 1, ..., n. In other words, matrix A is the direct sum of A<sub>1</sub>, ..., A<sub>n</sub>. (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>\begin{align}
\det{A} &= \det{A}_1 \times \cdots \times \det{A}_n,
\end{align}</math> and
:<math>\begin{align}
\operatorname{tr}{A} &= \operatorname{tr} {A}_1 + \cdots + \operatorname{tr} {A}_n.\end{align}</math>
<math display="block">\begin{bmatrix}
{A}_{1} & {0} & \cdots & {0} \\
{0} & {A}_{2} & \cdots & {0} \\
\vdots & \vdots & \ddots & \vdots \\
{0} & {0} & \cdots & {A}_{n}
\end{bmatrix}^{-1} = \begin{bmatrix}
{A}_{1}^{-1} & {0} & \cdots & {0} \\
{0} & {A}_{2}^{-1} & \cdots & {0} \\
\vdots & \vdots & \ddots & \vdots \\
{0} & {0} & \cdots & {A}_{n}^{-1}
\end{bmatrix}.
</math>
The eigenvalues
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 triangular matrices
An <math>n \times n</math> matrix <math>A</math> is upper block triangular (or block upper triangular) if there are positive integers <math>n_1, \ldots, n_k</math> such that <math>n = n_1 + n_2 + \ldots + n_k</math> and
<math display="block">A = \begin{bmatrix}
A_{11} & A_{12} & \cdots & A_{1k} \\
0 & A_{22} & \cdots & A_{2k} \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & A_{kk}
\end{bmatrix},</math>
where the matrix <math>A_{ij}</math> is <math>n_i \times n_j</math> for all <math>i, j = 1, \ldots, k</math>.
