Matrix LU Decomposition Calculator screenshot

Matrix LU Decomposition Calculator

Work out the P, L and U factors with partial pivoting from square matrix (rows on separate lines). P × A = L × U, with L unit lower triangular and U upper triangular, and the page prints the substitution so the result can be checked by hand.

Privacy First
0 Runs
Updated 2026-11-22
Runs in your browser
No sign-up, no upload
Formula printed with the answer

Matrix LU Decomposition Calculator

Work out the P, L and U factors with partial pivoting from square matrix (rows on separate lines). P × A = L × U, with L unit lower triangular and U upper triangular, and the page prints the substitution so the result can be checked by hand.

How this page computes

P × A = L × U, with L unit lower triangular and U upper triangular

Picking the largest absolute entry in each column keeps the multipliers at or below 1, which is what stops the elimination from amplifying rounding. The page prints the permutation it chose.

The product P × A and L × U are both printed and compared exactly, so the factorisation is verified rather than asserted.

The calculation runs entirely in this browser tab; nothing is uploaded.

Matrix LU Decomposition Calculator computes the P, L and U factors with partial pivoting. P × A = L × U, with L unit lower triangular and U upper triangular. The page prints the rule, the numbers substituted into it and the result, so the arithmetic can be checked by hand.

Picking the largest absolute entry in each column keeps the multipliers at or below 1, which is what stops the elimination from amplifying rounding. The page prints the permutation it chose. Pressed with square matrix 4 3; 6 3, it answers: Permutation P, then P × A = L × U.

How to use Matrix LU Decomposition Calculator

Enter square matrix 4 3; 6 3, then press Run: the page evaluates the P, L and U factors with partial pivoting and prints every line of the working. Typed input is read exactly as written, and a blank field is refused with its name.

Read the first line as the answer and the lines below it as the substitution. If a value is out of range the page refuses it by field and reason instead of printing a number.

With square matrix 4 3; 6 3, the answer is Permutation P, then P × A = L × U..

What partial pivoting is for

Picking the largest absolute entry in each column keeps the multipliers at or below 1, which is what stops the elimination from amplifying rounding. The page prints the permutation it chose.

The product P × A and L × U are both printed and compared exactly, so the factorisation is verified rather than asserted.

What to Expect

Best for

  • Working out the P, L and U factors with partial pivoting without a spreadsheet
  • Checking a figure someone else quoted
  • Seeing the formula behind an answer

Not ideal for

  • A singular leading column is refused, and a non-square matrix is refused.
  • A quantity the page cannot compute, which it refuses instead of estimating
  • Rounding an answer that has an exact form

What this tool keeps

  • P × A = L × U, with L unit lower triangular and U upper triangular
  • Every input exactly as typed

What may need cleanup

  • Nothing: the printed answer is the final output
  • A unit conversion, if the inputs were entered in different units

Common errors

  • A singular leading column is refused, and a non-square matrix is refused.
  • An empty field is refused with the field's name

Example use cases

  • Work out the P, L and U factors with partial pivoting for one set of inputs
  • Check the result against the formula by hand
  • See which input the answer is most sensitive to

Sample input

Matrix LU Decomposition Calculator: square matrix 4 3; 6 3

Sample output

Permutation P, then P × A = L × U. — P:

Who this is for

  • Students checking a formula
  • Anyone who needs the number and the working

Frequently asked questions

What formula does this page use?

P × A = L × U, with L unit lower triangular and U upper triangular. The page prints the substitution as well, so the answer can be checked against the rule.

What does Matrix LU Decomposition Calculator refuse?

A singular leading column is refused, and a non-square matrix is refused.

What does the default example give?

Square matrix 4 3; 6 3 gives Permutation P, then P × A = L × U.. Every line below that restates the same arithmetic.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.