LU Factorization

Chapter 2 • Section 2-7

"Breaking up is hard to do... unless you're a matrix! ๐Ÿ’”"

๐Ÿงฉ The Factorization

An LU Factorization of a matrix $A$ writes it as the product of two simpler matrices:

$$ A = LU $$

L (Lower Triangular)

Zeros above the diagonal. Often has 1s on the diagonal.

U (Upper Triangular)

Zeros below the diagonal. This is usually the Row Echelon Form of $A$.

Why do we care?

Solving $A\vec{x} = \vec{b}$ becomes two easy steps:

  1. Solve $L\vec{y} = \vec{b}$ for $\vec{y}$ (Forward Substitution).
  2. Solve $U\vec{x} = \vec{y}$ for $\vec{x}$ (Back Substitution).

Existence Condition

An invertible matrix $A$ has an LU factorization if and only if it can be reduced to row echelon form without row swaps.

If row swaps are needed, we need a Permutation Matrix $P$, giving $PA = LU$.

๐Ÿ‘€ Spot the L Win $10

Which of these is a Lower Triangular matrix?

Finding L and U

We can find $L$ and $U$ by performing Gaussian Elimination, but keeping track of our steps.

1

Start with $L = I$ and $U = A$.

2

Perform row operations to reduce $U$ to Row Echelon Form.

3

For every operation $R_i \leftarrow R_i - k R_j$, place the multiplier $k$ into $L$ at position $(i, j)$.

๐Ÿงช Interactive Demo

Let's factor $A = \begin{bmatrix} 2 & 4 \\ 1 & 3 \end{bmatrix}$.

Step 1: Initialization

L

$$ \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix} $$

U (initially A)

$$ \begin{bmatrix} 2 & 4 \\ 1 & 3 \end{bmatrix} $$

๐Ÿง  Logic Check Win $20

When does LU factorization fail?