LU Decomposition Solver

A = L·U factorization

CalculatorsFreeNo Signup
4.7(848 reviews)
All Tools

Loading tool...

About LU Decomposition Solver

An LU decomposition calculator that factors A = L·U where L is lower triangular and U is upper triangular. Solve Ax=b via Ly=b (forward sub) then Ux=y (backward sub). Shows L and U matrices. Select from preset matrices. All calculations are client-side. Essential for repeated solving with different b vectors.

LU Decomposition Solver Features

  • L & U factors
  • Forward/back sub
  • Solve Ax=b
  • Presets
  • Step display
LU decomposition: A = LU. L is lower triangular (1s on diagonal), U is upper triangular. Solve Ax=b in two steps: Ly=b (forward), Ux=y (backward). Cost: O(n³/3) once, then O(n²) per solve. Efficient for multiple b vectors.

How to Use

Enter a matrix:

  • A: Square matrix
  • b: Right-hand side
  • Output: L, U, solution

Algorithm

Row reduce A to U, recording multipliers in L. lᵢⱼ = multiplier used to eliminate aᵢⱼ. L has 1s on diagonal. A = LU if no pivoting needed.

Applications

  • Solving multiple systems
  • Computing determinant: det(A) = ∏uᵢᵢ
  • Computing inverse: solve AX=I column by column

Step-by-Step Instructions

  1. 1Enter matrix A.
  2. 2View L and U.
  3. 3Enter b vector.
  4. 4See forward sub.
  5. 5Get solution x.

LU Decomposition Solver — Frequently Asked Questions

Why is LU better than row reduction?+

LU stores the elimination process. Once factored, solving with new b costs only O(n²) instead of O(n³). For k different b vectors, this saves O(kn³) vs O(n³ + kn²) work.

When does LU decomposition fail?+

When a zero pivot is encountered. Solution: partial pivoting (PA=LU) — swap rows to use largest pivot. In practice, pivoting is nearly always used for numerical stability.

What is the difference between LU and Cholesky?+

Cholesky: A = LLᵀ, only for symmetric positive definite matrices. It's ~2× faster and more numerically stable. LU works for any non-singular matrix.

Share this tool: