SECTION 1
Historical Context & Motivation
Imagine you have a big system of equations — maybe five, ten, or even a hundred equations with the same number of unknowns. Solving them one at a time would take forever. Mathematicians realized centuries ago that organizing numbers into rectangular grids called matrices could speed things up. Over time, they discovered clever ways to split a matrix into simpler pieces, making the whole process much faster.
LU Decomposition is one of these clever tricks. The letters L and U stand for "Lower" and "Upper" — two special triangle-shaped matrices. The idea grew out of a method you might already know: Gaussian elimination (named after the famous mathematician Carl Friedrich Gauss). LU Decomposition packages Gaussian elimination in a reusable form so you can solve many problems without starting over each time.
1810s • Gauss & Systematic Elimination
1938 • Banachiewicz Formalizes LU
1948 • Turing & Doolittle Refine the Method
1970s–Today • Backbone of Scientific Computing
The central question LU Decomposition answers is: Can we break a matrix into two simpler matrices so that solving equations becomes as easy as working backward through a list? The answer is yes — and it turns out to be one of the most useful ideas in all of applied mathematics.
SECTION 2
Core Principles & Definitions
Before diving into the math, let's nail down a few key ideas. LU Decomposition rests on the concept that every "well-behaved" square matrix can be written as the product of two triangular matrices. Understanding what "triangular" means is the first step.
Lower Triangular Matrix (L)
Upper Triangular Matrix (U)
Factorization (A = L × U)
Forward & Back Substitution
KEY TAKEAWAY
SECTION 3
Visual Explanation
The diagram below shows how a 3×3 matrix A is split into a lower triangular matrix L and an upper triangular matrix U. Notice where the zeros sit in each triangle and how the non-zero entries form a staircase pattern.
In the diagram, the cyan-shaded triangle in L contains the multipliers that you would use during Gaussian elimination. The violet-shaded triangle in U is the row-echelon form (the result after you finish eliminating). By saving both pieces, you avoid re-doing elimination if you need to solve the same system with a different right-hand side.
SECTION 4
Mathematical Framework
Let's put the pieces together with equations. Suppose you have a system of linear equations written in matrix form: A · x = b, where A is the coefficient matrix, x is the vector of unknowns, and b is the vector of constants on the right side.
THE FACTORIZATION
A = original n × n matrix | L = lower triangular (1s on diagonal) | U = upper triangular
Because A = L × U, the equation A · x = b becomes (L × U) · x = b. We introduce a helper variable y and split the problem into two smaller problems.
STEP 1 — FORWARD SUBSTITUTION
Start from the first row and work downward. Each row gives you the next value of y because L is lower triangular.
STEP 2 — BACK SUBSTITUTION
Start from the last row and work upward. Each row gives you the next value of x because U is upper triangular.
Why is this better than just doing elimination every time? Imagine you need to solve A · x = b for ten different b vectors (ten different sets of constants). Without LU, you'd do Gaussian elimination ten times. With LU, you factor A once, then run the two quick substitution steps for each new b. The factorization is the expensive part; the substitutions are fast.
COMPUTING MULTIPLIERS
Each entry lij in L is the multiplier you use to eliminate the entry in row i, column j during Gaussian elimination.
SECTION 5
Step-by-Step Breakdown of the Algorithm
Let's walk through exactly how you build L and U from a matrix A. The process mirrors Gaussian elimination, but you carefully record every multiplier along the way.
- Pick the pivot: The pivot is the diagonal entry in the current column. For column j, the pivot is the entry at row j, column j.
- Compute multipliers: For each row i below the pivot (i > j), divide the entry at (i, j) by the pivot. This fraction goes into L at position (i, j).
- Eliminate: Subtract the multiplier times the pivot row from row i. This zeros out the entry below the pivot.
- Move to the next column: Repeat the process for the next column until the matrix is upper triangular — that's U.
Watch Out for Zero Pivots!
SECTION 6
Worked Example
Let's decompose the following 3×3 matrix A into L and U, then use the result to solve a system.
GIVEN MATRIX
We also want to solve A · x = b where b = [4, 10, 24]T.
LU Decomposition & Solve
- 1
Step 1 — Eliminate Column 1
The pivot is A(1,1) = 2. For Row 2, the multiplier is 4 ÷ 2 = 2. Subtract 2 × Row 1 from Row 2: [4, 3, 3] − 2 × [2, 1, 1] = [0, 1, 1]. For Row 3, the multiplier is 8 ÷ 2 = 4. Subtract 4 × Row 1 from Row 3: [8, 7, 9] − 4 × [2, 1, 1] = [0, 3, 5]. Store multipliers 2 and 4 in column 1 of L.After Step 1: matrix becomes [ [2, 1, 1], [0, 1, 1], [0, 3, 5] ]. L column 1: l21 = 2, l31 = 4 - 2
Step 2 — Eliminate Column 2
The new pivot is the (2,2) entry = 1. For Row 3, the multiplier is 3 ÷ 1 = 3. Subtract 3 × Row 2 from Row 3: [0, 3, 5] − 3 × [0, 1, 1] = [0, 0, 2]. Store multiplier 3 in L.U = [ [2, 1, 1], [0, 1, 1], [0, 0, 2] ]. L = [ [1, 0, 0], [2, 1, 0], [4, 3, 1] ] - 3
Step 3 — Forward Substitution (L · y = b)
Solve L · y = [4, 10, 24]. Row 1: y1 = 4. Row 2: 2(4) + y2 = 10, so y2 = 2. Row 3: 4(4) + 3(2) + y3 = 24, so y3 = 24 − 16 − 6 = 2.y = [4, 2, 2] - 4
Step 4 — Back Substitution (U · x = y)
Solve U · x = [4, 2, 2]. Row 3: 2x3 = 2, so x3 = 1. Row 2: x2 + 1(1) = 2, so x2 = 1. Row 1: 2x1 + 1(1) + 1(1) = 4, so 2x1 = 2 and x1 = 1.x = [1, 1, 1]
Quick Check
SECTION 7
Strengths & Limitations
LU Decomposition is powerful, but like any tool it has situations where it shines and situations where other methods might be better. The table below summarizes the key trade-offs.
| Aspect | Strength ✓ | Limitation ✗ |
|---|---|---|
| Speed for multiple solves | Factor once, solve many times. Each new right-hand side only needs two substitution passes. | Initial factorization has the same cost as Gaussian elimination, so for a single solve there's no speed advantage. |
| Determinant & Inverse | The determinant of A is simply the product of the diagonal entries of U. Finding the inverse is also streamlined. | Computing a full inverse is still expensive for very large matrices. |
| Numerical stability | With partial pivoting (PA = LU), the method is stable for most practical problems. | Without pivoting, small rounding errors can blow up, especially for ill-conditioned matrices. |
| Matrix type | Works on any square matrix that doesn't need row swaps (or with pivoting, any non-singular square matrix). | Does not directly apply to non-square (rectangular) matrices. QR or SVD are used instead. |
Strengths and limitations of LU Decomposition
KEY TAKEAWAY
SECTION 8
Connection to Advanced Methods
LU Decomposition is just one member of a family of matrix factorizations. As you move into more advanced math and science, you'll encounter related decompositions designed for specific types of matrices or problems.
| Decomposition | Form | When You'd Use It |
|---|---|---|
| LU | A = L × U | General square systems, finding determinants. |
| Cholesky | A = L × LT | Symmetric positive-definite matrices (common in statistics). About twice as fast as LU. |
| QR | A = Q × R | Least-squares problems, non-square matrices, eigenvalue algorithms. |
| SVD | A = U × Σ × VT | Data compression, image processing, machine learning. The most versatile decomposition. |
How LU relates to other matrix factorizations
Mastering LU Decomposition gives you a strong foundation for all of these. The core idea — break a complicated matrix into simpler factors — runs through all of advanced linear algebra. In college-level courses and engineering applications, you'll see LU and its cousins working behind the scenes in simulation software, search engines, and even the recommendation algorithms on streaming services.
SECTION 9
Practice Problems
Question 1: CONCEPTUAL
Show answer
Question 2: BASIC CALCULATION
Show answer
Question 3: INTERMEDIATE
Show answer
Question 4: APPLIED
Show answer
Question 5: CRITICAL THINKING
Show answer
SUMMARY
Summary
Summary
LU Decomposition splits a square matrix A into a lower triangular matrix L (with 1s on the diagonal) and an upper triangular matrix U so that A = L × U. This factorization captures the work of Gaussian elimination in a reusable form. The multipliers used during elimination fill the entries of L, and the resulting row-echelon matrix becomes U.
To solve a system A · x = b, you first perform forward substitution on L · y = b, then back substitution on U · x = y. The big advantage is that once L and U are found, solving for new right-hand sides is fast. When a zero pivot appears, partial pivoting (row swaps recorded in a permutation matrix P) keeps the method stable. LU is the foundation for more advanced factorizations like Cholesky, QR, and SVD — all built on the same idea of breaking matrices into simpler, more manageable pieces.