Last updated: August 1, 2026
LU Decomposition Calculator
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Quick Answer
Enter a square matrix in row format to factor it into a unit lower matrix L and an upper matrix U. This calculator uses a deterministic Doolittle-style process, returns the two triangular factors, and reports the determinant implied by the diagonal of U when the decomposition exists without pivoting.
Enter a square matrix to factor it into L and U and to read the determinant from the upper triangular matrix.
Creators
Dharmendra SinghReviewers

Creators
Dharmendra SinghReviewers
Formula
For a square matrix A, compute A = LU, where L is unit lower triangular and U is upper triangular.
Where:
- A=original square matrix
- L=lower triangular matrix
- U=upper triangular matrix
Worked Examples
2×2 factorization
Factor [[4,3],[6,3]].
- 1Initialize L as the identity.
- 2Compute U row by row.
- 3Store elimination multipliers in L.
3×3 classroom example
Factor 2,1,1;4,-6,0;-2,7,2.
- 1Apply Doolittle elimination.
- 2Read multipliers into L.
- 3Read pivots into U.
Identity matrix
LU of the identity is trivial.
- 1Identity already matches both triangular patterns.
- 2Both outputs stay equal to I.
Singular matrix
Rows 1,2 and 2,4 create a zero pivot.
- 1A zero pivot blocks the no-pivot routine.
- 2The calculator stops with a validation error.
Introduction
Factor a square matrix into a unit lower matrix and an upper matrix using Doolittle-style elimination.
Overview
Factor a square matrix into a unit lower matrix and an upper matrix using Doolittle-style elimination.
Lower matrix
Repeated system solving
Determinant recovery
Numerical linear algebra practice
Input format
Enter a square matrix in row form, such as 4,3;6,3.
Separate rows with semicolons
Separate entries with commas or spaces
Brackets are optional
Keep row lengths consistent
Formula and method
For a square matrix A, compute A = LU, where L is unit lower triangular and U is upper triangular.
- A matters:
original square matrix.
- L matters:
lower triangular matrix.
- U matters:
upper triangular matrix.
Validation rules
The calculator uses deterministic validation before it computes the final result.
The matrix must be square
Every entry must be finite
The algorithm rejects zero-pivot cases
Outputs are rounded to six decimals
Interpreting the outputs
Use the main result first, then the secondary fields to verify the structure and meaning of the answer.
L stores the elimination multipliers
U stores the resulting upper-triangular form
The determinant is the product of the diagonal of U
Multiplying L and U should recover the original matrix
Common use cases
These are typical reasons to use this calculator in study or applied work.
Repeated system solving
Determinant recovery
Numerical linear algebra practice
Triangular factor interpretation
FAQs
Does this calculator use pivoting?
No. It uses a deterministic no-pivot Doolittle-style routine.
Why does L have ones on the diagonal?
That is the standard Doolittle convention.
How is the determinant found?
For this LU form, it is the product of the diagonal entries of U.
Why did a singular matrix fail?
A singular matrix eventually creates a zero pivot.
Can I use decimals?
Yes. Finite decimals are supported.
How do I verify the result?
Multiply L and U and compare the product with the original matrix.