What P, L and U mean
Here L has unit diagonal; all matrices are real and square.[1]
Left multiplication by P permutes rows, so PA=LU also requires the permuted right-hand side Pb. Other books or software use A=PLU, whose P need not denote our permutation. German texts may call the same factorization LR; R and U both refer to the upper-triangular factor.[2]
Derivation from elimination
The second row of U is row 2 minus ℓ times row 1. Multiplication by L reverses this elimination step.[2]
A zero first pivot blocks the division even when A is invertible. Partial pivoting selects an available entry of largest magnitude in the active column and swaps rows. For larger matrices, previously stored parts of L must follow those swaps. Row pivoting permits a complete factorization of every invertible matrix, whereas unpivoted LU does not exist for every invertible matrix.[1]
Two triangular solves instead of an inverse
First solve forward for y, then backward for x.[1]
For a fixed dense n×n matrix, factorization costs order n3 operations and each additional right-hand side order n2. This describes work, not error size. Small pivots and poor conditioning are also different: pivoting addresses elimination difficulties but does not make a sensitive problem insensitive. Abstract LU has no fixed SI unit. Physical equations need sensible row and variable scaling before numerical norm comparisons.[1]
Two worked examples
Partial pivoting followed by a solve
- Given
- A has rows (2,1) and (4,3); b=(1,5)ᵀ.
- Find
- Find PA=LU and solve Ax=b.
Move the larger pivot 4 to the top.
Eliminate below the pivot.
Forward and backward substitution use the same permutation.
Result: x=(−1,3)ᵀ.
Check: 2·(−1)+3=1 and 4·(−1)+3·3=5; multiplying LU reconstructs PA.
An invertible matrix with a zero pivot
- Given
- A has rows (0,2) and (1,3); b=(4,7)ᵀ.
- Find
- Explain the required row swap and solve.
A zero pivot does not imply singularity here.
After swapping, no further elimination is needed.
Solve the upper-triangular system.
Result: x=(1,2)ᵀ; the first unpivoted division would be invalid.
Check: The original equations produce 4 and 7.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Five exercises with solutions
Calculate · Foundation
Factor A with rows (3,1) and (6,5) without row swaps.
Show hint
Subtract twice row 1 from row 2.
Learning goal: Store an elimination multiplier correctly.
Show solution and calculation
ℓ=2, so L=[[1,0],[2,1]] and U=[[3,1],[0,3]].
Multiplication reconstructs A.
Rearrange · Application
Given PA=LU, which two systems solve Ax=b?
Show hint
Multiply the original equation by P.
Learning goal: Permute matrix and right-hand side together.
Show solution and calculation
LUx=Pb.
Set y=Ux, solve Ly=Pb first and Ux=y second.
Using b instead of Pb is wrong for a nontrivial row permutation.
Interpret · Application
A 3×3 factorization has one row swap, unit diagonal in L and U diagonal 2,−3,4. Find det A.
Show hint
det P=−1 and det(PA)=det U.
Learning goal: Read the determinant from the factors.
Show solution and calculation
det U=2·(−3)·4=−24.
Since det P=−1, det A=24.
Error analysis · Application
Someone calls [[0,1],[1,0]] singular because a11=0. What is wrong?
Show hint
Compute the determinant and swap rows.
Learning goal: Distinguish a zero pivot from singularity.
Show solution and calculation
Its determinant is −1.
The zero pivot blocks only the unpivoted step.
Swapping rows gives PA=I, so L=U=I is possible.
Transfer · Challenge
A is unchanged for one hundred right-hand sides. Why reuse LU rather than eliminate from scratch each time?
Show hint
Separate one cubic factorization from quadratic triangular solves.
Learning goal: Recognize factor reuse for multiple loads.
Show solution and calculation
Compute the factors once, then permute each right-hand side and use forward/back substitution.
Work is O(n3+100n2) rather than O(100n3); this does not mean one hundred times better accuracy.
Check your understanding with the formula’s reference test.
7 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Related next steps
The direct alternative is explained in Inverse matrix and linear system.
For solution sensitivity, read Matrix condition number.
For orthogonal factors and least squares, continue with QR factorization.
Sources for this explanation
Quanta · Updated November 8, 2026
- MIT OCW 18.335J — Week 5, Lecture 13: LU Factorization and Partial Pivoting
- University of Vienna: systems of linear equations, Gaussian elimination and LU decomposition (translated source label)
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Added a full article with assumptions, derivation, two worked examples and five varied exercises.
Cite this reference page
Quanta. LU Factorization. Updated November 8, 2026. https://quanta-study.de/en/formula-sheet/lu-zerlegung-matrix
When citing a specific scientific statement, also cite the specialist source linked to that statement.