Last updated October 5, 2026 · Report an error
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.
- 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.