Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Open In Colab Binder

In 1858, in A Memoir on the Theory of Matrices, Arthur Cayley systematically treated the matrix as a complete algebraic entity—not a collection of coefficients taken from a system of equations, but a “single object” that can be added, multiplied, and inverted. This shift in viewpoint leads naturally to a question: if this object is overwhelmingly large, can we cut it into pieces and perform algebraic operations directly on those pieces, just as we would with ordinary numbers?

Over the following century, this question spread from the halls of abstract algebra to the computational work of science and engineering, and in the end it profoundly reshaped the underlying architecture of modern computing.

The Schur complement shows the power of block operations. Let the block matrix with compatible sizes be

M=(ABCD)\mathbf{M} = \begin{pmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{C} & \mathbf{D} \end{pmatrix}

If A\mathbf{A} is an invertible square matrix, block Gaussian elimination gives det⁡M=det⁡Adet⁡(D−CA−1B)\det\mathbf{M}=\det\mathbf{A}\det(\mathbf{D}-\mathbf{C}\mathbf{A}^{-1}\mathbf{B}). Here S=D−CA−1B\mathbf{S}=\mathbf{D}-\mathbf{C}\mathbf{A}^{-1}\mathbf{B} is called the Schur complement. When the sizes are compatible and the blocks that must be inverted are invertible, submatrices can serve as units of computation; but matrix multiplication is in general not commutative, so the order of the factors cannot be changed at will. This structure has important applications in multivariate Gaussian distributions, control theory, and convex optimization.

As problems in science and engineering grew in scale, “blocking” also became an important way to organize computation: divide a large matrix into manageable sub-blocks, schedule the movement of data, distribute the work, and then combine the results according to compatible rules of operation. Today’s distributed computing and CPU cache blocking still exploit this idea. The concrete benefits depend on the data layout, the hardware, and the algorithm; partitioning into blocks does not by itself guarantee fewer arithmetic operations.

In 1969, Volker Strassen showed that partitioning into blocks can also change the number of operations. The standard algorithm needs n3n^3 scalar multiplications to compute the product of two n×nn\times n matrices, but this is not a proven lower bound. He constructed a formula for 2×22\times2 block multiplication that needs only 7 block multiplications instead of the 8 required by direct expansion.

Precisely because the objects being operated on inside the blocks are still matrices, the technique can be applied recursively down to scalars or to suitably small blocks, lowering the computational complexity of matrix multiplication directly from O(n3)O(n^3) to O(nlog⁡27)≈O(n2.807)O(n^{\log_2 7}) \approx O(n^{2.807}). Strassen’s paper bore a strikingly provocative title: Gaussian Elimination is not Optimal. This was not merely a matter of saving a few multiplications; it changed how people understood the operation count of the standard algorithm and set off a “gold rush” around the matrix multiplication exponent ω\omega that is still being fought out at the research frontier today.

The story of block matrices teaches us that structure is power. When the dimension of a problem is hopelessly high, seeing the block geometry inside it is like holding the key that cuts the problem down to size. Partitioning into blocks is not a passive compromise but a profound way of thinking that makes complex large-scale systems modular and parallel—from the stiffness assembly of finite element analysis and the partial trace of density matrices in quantum mechanics to the tensor blocking of the self-attention mechanism in today’s deep-learning Transformer architectures, this key keeps turning in the deepest layers of the computational world.

Chapter Structure and Learning Objectives

Cayley’s idea of “the matrix as an object” is the prerequisite for block thinking, the Schur complement is an important application of it, and Strassen’s algorithm is its most counterintuitive demonstration. The task of this chapter is to place this way of thinking on a rigorous algebraic foundation.

§5.1 first establishes the language: the definition of block matrices, together with addition, scalar multiplication, and transposition. The rules for these basic operations are entirely analogous to those for ordinary matrices, but they call for care with one extra condition, the “compatibility of block sizes.”

§5.2 is the core of the chapter: block multiplication. Two block matrices are multiplied by a rule that has exactly the same form as ordinary matrix multiplication—simply replace “entries” by “submatrix blocks”—provided that the dimensions of adjacent blocks match. Strassen’s algorithm was born within the framework of this section; its formula with 7 multiplications looks like magic, yet careful checking shows it to be exactly right.

§5.3 discusses inversion of block matrices. For a 2×22 \times 2 block structure, the Schur complement provides an elegant inversion formula and at the same time reveals the precise relationship between “the large matrix is invertible” and “certain sub-blocks are invertible.”

§5.4 turns to advanced topics: the tensor product (Kronecker product) and the partial trace. The tensor product “weaves” two matrices into a larger matrix and is the mathematical foundation both of composite systems in quantum mechanics and of the multi-head attention mechanism in deep learning; the partial trace is a reduction operation that eliminates the degrees of freedom of one subsystem, is in general not invertible, and is used to “extract” information about a subsystem from a composite system.

Once you have read this chapter, your fear of “large matrices” should be somewhat smaller—because you will know that a large matrix is nothing more than a few small matrices put together according to a pattern.


5.1 Definition and Basic Operations of Block Matrices

A block matrix is a large matrix divided into several smaller matrix blocks, which can be regarded as the “sub-entries” of the matrix. Partitioning in this way turns operations on a large matrix into operations on the individual small matrices, thereby simplifying the computation.

Below we introduce three basic operations on block matrices.

5.1.1 Addition of Block Matrices

If two block matrices have the same block structure, their sum is defined by adding corresponding blocks. Let

A=[A00A01A10A11],B=[B00B01B10B11],\mathbf{A} = \begin{bmatrix} \mathbf{A}_{00} & \mathbf{A}_{01} \\ \mathbf{A}_{10} & \mathbf{A}_{11} \end{bmatrix}, \quad \mathbf{B} = \begin{bmatrix} \mathbf{B}_{00} & \mathbf{B}_{01} \\ \mathbf{B}_{10} & \mathbf{B}_{11} \end{bmatrix},

Then

A+B=[A00+B00A01+B01A10+B10A11+B11].\mathbf{A} + \mathbf{B} = \begin{bmatrix} \mathbf{A}_{00}+\mathbf{B}_{00} & \mathbf{A}_{01}+\mathbf{B}_{01} \\[1mm] \mathbf{A}_{10}+\mathbf{B}_{10} & \mathbf{A}_{11}+\mathbf{B}_{11} \end{bmatrix}.

5.1.2 Scalar Multiplication of Block Matrices

To perform scalar multiplication on a block matrix, simply multiply each block by the scalar. That is, if cc is a scalar,

cA=[cA00cA01cA10cA11].c\mathbf{A} = \begin{bmatrix} c\mathbf{A}_{00} & c\mathbf{A}_{01} \\[1mm] c\mathbf{A}_{10} & c\mathbf{A}_{11} \end{bmatrix}.

5.1.3 Transpose of Block Matrices

Taking the transpose of a block matrix requires both transposing each block and swapping the positions of the blocks. Writing A⊤\mathbf{A}^\top for the transpose of A\mathbf{A}, we have

A⊤=[(A00)⊤(A10)⊤(A01)⊤(A11)⊤].\mathbf{A}^\top = \begin{bmatrix} (\mathbf{A}_{00})^\top & (\mathbf{A}_{10})^\top \\[1mm] (\mathbf{A}_{01})^\top & (\mathbf{A}_{11})^\top \end{bmatrix}.

5.1.4 ◆4D Tensor Representation and Indexing of Block Matrices

Besides being viewed as a two-dimensional structure made up of small matrix blocks, a block matrix can also be regarded as a 4D tensor; this viewpoint is important in modern machine learning and quantum mechanics. With the 4D tensor representation we can handle batched block matrix operations more naturally and take advantage of the tensor operations offered by modern computing frameworks.

For a 4×44 \times 4 matrix partitioned into a 2×22 \times 2 block structure, we have the following correspondence:

2D matrix index: A[r,c]\mathbf{A}[r, c], where 0≤r,c<40 \leq r, c < 4

4D tensor index: A[i,j,k,l]\mathcal{A}[i, j, k, l], where

  • i=⌊r/2⌋i = \lfloor r/2 \rfloor (block-row index)

  • j=⌊c/2⌋j = \lfloor c/2 \rfloor (block-column index)

  • k=rmod⁡2k = r \operatorname{mod} 2 (within-block row index)

  • l=cmod⁡2l = c \operatorname{mod} 2 (within-block column index)

Summary.
Representing a block matrix as a 4D tensor gives us a powerful tool, especially in modern computing environments that call for large numbers of block-level operations. Understanding this representation and its indexing rules helps us design and implement block matrix algorithms more effectively.

5.1.5 Python: Block Matrix Conversions with NumPy

5.2 Multiplication of Block Matrices

Matrix multiplication AB\mathbf{AB} admits four complementary geometric views, each revealing a different computational structure. Understanding these four views is the key both to understanding “why” general matrix multiplication is defined as it is and to extending multiplication to the language of blocks.

5.2.1 View One: Inner Products—Entry-by-Entry Computation

(AB)ij=rowi(A)⋅colj(B)=∑kaikbkj,(\mathbf{AB})_{ij} = \mathbf{row}_i(\mathbf{A}) \cdot \mathbf{col}_j(\mathbf{B}) = \sum_{k} a_{ik} b_{kj},

where rowi(A)\mathbf{row}_i(\mathbf{A}) denotes row ii of A\mathbf{A} and colj(B)\mathbf{col}_j(\mathbf{B}) denotes column jj of B\mathbf{B}. Each entry of the result matrix is the inner product of a row of the left matrix with a column of the right matrix.


5.2.2 View Two: Linear Combinations of the Column Vectors of A\mathbf{A}

Each column of AB\mathbf{AB} is a linear combination of the column vectors of A\mathbf{A}, with coefficients supplied by the corresponding column of B\mathbf{B}:

AB=A[col0(B)col1(B)⋯coln−1(B)]=[A col0(B)A col1(B)⋯A coln−1(B)].\mathbf{AB} = \mathbf{A}\begin{bmatrix} \mathbf{col}_0(\mathbf{B}) & \mathbf{col}_1(\mathbf{B}) & \cdots & \mathbf{col}_{n-1}(\mathbf{B}) \end{bmatrix} = \begin{bmatrix} \mathbf{A}\,\mathbf{col}_0(\mathbf{B}) & \mathbf{A}\,\mathbf{col}_1(\mathbf{B}) & \cdots & \mathbf{A}\,\mathbf{col}_{n-1}(\mathbf{B}) \end{bmatrix}.

In other words, column jj of AB\mathbf{AB} is the linear combination of the columns of A\mathbf{A} whose coefficients are the components of colj(B)\mathbf{col}_j(\mathbf{B}).

Batched generalization (block view). If the columns of B\mathbf{B} are partitioned into several blocks [B0∣B1∣⋯ ][\mathbf{B}_0 \mid \mathbf{B}_1 \mid \cdots], then

AB=[AB0AB1⋯].\mathbf{AB} = \begin{bmatrix} \mathbf{A}\mathbf{B}_0 & \mathbf{A}\mathbf{B}_1 & \cdots \end{bmatrix}.

Each block ABk\mathbf{A}\mathbf{B}_k can be computed independently in parallel—this is precisely the algebraic basis of batched matrix operations on GPUs.


5.2.3 View Three: Linear Combinations of the Row Vectors of B\mathbf{B}

Symmetrically, each row of AB\mathbf{AB} is a linear combination of the row vectors of B\mathbf{B}, with coefficients supplied by the corresponding row of A\mathbf{A}:

AB=[row0(A)row1(A)⋮rowm−1(A)]B=[row0(A) Brow1(A) B⋮rowm−1(A) B].\mathbf{AB} = \begin{bmatrix} \mathbf{row}_0(\mathbf{A}) \\ \mathbf{row}_1(\mathbf{A}) \\ \vdots \\ \mathbf{row}_{m-1}(\mathbf{A}) \end{bmatrix} \mathbf{B} = \begin{bmatrix} \mathbf{row}_0(\mathbf{A})\,\mathbf{B} \\ \mathbf{row}_1(\mathbf{A})\,\mathbf{B} \\ \vdots \\ \mathbf{row}_{m-1}(\mathbf{A})\,\mathbf{B} \end{bmatrix}.

In other words, row ii of AB\mathbf{AB} is the linear combination of the rows of B\mathbf{B} whose coefficients are the components of rowi(A)\mathbf{row}_i(\mathbf{A}).


5.2.4 Block Matrix Multiplication

In the language of block matrices, the three views above are unified by a single formula.


5.2.5 View Four: Outer-Product Expansion—Sums of Rank-One Matrices

uv∗=∣u⟩⟨v∣\mathbf{u}\mathbf{v}^* = |\mathbf{u}\rangle\langle\mathbf{v}| is called the outer product of u\mathbf{u} and v\mathbf{v}; when both vectors are nonzero, it is a rank-one matrix.

The block multiplication theorem (AB)ij=∑kAikBkj(\mathbf{AB})_{ij} = \sum_k \mathbf{A}_{ik}\mathbf{B}_{kj} has a particularly intuitive geometric interpretation: when the blocks degenerate into single columns of the left factor and single rows of the right factor, each term colk(A) rowk(B)\mathbf{col}_k(\mathbf{A})\,\mathbf{row}_k(\mathbf{B}) is a matrix of rank at most 1; when both vectors are nonzero its rank is 1, and the whole product is the sum of these rank-one matrices:

AB=∑kcolk(A) rowk(B).\mathbf{AB} = \sum_{k} \mathbf{col}_k(\mathbf{A})\, \mathbf{row}_k(\mathbf{B}).

Generalizing to the language of blocks, each term AikBkj\mathbf{A}_{ik}\mathbf{B}_{kj} is a “block-product contribution” whose rank need not be 1; summing them recovers the full product—this is precisely the geometric essence of the theorem.


5.2.6 ◆ Strassen’s Algorithm: The Power of Block Multiplication

A striking application of the block multiplication theorem is Strassen’s algorithm (Strassen, 1969). Intuitively, multiplying two 2×22\times 2 matrices takes 8 scalar multiplications; Strassen discovered that 7 suffice, by constructing the following 7 intermediate quantities:

M0=(A00+A11)(B00+B11),M1=(A10+A11)B00,M2=A00(B01−B11),M3=A11(B10−B00),M4=(A00+A01)B11,M5=(A10−A00)(B00+B01),M6=(A01−A11)(B10+B11),\begin{aligned} \mathbf{M}_0 &= (\mathbf{A}_{00}+\mathbf{A}_{11})(\mathbf{B}_{00}+\mathbf{B}_{11}),\\ \mathbf{M}_1 &= (\mathbf{A}_{10}+\mathbf{A}_{11})\mathbf{B}_{00},\\ \mathbf{M}_2 &= \mathbf{A}_{00}(\mathbf{B}_{01}-\mathbf{B}_{11}),\\ \mathbf{M}_3 &= \mathbf{A}_{11}(\mathbf{B}_{10}-\mathbf{B}_{00}),\\ \mathbf{M}_4 &= (\mathbf{A}_{00}+\mathbf{A}_{01})\mathbf{B}_{11},\\ \mathbf{M}_5 &= (\mathbf{A}_{10}-\mathbf{A}_{00})(\mathbf{B}_{00}+\mathbf{B}_{01}),\\ \mathbf{M}_6 &= (\mathbf{A}_{01}-\mathbf{A}_{11})(\mathbf{B}_{10}+\mathbf{B}_{11}), \end{aligned}

and then recombining them using additions:

C00=M0+M3−M4+M6,C01=M2+M4,C10=M1+M3,C11=M0−M1+M2+M5.\mathbf{C}_{00} = \mathbf{M}_0+\mathbf{M}_3-\mathbf{M}_4+\mathbf{M}_6,\quad \mathbf{C}_{01} = \mathbf{M}_2+\mathbf{M}_4,\quad \mathbf{C}_{10} = \mathbf{M}_1+\mathbf{M}_3,\quad \mathbf{C}_{11} = \mathbf{M}_0-\mathbf{M}_1+\mathbf{M}_2+\mathbf{M}_5.

Applying this technique recursively to n×nn\times n matrices lowers the computational complexity from O(n3)O(n^3) to O(nlog⁡27)≈O(n2.807)O(n^{\log_2 7}) \approx O(n^{2.807}).




5.2.7 Python: Block Matrix Multiplication with NumPy

5.3 Inverses of Matrices in Block Form

For matrices with certain special structures (such as diagonal, upper triangular, or lower triangular matrices), we can use the block structure to invert in stages and reduce the computational complexity. In the partitions considered here, every block on the diagonal is required to be a square matrix.

5.3.1 Inverses of Block Diagonal Matrices

These properties make computations with block diagonal matrices very efficient, because we can operate on each diagonal block separately and then combine the results.


5.3.2 The Block Formula for the Inverse and the Schur Complement

For a general 2×22\times 2 block matrix

M=(ABCD),\mathbf{M} = \begin{pmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{C} & \mathbf{D} \end{pmatrix},

where A\mathbf{A} is a p×pp\times p square matrix and D\mathbf{D} is a q×qq\times q square matrix, we would like to follow the strategy of §5.3.1 and reduce the computation of M−1\mathbf{M}^{-1} to inverting smaller matrices. The difficulty is that the off-diagonal blocks B\mathbf{B} and C\mathbf{C} couple the blocks to one another—the way out is to first use block multiplication to “eliminate” one of the off-diagonal blocks.

Derivation: block Gaussian elimination. Assume that A\mathbf{A} is invertible. Imitating the step in ordinary Gaussian elimination of “using row 0 to eliminate the entries below it,” we left-multiply by a block lower triangular matrix to eliminate the block C\mathbf{C} in the lower-left corner of M\mathbf{M}:

(I0−CA−1I)(ABCD)=(ABC−CA−1AD−CA−1B)=(AB0S),\begin{pmatrix} \mathbf{I} & \mathbf{0} \\ -\mathbf{C}\mathbf{A}^{-1} & \mathbf{I} \end{pmatrix} \begin{pmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{C} & \mathbf{D} \end{pmatrix} = \begin{pmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{C}-\mathbf{C}\mathbf{A}^{-1}\mathbf{A} & \mathbf{D}-\mathbf{C}\mathbf{A}^{-1}\mathbf{B} \end{pmatrix} = \begin{pmatrix} \mathbf{A} & \mathbf{B} \\ \mathbf{0} & \mathbf{S} \end{pmatrix},

where the matrix that appears naturally in the lower-right corner,

S=D−C A−1B\mathbf{S} = \mathbf{D} - \mathbf{C}\,\mathbf{A}^{-1}\mathbf{B}

is called the Schur complement of A\mathbf{A} in M\mathbf{M}. What remains after the elimination is a block upper triangular matrix, and by Proposition 1, to be established in §5.3.3 (a block triangular matrix is invertible ↔\leftrightarrow each diagonal block is invertible), as long as S\mathbf{S} is also invertible, the whole matrix M\mathbf{M} is invertible.

Note the cancellation CA−1B−D=−S\mathbf{C}\mathbf{A}^{-1}\mathbf{B} - \mathbf{D} = -\mathbf{S} in the computation of the lower-left block—the Schur complement is precisely the “recipe” that makes all the cross terms cancel exactly. This is no coincidence; it is the trace that block Gaussian elimination leaves behind at the level of the formula.

Summary.
The Schur complement is not a formula to be memorized; it is the natural product of block Gaussian elimination. The residue left in the lower-right corner after C\mathbf{C} has been eliminated measures exactly “how much invertibility D\mathbf{D} retains once the coupling transmitted through A\mathbf{A} has been subtracted.” Through the block formula, inverting a large matrix is reduced to inverting two smaller matrices (A\mathbf{A} and S\mathbf{S}) plus matrix multiplications—this is the embryonic form of the block elimination and LU decomposition of Chapter 6.


5.3.3 Inverses of Upper and Lower Triangular Matrices

Triangular matrices are an important class of matrices with special structure, and both the computation and the properties of their inverses have distinctive features.

Basic Definitions

Basic Properties of Triangular Matrices

Triangular matrices are well behaved under multiplication: the product of two upper triangular matrices is again upper triangular, and the product of two lower triangular matrices is again lower triangular.

Inverses of Block Triangular Matrices

Continuing the block matrix inversion of the previous section, a square block matrix with triangular structure has a comparatively simple inverse, which likewise preserves the triangular structure:

Existence of Inverses of Triangular Matrices


Here is a concrete example:

Group Structure

Summary

The inversion of triangular matrices follows clear rules: invertibility is completely determined by the diagonal entries, and the inverse preserves the same triangular structure. The block form of the inversion formula provides an effective tool for handling large, complicated matrices, and the group structure lays an important foundation for matrix theory and numerical methods.

5.4 ◆Advanced Topics in Block Matrices

5.4.1 The Tensor Product (Kronecker Product) and Block Matrices

The tensor product is an important application of block matrices, especially in quantum mechanics and multilinear algebra. Chapter 4 (Definition 23) already defined the tensor product space V⊗WV\otimes W at the level of abstract vector spaces and announced that the details of its operations would be left to this chapter. In the setting of matrix algebra, the tensor product and the Kronecker product are two names for the same concept—indeed, the space of m×nm\times n matrices is itself isomorphic to a tensor product space, Mm×n(R)≅Rm⊗RnM_{m\times n}(\mathbb{R}) \cong \mathbb{R}^m \otimes \mathbb{R}^n (each rank-one matrix uv⊤\mathbf{u}\mathbf{v}^\top corresponds to the pure tensor u⊗v\mathbf{u}\otimes\mathbf{v}), so the Kronecker product of this section is precisely the realization of the abstract tensor product in concrete matrix coordinates. Tensor product matrices have a natural block structure.

These properties are very useful in practical computation—especially the mixed-product property, which allows us to break complicated tensor product operations down into simpler matrix multiplications.

As the definition shows, the tensor product naturally forms a block matrix structure in which each block is the original matrix B\mathbf{B} multiplied by the corresponding entry of A\mathbf{A}.

Connection with the 4D tensor representation.
Note that this block structure of the tensor product corresponds exactly to the 4D tensor representation discussed in Section 5.1.4. If the tensor product A⊗B\mathbf{A} \otimes \mathbf{B} is viewed as a 4D tensor, then

(A⊗B)ijkl=aij⋅bkl(\mathbf{A} \otimes \mathbf{B})_{ijkl} = a_{ij} \cdot b_{kl}

This corresponds to the notation A[i,j,k,l]\mathcal{A}[i,j,k,l] of Section 5.1.4. Each block aijBa_{ij}\mathbf{B} can be understood as a “slice” of the 4D tensor.

Tensor Products of Vectors

When we work with vectors, the tensor product can likewise be represented by a block structure. If v∈Rm\mathbf{v} \in \mathbb{R}^m and w∈Rn\mathbf{w} \in \mathbb{R}^n, then v⊗w∈Rmn\mathbf{v} \otimes \mathbf{w} \in \mathbb{R}^{mn}:

v⊗w=[v0wv1w⋮vm−1w]\mathbf{v} \otimes \mathbf{w} = \begin{bmatrix} v_0\mathbf{w} \\ v_1\mathbf{w} \\ \vdots \\ v_{m-1}\mathbf{w} \end{bmatrix}

This shows that the tensor product of vectors can be viewed as a special kind of block matrix. In the framework of 4D tensors, it can be regarded as a degenerate case in which some axes have size 1.

Advantages of the Block Matrix Representation

From a computational point of view, the block representation of the tensor product has several important advantages:

  1. Clear structure. The block representation shows directly how the tensor product is constructed and corresponds naturally to the 4D tensor indexing of Section 5.1.4

  2. Computational convenience. The block structure can be used to design more efficient parallel algorithms, especially in combination with batched operations on 4D tensors

  3. Memory management. For large sparse matrices, the block representation can save storage space

  4. Numerical stability. Block operations help control the accumulation of numerical errors

Applications in Quantum Mechanics

In quantum mechanics, the tensor product is the basic tool for describing composite quantum systems. When two quantum systems are combined, the total state space is the tensor product of the state spaces of the subsystems. Combined with the 4D tensor representation of Section 5.1.4, we can handle these high-dimensional structures more efficiently, especially when computing the various operations involved in quantum entanglement and quantum information processing.


5.4.2 Trace and Partial Trace of Block Matrices

The trace and the partial trace are important when dealing with matrices that have a tensor product structure, especially in quantum information and the analysis of many-body systems. Building on the 4D tensor representation of Section 5.1.4, this section systematically introduces how these operations are computed.

5.4.2.1 The Trace of a Block Matrix

For tensor product matrices, the trace has a particularly simple property:

5.4.2.2 Definition and Computation of the Partial Trace

The partial trace is the natural generalization of the trace to tensor product structures, used to take a trace “partially.” Using the 4D tensor representation of Section 5.1.4, we can give a precise definition of the partial trace.

Computing the Partial Trace from the Block Matrix Viewpoint

From a practical computational standpoint, block matrices provide a more intuitive method:

Correspondence between the 4D Tensor and Block Computations

A Complete Worked Example

5.5 Chapter Summary

Review of the Theoretical Thread

This chapter started from a simple question: when a matrix is too large to handle directly, can its internal structure become the way forward for computation? The four sections unfolded in turn along a single logical thread, each answering the question left open by the one before.

§5.1 laid the foundation of the language. Although the rules for addition, scalar multiplication, and transposition of block matrices are entirely analogous to those for ordinary matrices, the extra condition of “compatibility of block sizes” runs through all of them and cannot be ignored. The 4D tensor viewpoint A[i,j,k,l]\mathcal{A}[i,j,k,l] further gives the block indices and the within-block entry indices a single unified address, which both corresponds directly to batched computation in NumPy and lays down the conceptual interface for the Kronecker product later on.

§5.2 revealed the true power of the language of blocks. Matrix multiplication has four complementary geometric intuitions—inner products, column combinations, row combinations, and outer-product expansion—and all four converge in the block framework to one and the same formula: (AB)ij=∑kAikBkj(\mathbf{AB})_{ij}=\sum_k\mathbf{A}_{ik}\mathbf{B}_{kj}. This formula, which formally “changes nothing,” nevertheless enabled Strassen, with a 2×22\times 2 block technique, to lower the computational complexity of matrix multiplication from n3n^3 to n2.807n^{2.807}, overturning an intuition a century and a half old.

§5.3 built on multiplication to discuss strategies for inverting in blocks. From the block-by-block inversion of block diagonal matrices, to the central role played by the Schur complement S=D−CA−1B\mathbf{S}=\mathbf{D}-\mathbf{C}\mathbf{A}^{-1}\mathbf{B} in a general 2×22\times 2 block structure, to the rigorous characterization of triangular matrices, for which nonzero diagonal entries are the sole condition for invertibility, all three make the same point: the structure of inversion depends on the structure of multiplication. The invertible upper triangular matrices of a fixed size form a group under multiplication, and this algebraic property directly drives the correctness argument for the LU decomposition in numerical linear algebra.

§5.4 extended block thinking to higher dimensions. The Kronecker product scales the whole of B\mathbf{B} by each entry of A\mathbf{A}, used as a scalar coefficient, constructing the complete state space of a composite system; when the evolution factors as UA⊗UB\mathbf{U}_A\otimes\mathbf{U}_B, the mixed-product property allows the local actions to be computed separately, whereas general interactions admit no such factorization. The partial trace, in turn, performs a reduction, projecting the statistical information of a single subsystem out of the high-dimensional description of the composite system; in the language of 4D tensors this operation is nothing more than “summing the diagonal entries along specified axes,” echoing the viewpoint of §5.1 and closing the conceptual loop of the whole chapter.

Connections to Other Chapters

The logical starting point of this chapter is Chapter 4’s abstract discussion of the structure of linear spaces. Abstract linear spaces established the equivalence among vectors, linear mappings, and matrices; block matrices are a “coarse-graining” of this equivalence—binding several dimensions together into one algebraic unit, so that a matrix of matrices becomes a legitimate mathematical object. The dimension-matching condition of block multiplication is precisely the concrete expression, in the language of blocks, of the compatibility of spaces that allows linear mappings to be composed.

Chapter 6 will take up the systematic study of systems of linear equations, and §5.3 has already laid the groundwork for its most important computational tools. The Schur complement appears in statistics as the computational core of partial correlation coefficients and in control theory as the solution structure of the Riccati equation, and above all it is the algebraic essence of the block form of Gaussian elimination. The invertibility theorem and the group structure of triangular matrices correspond directly to the correctness guarantees of the forward substitution and back substitution algorithms. This connection will reappear in a clearer form when Chapter 6 discusses the LU decomposition.

The Role of This Chapter in the Book

The core problem that block matrices solve is how to turn a problem that is “too large” into one that “can be handled.” This problem is more universal than linear algebra itself: during World War II, human computers processed the strength matrices of aircraft wings by hand in batches; today, GPU parallel computing carries out the gradient updates of deep learning in batches; and quantum computers store the density matrices of composite systems in a tensor product structure—the same way of thinking reappears in different guises across different eras.

The shock of Strassen’s algorithm lies not only in the few multiplications it saved but even more in what it tells us: even for a “trivial” operation, once its internal structure is seen, a cleverer path may exist. This insight directly gave rise to the research area of “lower bounds on the complexity of matrix multiplication,” which remains open to this day. If you continue reading with the block viewpoint built in this chapter, you will find that the determinant expansions, eigendecompositions, and singular value decompositions of later chapters are all, in some sense, extensions of one and the same strategy: “see the structure, exploit the structure.”

Concept Map