Foundations — LU decomposition (numerical)
This page assumes you know nothing. We will earn every symbol — , , , "triangular", , , , , — before the parent note is allowed to use it.
1. What is a "linear system"? ()
Suppose two mystery numbers, call them and , obey two rules:
Each rule is linear: the unknowns appear only multiplied by fixed numbers and added — no squares, no products of unknowns. Finding the pair that satisfies both is solving a linear system.
Writing the multipliers, unknowns and answers separately gives three objects.
For our example:
The whole system compresses to the single line .

What the picture shows: row of paired with reproduces the left side of equation ; the red column holds the answers. So is exactly the two equations, just tidied up.
Row-then-column ordering matters — say it aloud as "row , column " every time.
2. Multiplying a matrix by a vector — the "row dot" picture
Before we can factor we must know what means as an operation.
Row 1 of our gives — the left side of equation 1. That is the whole reason the matrix form is faithful.
Matrix-times-matrix (, coming up) is the same move repeated: entry of the product is row of the first matrix dotted with column of the second.

What the picture shows: the red row slides across the black column; each aligned pair is multiplied and the products summed to a single output slot. Master this one motion and every LU formula becomes readable.
3. What does "triangular" mean, and why do we crave it?

What the picture shows: black cells = numbers that may be nonzero, white cells = forced zeros. fills the lower wedge, the upper wedge; where they overlap (the diagonal) both carry numbers.
Why we crave triangular systems. Look at an upper-triangular system: The last equation has only one unknown: instantly. Feed it upward and the next equation also has one unknown. No grinding — just read off, one variable at a time. That process is called back substitution (bottom-up for ) and its twin forward substitution (top-down for ). See Forward and Back Substitution.
So if we could rewrite the hard matrix as two triangular matrices, solving would become effortless. That wish is precisely LU decomposition.
4. The elimination move (where is born)
To make a triangle we use the one legal move of Gaussian Elimination:
Example: row 2 is , row 1 is . To zero the leading we need , giving new row 2 . The system is now triangular.
That is why the parent note can say " are the Gaussian-elimination multipliers." Now the phrase carries a picture: a table of the 's.
5. When the move fails: the zero pivot and
If that pivot is , the division explodes. But an all-zero column is not required — sometimes we just picked the rows in an unlucky order. The cure is to swap rows so a nonzero (ideally the largest) number sits on the pivot. See Partial Pivoting.
With swaps the honest statement becomes : first reorder, then factor. Choosing the biggest pivot also keeps every , which stops rounding errors from ballooning — the accuracy concern of Condition Number and Numerical Stability.
6. Two free gifts these symbols hand us
- Determinant. A triangular matrix's determinant is just the product of its diagonal. Since Doolittle's has all-1 diagonal (), .
- Reuse. Because and depend only on (not on ), a new right-hand side costs only two triangular solves. Factor once, solve many.
Prerequisite map
Equipment checklist
Cover the right side and test yourself. If any answer is fuzzy, reread that section before the parent note.
What does stand for in plain words?
What does the index point to?
How do you compute entry of ?
What is a lower-triangular matrix?
Why are triangular systems easy?
What is the multiplier in a row operation?
Where do the entries of come from?
What is a pivot and when does it fail?
What does a permutation matrix do?
How do you get once you have ?
Connections
- Parent topic ↑
- Gaussian Elimination · Forward and Back Substitution · Partial Pivoting · Permutation Matrices
- Determinants · Condition Number and Numerical Stability · Crout Decomposition · Cholesky Decomposition