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. 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
n
by
m
matrix
M
by partitioning
n
into a collection
r
o
w
g
r
o
u
p
s
, and then partitioning
m
into a collection
c
o
l
g
r
o
u
p
s
. The original matrix is then considered as the "total" of these groups, in the sense that the
(
i
,
j
)
entry of the original matrix corresponds in a 1-to-1 way with some
(
s
,
t
)
offset entry of some
(
x
,
y
)
, where
x
∈
r
o
w
g
r
o
u
p
s
and
y
∈
c
o
l
g
r
o
u
p
s
.

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

The matrix

P
=
[
1
1
2
2
1
1
2
2
3
3
4
4
3
3
4
4
]
can be partitioned into 4 2×2 blocks

P
11
=
[
1
1
1
1
]
,
P
12
=
[
2
2
2
2
]
,
P
21
=
[
3
3
3
3
]
,
P
22
=
[
4
4
4
4
]
.
The partitioned matrix can then be written as

P
=
[
P
11
P
12
P
21
P
22
]
.
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" between two matrices
A
and
B
such that all submatrix products that will be used are defined. Given an
(
m
×
p
)
matrix
A
with
q
row partitions and
s
column partitions

A
=
[
A
11
A
12
⋯
A
1
s
A
21
A
22
⋯
A
2
s
⋮
⋮
⋱
⋮
A
q
1
A
q
2
⋯
A
q
s
]
and a
(
p
×
n
)
matrix
B
with
s
row partitions and
r
column partitions

B
=
[
B
11
B
12
⋯
B
1
r
B
21
B
22
⋯
B
2
r
⋮
⋮
⋱
⋮
B
s
1
B
s
2
⋯
B
s
r
]
,
that are compatible with the partitions of
A
, the matrix product

C
=
A
B
can be formed blockwise, yielding
C
as an
(
m
×
n
)
matrix with
q
row partitions and
r
column partitions. The matrices in the resulting matrix
C
are calculated by multiplying:

C
α
β
=
∑
γ
=
1
s
A
α
γ
B
γ
β
.
Or, using the Einstein notation that implicitly sums over repeated indices:

C
α
β
=
A
α
γ
B
γ
β
.
If a matrix is partitioned into four blocks, it can be inverted blockwise as follows:

where **A**, **B**, **C** and **D** have arbitrary size. (**A** and **D** must be square, so that they can be inverted. Furthermore, **A** and **D**−**CA**^{−1}**B** must be nonsingular.)

Equivalently,

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

A
=
[
A
1
0
⋯
0
0
A
2
⋯
0
⋮
⋮
⋱
⋮
0
0
⋯
A
n
]
where **A**_{k} is a square matrix; in other words, it is the direct sum of **A**_{1}, …, **A**_{n}. It can also be indicated as **A**_{1}
⊕
**A**_{2}
⊕
…
⊕
**A**_{n} or diag(**A**_{1}, **A**_{2},
…
, **A**_{n}) (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

det
A
=
det
A
1
×
…
×
det
A
n
,

tr
A
=
tr
A
1
+
⋯
+
tr
A
n
.
The inverse of a block diagonal matrix is another block diagonal matrix, composed of the inverse of each block, as follows:

(
A
1
0
⋯
0
0
A
2
⋯
0
⋮
⋮
⋱
⋮
0
0
⋯
A
n
)
−
1
=
(
A
1
−
1
0
⋯
0
0
A
2
−
1
⋯
0
⋮
⋮
⋱
⋮
0
0
⋯
A
n
−
1
)
.
The eigenvalues and eigenvectors of
A
are simply those of
A
1
and
A
2
and ... and
A
n
(combined).

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

A
=
[
B
1
C
1
⋯
0
A
2
B
2
C
2
⋱
⋱
⋱
⋮
A
k
B
k
C
k
⋮
⋱
⋱
⋱
A
n
−
1
B
n
−
1
C
n
−
1
0
⋯
A
n
B
n
]
where **A**_{k}, **B**_{k} and **C**_{k} 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).

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. The individual block matrix elements, Aij, must also be a Toeplitz matrix.

A block Toeplitz matrix **A** has the form

A
=
[
A
(
1
,
1
)
A
(
1
,
2
)
⋯
A
(
1
,
n
−
1
)
A
(
1
,
n
)
A
(
2
,
1
)
A
(
1
,
1
)
A
(
1
,
2
)
A
(
1
,
n
−
1
)
⋱
⋱
⋱
⋮
A
(
2
,
1
)
A
(
1
,
1
)
A
(
1
,
2
)
⋮
⋱
⋱
⋱
A
(
n
−
1
,
1
)
A
(
2
,
1
)
A
(
1
,
1
)
A
(
1
,
2
)
A
(
n
,
1
)
A
(
n
−
1
,
1
)
⋯
A
(
2
,
1
)
A
(
1
,
1
)
]
.
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**
⊕
**B** and defined as

A
⊕
B
=
[
a
11
⋯
a
1
n
0
⋯
0
⋮
⋯
⋮
⋮
⋯
⋮
a
m
1
⋯
a
m
n
0
⋯
0
0
⋯
0
b
11
⋯
b
1
q
⋮
⋯
⋮
⋮
⋯
⋮
0
⋯
0
b
p
1
⋯
b
p
q
]
.
For instance,

[
1
3
2
2
3
1
]
⊕
[
1
6
0
1
]
=
[
1
3
2
0
0
2
3
1
0
0
0
0
0
1
6
0
0
0
0
1
]
.
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.

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.