A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

LU Decomposition

Graduate Depth 111 in the knowledge graph ☐ I know this ☆ Set as goal
708prerequisites beneath it
See this on the map →
Gaussian Elimination with Pivoting→
lu-decomposition matrix-factorization linear-solver

Core Idea

LU decomposition factors a matrix as A = LU where L is lower triangular and U is upper triangular. This factorization is obtained via Gaussian elimination and allows efficient solution of multiple systems with the same coefficient matrix A. With partial pivoting, the factorization A = PLU provides numerical stability and is the basis for efficient linear system solvers.

Explainer

You know Gaussian elimination: apply row operations to reduce an augmented matrix [A|b] to upper triangular form, then back-substitute to solve for x. LU decomposition asks: can we record those row operations in a reusable matrix? The answer is yes. Each elimination step — "subtract c times row i from row j" — corresponds to multiplying A on the left by an elementary lower-triangular matrix. If we compose all those operations, the product inverts to give L, a lower-triangular matrix with 1's on the diagonal, such that A = LU where U is the upper-triangular result of elimination.

The practical payoff is immediate. If you need to solve Ax = b for many different right-hand sides b but the same coefficient matrix A — common in simulations, iterative algorithms, and sensitivity analyses — LU decomposition lets you factor A once (an O(n³) operation) and then solve each new system in O(n²) via two triangular solves: forward substitution Ly = b followed by back substitution Ux = y. Triangular systems are solved by sweeping row by row, making each solve trivial after the one-time factorization cost.

Partial pivoting is essential for numerical stability. Without it, the algorithm may divide by a very small diagonal entry, amplifying floating-point rounding errors catastrophically. With partial pivoting, before each elimination step we swap the current row with the row below it having the largest absolute value in the current column. This produces the decomposition PA = LU, where P is a permutation matrix recording the row swaps. In practice P is stored as a permutation vector, and L and U overwrite A's memory in-place.

LU decomposition underlies most dense linear algebra in practice. Computing the determinant reduces to det(A) = (sign of P) × product of diagonal entries of U. Inverting A is rarely done explicitly; instead, each column of A⁻¹ is found by solving a separate triangular system. The condition number of A — which you'll encounter next — quantifies how sensitive Ax = b is to perturbations in b, and its computation also uses the LU factorization.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Trigonometric Ratios Review → Radian Measure → Converting Between Degrees and Radians → The Unit Circle → Graphing Sine and Cosine → Graphing Tangent and Reciprocal Trigonometric Functions → Derivatives of Trigonometric Functions → Antiderivatives → Indefinite Integrals → Basic Integration Rules → Riemann Sums → Definite Integral Definition → Double Integrals: Definition and Setup → Iterated Integrals and Fubini's Theorem → Double Integrals over Rectangular Regions → Double Integrals over General Regions → Applications of Double Integrals: Area, Mass, and Moments → Center of Mass → Conservation of Linear Momentum → Elastic Collisions → Inelastic Collisions → Coefficient of Restitution → Collision Analysis and Real-World Applications → Two-Body Collisions in the Center-of-Mass Frame → Reduced Mass and Two-Body Problems → Kinematics in Two Dimensions → Projectile Motion → Circular Motion: Kinematics → Simple Harmonic Motion → Introduction to Differential Equations → Euler's Method for Numerical Solutions → Euler's Method for ODEs (Error Analysis) → Runge-Kutta Methods → Multistep Methods: Adams-Bashforth and Adams-Moulton → Stiff Differential Equations and Stability Regions → Stability Regions and A-Stability → Numerical Stability and Conditioning → Gaussian Elimination with Pivoting → LU Decomposition

Longest path: 112 steps · 708 total prerequisite topics

Prerequisites (1)

Leads To (0)

No topics depend on this one yet.