Skip to content
D DocNectar

Free LU Decomposition Calculator

Factor a square matrix into lower (L) and upper (U) triangular matrices using Doolittle's method.

100% Free No Signup Works on all devices

Last updated October 5, 2026 · Report an error

Thanks for rating!

LU decomposition factors a square matrix into a lower triangular matrix (L) and an upper triangular matrix (U), making systems of equations and determinants much faster to compute repeatedly.

This calculator performs LU decomposition using Doolittle's method for any square matrix from 2×2 up to 6×6.

How it works

Enter your matrix size and values. The calculator eliminates rows from top to bottom, building U from the eliminated matrix and L from the multipliers used along the way, such that \(A = LU\).

  1. Click Calculate to see your results.

Examples

2×2 example

The matrix [[4,3],[6,3]] decomposes into L = [[1,0],[1.5,1]] and U = [[4,3],[0,-1.5]] — multiplying L by U reconstructs the original matrix.

Who should use it

  • Checking linear algebra coursework involving LU decomposition.
  • Understanding the elimination steps behind solving a linear system efficiently.

Industry applications

  • Linear algebra and numerical methods education
  • Engineering and scientific computing

Advantages

  • Shows both L and U matrices clearly, with A = LU verifiable by multiplication.
  • Supports matrices from 2×2 up to 6×6.

Limitations

  • Doesn't perform partial pivoting, so some matrices with zero pivots can't be decomposed by this method.

Common mistakes to avoid

  • Expecting a result for a matrix with a zero pivot — Doolittle's method without pivoting can't handle every matrix.
  • Forgetting that L always has 1s on its diagonal in this convention (Doolittle's method), which distinguishes it from other LU conventions.

Best practices

  • If your matrix fails to decompose due to a zero pivot, try the Gauss-Jordan Elimination calculator instead, which handles row swapping automatically.

Tips

  • Once you have L and U, solving Ax = b becomes two easy triangular solves (forward substitution with L, then backward substitution with U) instead of one harder elimination.

Frequently asked questions

Yes, with no signup and no limit on how many matrices you decompose.
Doolittle's method (without pivoting) fails when a zero appears on the diagonal during elimination — some matrices genuinely require swapping rows first (a technique called partial pivoting) to decompose successfully.
This is a deliberate safety limit for the site's public, synchronous calculators — 6×6 keeps computation instant while covering the vast majority of textbook and real-world use cases.
It speeds up solving Ax = b for many different b vectors against the same A, and is a building block for computing determinants and matrix inverses efficiently.

Get new calculators and guides in your inbox

No spam — just new tools like LU Decomposition Calculator and practical guides.

Favorites