Skip to content
D DocNectar

Free LDU Decomposition Calculator

Factor a square matrix into A = LDU, with unit-diagonal L and U matrices and a diagonal pivot matrix D.

100% Free No Signup Works on all devices

Last updated October 5, 2026 · Report an error

Thanks for rating!

LDU decomposition extends standard LU decomposition one step further, separating out the pivot values into their own diagonal matrix D so that both L and U end up with clean 1s along their diagonals — a more symmetric factorization than plain LU.

This calculator factors a square matrix into A = LDU.

How it works

Enter your square matrix. The calculator runs standard Doolittle's LU decomposition to find L and U, then extracts U's diagonal entries into a diagonal matrix D and rescales each row of U by its own pivot so U's diagonal becomes all 1s too.

  1. Click Calculate to see your results.

Examples

[[4,3],[6,3]]

This matrix factors into L = [[1,0],[1.5,1]], D = [[4,0],[0,-1.5]], and U = [[1,0.75],[0,1]] — multiplying L × D × U back together reproduces the original matrix exactly.

Who should use it

  • Studying the relationship between LU and LDU decompositions in a linear algebra course.
  • Decomposing a matrix where a symmetric, pivot-isolated form is specifically needed.

Industry applications

  • Linear algebra and mathematics education
  • Numerical methods and engineering coursework

Advantages

  • Produces genuinely unit-diagonal L and U matrices, unlike plain LU decomposition.
  • Clearly isolates the pivot values in D for inspection.

Limitations

  • Like plain LU decomposition, fails on matrices with a zero pivot during elimination — no partial pivoting is applied.

Common mistakes to avoid

  • Forgetting that D holds the actual pivot values — without it, the rescaled U alone doesn't reconstruct the original matrix.
  • Assuming L, D, and U from this tool are unique for every matrix — while this particular construction is standard, some matrices admit multiple valid decompositions.

Best practices

  • Verify the result yourself by multiplying L × D × U back together — it should exactly reproduce your original matrix.

Tips

  • For a symmetric matrix, LDU decomposition often satisfies U = Lᵀ (U is the transpose of L) — a useful pattern to check for when working with symmetric positive-definite matrices.

Frequently asked questions

Yes, with no signup and no limit on how many matrices you decompose.
Standard LU decomposition (Doolittle's method) already gives a unit-diagonal L, but U keeps its computed pivot values on the diagonal; LDU decomposition pulls those pivots out into a separate diagonal matrix D, leaving U with a unit diagonal too.
The LDU form is more symmetric and directly exposes the pivot values (in D), which is useful in some theoretical contexts, like recognizing symmetric positive-definite matrices where L and U's transpose relationship becomes especially clean.
No — like the site's plain LU Decomposition tool, this uses Doolittle's method without pivoting, so a zero pivot during elimination will fail; use the LUP Decomposition Calculator for matrices that need row swapping.

Get new calculators and guides in your inbox

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

Favorites