Skip to main content
Skip to calculator
Advertisement

Last updated: August 1, 2026

LU Decomposition Calculator

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.

Helpful
Not helpful
Save as image
Share
Embed
Cite
Write feedback

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
LU DecompositionLU decomposition records elimination multipliers in L and the resulting upper-triangular structure in U.LU DecompositionMatrix view[ a₁₁ a₁₂ ⋯ ][ a₂₁ a₂₂ ⋯ ][ ⋮ ⋮ ⋱ ]Core formulaA = LUL is unit lower triangularU is upper triangularThe diagonal of U determines the determinant
LU decomposition records elimination multipliers in L and the resulting upper-triangular structure in U.

Worked Examples

2×2 factorization

Factor [[4,3],[6,3]].

  1. 1Initialize L as the identity.
  2. 2Compute U row by row.
  3. 3Store elimination multipliers in L.
Final Answer: lowerMatrix = [[1, 0], [1.5, 1]], upperMatrix = [[4, 3], [0, -1.5]]

3×3 classroom example

Factor 2,1,1;4,-6,0;-2,7,2.

  1. 1Apply Doolittle elimination.
  2. 2Read multipliers into L.
  3. 3Read pivots into U.
Final Answer: The calculator returns rounded L and U matrices.

Identity matrix

LU of the identity is trivial.

  1. 1Identity already matches both triangular patterns.
  2. 2Both outputs stay equal to I.
Final Answer: lowerMatrix = I, upperMatrix = I

Singular matrix

Rows 1,2 and 2,4 create a zero pivot.

  1. 1A zero pivot blocks the no-pivot routine.
  2. 2The calculator stops with a validation error.
Final Answer: The calculator rejects singular or unsupported pivot structures.

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.