LU Decomposition Calculator
LU decomposition writes A as a lower times an upper triangular matrix: [[2, −1, −2], [−4, 6, 3], [−4, −2, 8]] factors with det A = 24.
One row per line; separate entries with spaces or commas.
24
- Method
- Doolittle (L has 1s on its diagonal)
| col 1 | col 2 | col 3 | |
|---|---|---|---|
| L row 1 | 1 | 0 | 0 |
| L row 2 | -2 | 1 | 0 |
| L row 3 | -2 | -1 | 1 |
| U row 1 | 2 | -1 | -2 |
| U row 2 | 0 | 4 | -1 |
| U row 3 | 0 | 0 | 3 |
Step-by-step solution
- uᵢⱼ = aᵢⱼ − Σₖ lᵢₖuₖⱼ for j ≥ i
- lⱼᵢ = (aⱼᵢ − Σₖ lⱼₖuₖᵢ) ÷ uᵢᵢ for j > i
- det A = Π uᵢᵢ = 24
LU Decomposition Formula
A = LU, uᵢⱼ = aᵢⱼ − Σ lᵢₖuₖⱼ, lⱼᵢ = (aⱼᵢ − Σ lⱼₖuₖᵢ)/uᵢᵢ
Doolittle: L has 1s on the diagonal
Worked Example
The matrix [[2, −1, −2], [−4, 6, 3], [−4, −2, 8]]:
- uᵢⱼ = aᵢⱼ − Σₖ lᵢₖuₖⱼ for j ≥ i
- lⱼᵢ = (aⱼᵢ − Σₖ lⱼₖuₖᵢ) ÷ uᵢᵢ for j > i
- det A = Π uᵢᵢ = 24
| col 1 | col 2 | col 3 | |
|---|---|---|---|
| L row 1 | 1 | 0 | 0 |
| L row 2 | -2 | 1 | 0 |
| L row 3 | -2 | -1 | 1 |
| U row 1 | 2 | -1 | -2 |
| U row 2 | 0 | 4 | -1 |
| U row 3 | 0 | 0 | 3 |
GATE tip
GATE XE-A lists LU decomposition by name. Questions usually ask for one entry of L or U, so compute only the row and column you need: u₂₂ = a₂₂ − l₂₁u₁₂.
More Linear Algebra Calculators
-
Matrix Rank Calculator
rank = number of non-zero rows in echelon form
unique if rank A = rank [A|b] = n; none if rank A < rank [A|b]
Example: The matrix [[1, 2, 3], [2, 4, 6], [1, 0, 1]]: Rank = 2.
-
Gauss Elimination Calculator
Rᵢ → Rᵢ − (aᵢₖ/aₖₖ)·Rₖ
forward elimination to upper triangular form, then back substitution
Example: The system 2x₁ + x₂ − x₃ = 8, −3x₁ − x₂ + 2x₃ = −11, −2x₁ + x₂ + 2x₃ = −3: Solution: x1 = 2, x2 = 3, x3 = -1.
Frequently asked questions
Why use LU decomposition instead of Gauss elimination?
Once A = LU is found, each new right-hand side b is solved by two cheap triangular substitutions (Ly = b, then Ux = y) without repeating the elimination.
What is the difference between Doolittle and Crout?
Doolittle puts 1s on the diagonal of L; Crout puts them on the diagonal of U. Both give the same determinant.
Sources
Last reviewed: . Factors are stored exactly and computed with 50-digit decimal arithmetic. See how we verify conversion factors.
Cite this page
APA
Scientific Converters. (2026, October 15). LU Decomposition Calculator. Retrieved October 25, 2026, from https://scientificconverters.com/calculators/lu-decomposition-calculator/
IEEE
Scientific Converters, "LU Decomposition Calculator," scientificconverters.com. Accessed: Oct. 25, 2026. [Online]. Available: https://scientificconverters.com/calculators/lu-decomposition-calculator/