LU LU Decomposition Calculator

LU Decomposition Calculator

Decompose any square matrix as PA = LU with partial pivoting. Shows the lower triangular L, upper triangular U, and permutation matrix P with full elimination steps.

LU

LU Decomposition (Doolittle)

PA = LU with partial pivoting

✓ Step-by-Step✓ Pivoting✓ Free⚡ Loading SymPy Engine…
Matrix A
Quick Examples

LU Decomposition

LU decomposition factors a square matrix A as a product of a lower triangular matrix L and an upper triangular matrix U: A = LU (or PA = LU with partial pivoting for numerical stability).

Structure

  • L: Lower triangular with 1s on diagonal — stores the elimination multipliers
  • U: Upper triangular — the result of Gaussian elimination
  • P: Permutation matrix — records row swaps for partial pivoting

Applications

  • Solving Ax = b efficiently (forward/backward substitution)
  • Computing determinants: det(A) = det(L)×det(U) = product of diagonal of U
  • Computing matrix inverse for multiple right-hand sides