Advanced

LU Decomposition Calculator — 3×3 Matrix

Enter a 3×3 matrix to find its LU decomposition: L (lower triangular with unit diagonal) and U (upper triangular). The calculator performs Doolittle elimination step by step and also computes the determinant as the product of U's diagonal entries.
Matrix A — Row 1
Matrix A — Row 2
Matrix A — Row 3
Determinant of A
4

det(A) = u₁₁ × u₂₂ × u₃₃ (product of U diagonal)

l₂₁
2
l₃₁
4
l₃₂
3
u₁₁
2
u₂₂
1
u₃₃
2
Doolittle elimination steps
1

Factor for row 2 (eliminate column 1)

l₂₁ = a₂₁ / a₁₁ = 4 / 2 = 2
2

Update row 2: R₂ ← R₂ − l₂₁ × R₁

[ 4, 3, 3 ] → [ 0, 1, 1 ]
3

Factor for row 3 (eliminate column 1)

l₃₁ = a₃₁ / a₁₁ = 8 / 2 = 4
4

Update row 3 step 1: R₃ ← R₃ − l₃₁ × R₁

[ 8, 7, 9 ] → [ 0, 3, 5 ]
5

Factor for row 3 (eliminate column 2)

l₃₂ = row3[1] / u₂₂ = 3 / 1 = 3
6

Update row 3 step 2: R₃ ← R₃ − l₃₂ × R₂

[ 0, 3, 5 ] → [ 0, 0, 2 ]
7

Lower triangular L (unit diagonal)

[ 1, 0, 0 ] [ 2, 1, 0 ] [ 4, 3, 1 ]
=

Upper triangular U

[ 2, 1, 1 ] [ 0, 1, 1 ] [ 0, 0, 2 ]
Step by step
  1. 1

    First pivot u₁₁

    u₁₁ = a₁₁ = 2
    The first pivot is the top-left entry of A — no elimination needed for row 1.
  2. 2

    Second pivot u₂₂ (after eliminating column 1)

    u₂₂ = a₂₂ − l₂₁ × a₁₂ = 1
  3. 3

    Third pivot u₃₃ (after eliminating columns 1 and 2)

    u₃₃ = 2
  4. 4

    Determinant = product of U diagonal

    u₁₁ × u₂₂ × u₃₃ = 2 × 1 × 2 = 4
Results are estimates for general information only and are not professional advice — always verify important results independently before relying on them. Read the full disclaimer.
Quick answer

How does this calculator work?

LU decomposition (Doolittle) converts a 3×3 matrix A into L (lower triangular, unit diagonal) × U (upper triangular) by Gaussian elimination, recording multipliers in L and the reduced rows in U. det(A) = u₁₁ × u₂₂ × u₃₃. Fails without row swapping when any diagonal pivot equals zero.

Formula
A = L × U • l_ij = (a_ij − Σ l_ik u_kj) / u_jj • det(A) = u₁₁ × u₂₂ × u₃₃
How this is calculated

LU decomposition factors a square matrix A into a product L × U, where L is lower triangular (zeros above the diagonal) and U is upper triangular (zeros below the diagonal). In the Doolittle variant, L has 1s on its main diagonal. The decomposition is found by Gaussian elimination: for each column j from left to right, the multiplier l_ij = U[i][j] / U[j][j] is recorded and used to zero out entries below the pivot, updating the remaining rows accordingly. After all columns are processed, the multipliers fill the below-diagonal entries of L while the modified matrix becomes U.

The key application is solving linear systems Ax = b efficiently: once A = LU, first solve Ly = b by forward substitution (O(n²)), then solve Ux = y by back substitution (O(n²)), avoiding the O(n³) cost of re-factoring for each right-hand side. The determinant follows for free as the product of U's diagonal since det(L) = 1 (unit diagonal) and det(A) = det(L) × det(U).

This calculator uses Doolittle elimination without partial pivoting, which fails when a diagonal element of U becomes exactly zero. Partial pivoting (reordering rows to put the largest pivot on the diagonal) is numerically more stable and is used in production numerical libraries like LAPACK. For matrices that trigger the zero-pivot error, try reordering the rows manually, or interpret the result as "the matrix is singular or nearly so."

Frequently asked questions

Primarily to solve systems of linear equations Ax = b efficiently when the same matrix A is used with multiple right-hand sides (e.g. in iterative refinement, finite-element analysis, or circuit simulation). Factoring once (O(n³)) then solving repeatedly (O(n²) each) is much faster than Gaussian elimination for every new b. It also gives the determinant and the inverse of A cheaply.

Doolittle elimination fails when a diagonal (pivot) element of U becomes zero during elimination, making the next multiplier undefined. This occurs for singular matrices (det = 0) but also for some non-singular matrices where the algorithm happens to produce a zero intermediate pivot. Partial pivoting — swapping rows to bring the largest available element onto the diagonal — avoids this and is used in practice.

Multiply L × U and compare with the original matrix A. Each entry should match to within floating-point rounding (differences of order 1e-10 or smaller are acceptable). The determinant of A should also equal the product of the diagonal entries of U.

Also known as

lu decomposition calculator
lu factorization calculator
doolittle method matrix
lower upper triangular decomposition
matrix lu factorization 3x3
gaussian elimination lu
lu decomposition determinant
matrix decomposition solver

APA

TG we-Calculate Editorial Team. (2026). LU Decomposition Calculator — 3×3 Matrix [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/lu-decomposition-calculator

Chicago

TG we-Calculate Editorial Team. "LU Decomposition Calculator — 3×3 Matrix." TG we-Calculate. 2026. https://we-calculate.com/calculator/lu-decomposition-calculator.

IEEE

TG we-Calculate Editorial Team, "LU Decomposition Calculator — 3×3 Matrix," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/lu-decomposition-calculator

BibTeX

@misc{wecalculate_lu_decomposition_calculator, title = {LU Decomposition Calculator — 3×3 Matrix}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/lu-decomposition-calculator}}, year = {2026}, note = {TG we-Calculate} }

Did this calculator help you?