Matrix Algebra/Block Matrices and the LU Factorization

Lesson 2.31,053 words

Block Matrices and the LU Factorization

Partitioning a matrix into blocks lets sums, products, and inverses be computed block by block, as if the submatrices were scalars. Block structure also underlies the LU factorization A = LU, which splits solving Ax = b into two fast triangular solves and repays the cost whenever many systems share one coefficient matrix.

╌╌╌╌

Treating a matrix as a list of columns already proved useful in defining the matrix product. Partitioning generalizes that view: split a matrix with horizontal and vertical rules into a grid of smaller matrices, or blocks, and the algebra of sums, products, and inverses carries through block by block. Partitioning makes sparse structure visible and speeds computation, and it produces the LU factorization used by most linear-system solvers.

Partitioned matrices

A matrix may be divided by horizontal and vertical lines into submatrices. For example,

where each is a block, for instance and . When a matrix models a physical system — a circuit board of interconnected chips, a sparse aerodynamic grid — a natural partition groups related variables, and the off-diagonal blocks record the couplings between groups.

Addition and scaling. If and have the same size and the same partition, then is formed block by block, each block being the sum of the corresponding blocks, and scales every block by . Both reduce to the entrywise operations already defined.

Block multiplication

The row-column rule works on blocks, provided the partitions line up.

Given conformable partitions, is computed as though the blocks were scalar entries, each product written with the block from on the left, since matrix multiplication does not commute.

Block multiplication: each block of AB is a row-of-blocks of A times a column-of-blocks of B, exactly the row-column rule one level up.

Block multiplication is the most general way to view a product: the column form of , the column definition of , the row-column rule, and the rows-of- identity are all special partitions. One more partition gives a form used repeatedly later.

Column-row expansion

Partition into its columns and into its rows. The blocks are conformable (one column times one row), and the product becomes a sum of outer products.1

Each term is an rank-one matrix, and their sum reconstructs . The -entry of the th term is ; summing over recovers the row-column rule. This decomposition reappears when a large data matrix is stored as two thin factors, and in the rank-one layers of the SVD.

Inverses of block matrices

Block structure often makes an inverse easy to write down.

Block upper triangular. Suppose is invertible, with of size and of size . Writing in the same partition and setting gives four block equations whose solution is

The derivation also shows and must themselves be invertible.

Block diagonal. A block diagonal matrix — zero blocks off the diagonal of blocks — is invertible if and only if each diagonal block is invertible, and its inverse is block diagonal with each block inverted:

These identities let a large problem decouple into independent smaller ones — the computational reason partitioning appears in high-performance libraries and in algorithms that estimate eigenvalues.

The LU factorization

The LU factorization splits a matrix into a lower and an upper triangular factor.

A = LU: a unit lower triangular L (1s on the diagonal) times an upper triangular echelon form U.

Two triangular solves

With , the equation becomes . Setting splits the solve into two triangular systems:

Each is cheap because a triangular system is solved by sweeping through the unknowns in order. The value of the factorization shows when many systems share the coefficient matrix : factor once, then each right-hand side costs only two triangular solves. The inverse power method and repeated design iterations both fit this pattern.

Solving Ax = b in two stages once A = LU is known: forward-solve Ly = b for y, then back-solve Ux = y for x.
The two solves sweep opposite ways: forward substitution runs down the lower-triangular L, back substitution runs up the upper-triangular U.

Constructing and

Suppose reduces to an echelon form using only row replacements that add a multiple of one row to a row below it. Those operations are left-multiplications by unit lower triangular elementary matrices , so with , itself unit lower triangular. In practice is built without forming any : it records the multipliers used during the reduction.

Algorithm:LU factorization by recording row-replacement multipliers
  1. 1
    reduce AA to an echelon form UU using only row replacements
  2. 2
    that add a multiple of one row to a lower row
  3. 3
    set every diagonal entry of LL to 11
  4. 4
    for each pivot column jj, from left to right do
  5. 5
    for each row ii below the pivot do
  6. 6
    place in LijL_{ij} the multiple of the pivot row subtracted from row ii
  7. 7
    (the entry that was cleared, divided by the pivot)

Row interchanges

When a needed pivot is zero — or, in floating point, when partial pivoting selects the largest available pivot for accuracy — row interchanges enter. The factorization then takes the permuted form , where is a permutation matrix recording the swaps, and is permuted lower triangular. The two-stage solve is unchanged apart from applying to first. Most references to an LU factorization allow this permuted case.

Operation counts

Flop counts explain why LU is preferred to computing . For a dense matrix with moderately large:2

TaskFlopsNotes
LU factorization of same cost as reducing
Solve then each triangular solve is
Compute three times the LU cost
Multiply but often less accurate than the LU solve

Once is available, each additional right-hand side costs only flops, against the needed to build in the first place. When is sparse, and often stay sparse while fills in, widening the gap further. The numerical module develops pivoting, stability, and the symmetric Cholesky variant .

Footnotes

  1. Lay, Linear Algebra and Its Applications, §2.4 — Theorem 10, the column-row expansion , together with block multiplication of conformable partitions and the inverse formulas for block triangular and block diagonal matrices.
  2. Lay, §2.5 — the LU factorization, its two-stage triangular solve, the row-replacement construction of , and the numerical note giving flops for the factorization against for the inverse; partial pivoting yields the permuted factorization .

╌╌ END ╌╌