About

2.4-2.5 Partitioned Matrices & LU Factorization

Theory: Partitioned Matrices & LU Factorization

Partitioned (Block) Matrices (Lay §2.4)

A matrix can be partitioned into submatrices (called blocks) by horizontal and vertical lines:

A=[A11A12A21A22]A = \begin{bmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{bmatrix}

If the block sizes are conformable for matrix multiplication, partitioned matrices can be multiplied block by block as if their entries were scalars:

[A11A12A21A22][B11B12B21B22]=[A11B11+A12B21A11B12+A12B22A21B11+A22B21A21B12+A22B22]\begin{bmatrix} A_{11} & A_{12} \\ A_{21} & A_{22} \end{bmatrix} \begin{bmatrix} B_{11} & B_{12} \\ B_{21} & B_{22} \end{bmatrix} = \begin{bmatrix} A_{11}B_{11} + A_{12}B_{21} & A_{11}B_{12} + A_{12}B_{22} \\ A_{21}B_{11} + A_{22}B_{21} & A_{21}B_{12} + A_{22}B_{22} \end{bmatrix}

Block Diagonal Inverses

If AA is a block diagonal matrix where each diagonal block AiiA_{ii} is square and invertible:

A=[A100A2]  ⟹  A−1=[A1−100A2−1]A = \begin{bmatrix} A_1 & 0 \\ 0 & A_2 \end{bmatrix} \implies A^{-1} = \begin{bmatrix} A_1^{-1} & 0 \\ 0 & A_2^{-1} \end{bmatrix}

LU Factorization (Lay §2.5)

An LU factorization expresses an m×nm \times n matrix AA as the product:

A=LUA = LU

where:

    [ 1   0   0 ]   [ *   *   * ]
L = [ *   1   0 ]   [ 0   *   * ] = U
    [ *   *   1 ]   [ 0   0   * ]

[!NOTE] Why LU Factorization? When solving a series of equations Ax=bA\mathbf{x} = \mathbf{b} with different b\mathbf{b} vectors, solving two triangular systems takes only on the order of n2n^2 operations, compared to 23n3\frac{2}{3}n^3 for full row reduction of AA each time.

The Algorithm for A=LUA = LU

(When AA can be row-reduced to echelon form without row interchanges):

  1. Reduce AA to an echelon form UU using only row replacement operations (adding multiples of a row to a row below it).
  2. The entries in LL below its main diagonal record the multipliers used to clear entries: if operation Ri←Ri−cRjR_i \leftarrow R_i - c R_j was used, the entry in row ii, column jj of LL is cc.

Solving Ax=bA\mathbf{x} = \mathbf{b} Using LULU

Since Ax=L(Ux)=bA\mathbf{x} = L(U\mathbf{x}) = \mathbf{b}, set y=Ux\mathbf{y} = U\mathbf{x}:

  1. Forward Substitution: Solve Ly=bL\mathbf{y} = \mathbf{b} for y\mathbf{y}.
  2. Back Substitution: Solve Ux=yU\mathbf{x} = \mathbf{y} for x\mathbf{x}.

Solved Examples (Textbook Questions)

Exercise 1

(Adapted from Lay §2.4, Exercise 11)

Let A=[A11A120A22]A = \begin{bmatrix} A_{11} & A_{12} \\ 0 & A_{22} \end{bmatrix} be a block upper-triangular matrix, where A11A_{11} is p×pp \times p, A22A_{22} is q×qq \times q, and both A11A_{11} and A22A_{22} are invertible.

Find a formula for A−1A^{-1} in block form.

Show solution ↓
Solution

We search for a block matrix B=[B11B12B21B22]B = \begin{bmatrix} B_{11} & B_{12} \\ B_{21} & B_{22} \end{bmatrix} such that:

AB=[A11A120A22][B11B12B21B22]=[Ip00Iq]A B = \begin{bmatrix} A_{11} & A_{12} \\ 0 & A_{22} \end{bmatrix} \begin{bmatrix} B_{11} & B_{12} \\ B_{21} & B_{22} \end{bmatrix} = \begin{bmatrix} I_p & 0 \\ 0 & I_q \end{bmatrix}

Multiply the blocks:

  1. A11B11+A12B21=IpA_{11} B_{11} + A_{12} B_{21} = I_p
  2. A11B12+A12B22=0A_{11} B_{12} + A_{12} B_{22} = 0
  3. 0⋅B11+A22B21=0  ⟹  A22B21=00 \cdot B_{11} + A_{22} B_{21} = 0 \implies A_{22} B_{21} = 0
  4. 0⋅B12+A22B22=Iq  ⟹  A22B22=Iq0 \cdot B_{12} + A_{22} B_{22} = I_q \implies A_{22} B_{22} = I_q

Solve for the blocks:

  • From (4): Since A22A_{22} is invertible, B22=A22−1B_{22} = A_{22}^{-1}.
  • From (3): Multiply from the left by A22−1A_{22}^{-1}: B21=A22−1(0)=0B_{21} = A_{22}^{-1}(0) = 0
  • From (1): Since B21=0B_{21} = 0: A11B11=Ip  ⟹  B11=A11−1A_{11} B_{11} = I_p \implies B_{11} = A_{11}^{-1}
  • From (2): A11B12+A12A22−1=0  ⟹  A11B12=−A12A22−1A_{11} B_{12} + A_{12} A_{22}^{-1} = 0 \implies A_{11} B_{12} = -A_{12} A_{22}^{-1} Multiply from the left by A11−1A_{11}^{-1}: B12=−A11−1A12A22−1B_{12} = -A_{11}^{-1} A_{12} A_{22}^{-1}

Conclusion:

A−1=[A11−1−A11−1A12A22−10A22−1]A^{-1} = \begin{bmatrix} A_{11}^{-1} & -A_{11}^{-1} A_{12} A_{22}^{-1} \\ 0 & A_{22}^{-1} \end{bmatrix}
Exercise 2

(Adapted from Lay §2.5, Exercise 7)

Find an LU factorization of the matrix:

A=[24−615313−7]A = \begin{bmatrix} 2 & 4 & -6 \\ 1 & 5 & 3 \\ 1 & 3 & -7 \end{bmatrix}

Explicitly state the row operations, the multipliers, and the matrices LL and UU.

Show solution ↓
Solution

We reduce AA to an upper-triangular echelon form UU using only row replacements:

Step 1: Clear column 1 below the pivot a11=2a_{11} = 2.

  • Row 2: R2←R2−(12)R1R_2 \leftarrow R_2 - \left(\frac{1}{2}\right) R_1

    [1,5,3]−12[2,4,−6]=[0,3,6][1, 5, 3] - \frac{1}{2}[2, 4, -6] = [0, 3, 6]

    Multiplier for position (2,1)(2, 1): ℓ21=12\ell_{21} = \frac{1}{2}.

  • Row 3: R3←R3−(12)R1R_3 \leftarrow R_3 - \left(\frac{1}{2}\right) R_1

    [1,3,−7]−12[2,4,−6]=[0,1,−4][1, 3, -7] - \frac{1}{2}[2, 4, -6] = [0, 1, -4]

    Multiplier for position (3,1)(3, 1): ℓ31=12\ell_{31} = \frac{1}{2}.

The intermediate matrix is:

[24−603601−4]\begin{bmatrix} 2 & 4 & -6 \\ 0 & 3 & 6 \\ 0 & 1 & -4 \end{bmatrix}

Step 2: Clear column 2 below the pivot in row 2 (which is 33).

  • Row 3: R3←R3−(13)R2R_3 \leftarrow R_3 - \left(\frac{1}{3}\right) R_2 [0,1,−4]−13[0,3,6]=[0,0,−6][0, 1, -4] - \frac{1}{3}[0, 3, 6] = [0, 0, -6] Multiplier for position (3,2)(3, 2): ℓ32=13\ell_{32} = \frac{1}{3}.

This gives the upper-triangular matrix UU:

U=[24−603600−6]U = \begin{bmatrix} 2 & 4 & -6 \\ 0 & 3 & 6 \\ 0 & 0 & -6 \end{bmatrix}

Step 3: Construct LL. Place 11s on the diagonal and the recorded multipliers below:

L=[1001/2101/21/31]L = \begin{bmatrix} 1 & 0 & 0 \\ 1/2 & 1 & 0 \\ 1/2 & 1/3 & 1 \end{bmatrix}

Verification:

LU=[1001/2101/21/31][24−603600−6]=[24−61+02+3−3+61+0+02+1+0−3+2−6]=[24−615313−7]=A✓LU = \begin{bmatrix} 1 & 0 & 0 \\ 1/2 & 1 & 0 \\ 1/2 & 1/3 & 1 \end{bmatrix} \begin{bmatrix} 2 & 4 & -6 \\ 0 & 3 & 6 \\ 0 & 0 & -6 \end{bmatrix} = \begin{bmatrix} 2 & 4 & -6 \\ 1 + 0 & 2 + 3 & -3 + 6 \\ 1 + 0 + 0 & 2 + 1 + 0 & -3 + 2 - 6 \end{bmatrix} = \begin{bmatrix} 2 & 4 & -6 \\ 1 & 5 & 3 \\ 1 & 3 & -7 \end{bmatrix} = A \quad \checkmark
Exercise 3

(Adapted from Lay §2.5, Exercise 1 & 3)

Solve the system Ax=bA\mathbf{x} = \mathbf{b} using the given LU factorization:

L=[100−1102−51],U=[2−31042003],b=[1011]L = \begin{bmatrix} 1 & 0 & 0 \\ -1 & 1 & 0 \\ 2 & -5 & 1 \end{bmatrix}, \quad U = \begin{bmatrix} 2 & -3 & 1 \\ 0 & 4 & 2 \\ 0 & 0 & 3 \end{bmatrix}, \quad \mathbf{b} = \begin{bmatrix} 1 \\ 0 \\ 11 \end{bmatrix}
Show solution ↓
Solution

The problem Ax=bA\mathbf{x} = \mathbf{b} is solved in two sequential steps:

  1. Solve Ly=bL\mathbf{y} = \mathbf{b} for y\mathbf{y} (Forward Substitution).
  2. Solve Ux=yU\mathbf{x} = \mathbf{y} for x\mathbf{x} (Back Substitution).

Step 1: Forward Substitution (Ly=bL\mathbf{y} = \mathbf{b})

[100−1102−51][y1y2y3]=[1011]\begin{bmatrix} 1 & 0 & 0 \\ -1 & 1 & 0 \\ 2 & -5 & 1 \end{bmatrix} \begin{bmatrix} y_1 \\ y_2 \\ y_3 \end{bmatrix} = \begin{bmatrix} 1 \\ 0 \\ 11 \end{bmatrix}
  • From row 1: y1=1y_1 = 1
  • From row 2: −y1+y2=0  ⟹  −1+y2=0  ⟹  y2=1-y_1 + y_2 = 0 \implies -1 + y_2 = 0 \implies y_2 = 1
  • From row 3: 2y1−5y2+y3=11  ⟹  2(1)−5(1)+y3=11  ⟹  −3+y3=11  ⟹  y3=142y_1 - 5y_2 + y_3 = 11 \implies 2(1) - 5(1) + y_3 = 11 \implies -3 + y_3 = 11 \implies y_3 = 14

So y=[1114]\mathbf{y} = \begin{bmatrix} 1 \\ 1 \\ 14 \end{bmatrix}.


Step 2: Back Substitution (Ux=yU\mathbf{x} = \mathbf{y})

[2−31042003][x1x2x3]=[1114]\begin{bmatrix} 2 & -3 & 1 \\ 0 & 4 & 2 \\ 0 & 0 & 3 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ x_3 \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \\ 14 \end{bmatrix}
  • From row 3: 3x3=14  ⟹  x3=1433x_3 = 14 \implies x_3 = \frac{14}{3}
  • From row 2: 4x2+2x3=1  ⟹  4x2+2(143)=14x_2 + 2x_3 = 1 \implies 4x_2 + 2\left(\frac{14}{3}\right) = 1 4x2=1−283=−253  ⟹  x2=−25124x_2 = 1 - \frac{28}{3} = -\frac{25}{3} \implies x_2 = -\frac{25}{12}
  • From row 1: 2x1−3x2+x3=1  ⟹  2x1−3(−2512)+143=12x_1 - 3x_2 + x_3 = 1 \implies 2x_1 - 3\left(-\frac{25}{12}\right) + \frac{14}{3} = 1 2x1+254+143=1  ⟹  2x1+75+5612=1  ⟹  2x1+13112=12122x_1 + \frac{25}{4} + \frac{14}{3} = 1 \implies 2x_1 + \frac{75 + 56}{12} = 1 \implies 2x_1 + \frac{131}{12} = \frac{12}{12} 2x1=−11912  ⟹  x1=−119242x_1 = -\frac{119}{12} \implies x_1 = -\frac{119}{24}

Conclusion: The solution is:

x=[−119/24−25/1214/3]\mathbf{x} = \begin{bmatrix} -119/24 \\ -25/12 \\ 14/3 \end{bmatrix}