LU factorization calculator

Calculate row permutation matrix P and unit lower-triangular L with your own figures.

Your numbers

Use the units shown. Results update as you change valid inputs.

Use row permutation matrix P and unit lower-triangular L to compare changes to your inputs. The method and limits below explain the scope.

Examples

Examples

Try the starting example

Square real matrix, rows on separate lines
2,1 4,3
Row permutation matrix P
0, 1; 1, 0
Unit lower-triangular L
1, 0; 0.5, 1
Upper-triangular U
4, 3; 0, -0.5
Maximum reconstruction residual |P A − L U|
0
Determinant from pivots
2

Try another scenario

Square real matrix, rows on separate lines
4,3 6,3
Row permutation matrix P
0, 1; 1, 0
Unit lower-triangular L
1, 0; 0.666666666667, 1
Upper-triangular U
6, 3; 0, 1
Maximum reconstruction residual |P A − L U|
0
Determinant from pivots
-6
Calculation method

Calculation method

Row permutation matrix P

Partial row pivoting gives P such that P×A=L×U.

Unit lower-triangular L

Multipliers below the diagonal with unit diagonal entries.

Upper-triangular U

Eliminated upper-triangular factor.

Maximum reconstruction residual |P A − L U|

Maximum entrywise absolute difference using the original matrix and returned factors.

Determinant from pivots

Permutation parity × product of U diagonal entries.

Symbols and units
a
Square real matrix, rows on separate lines

Use the units shown. A list keeps the order in which you enter its values. The symbol ^ means “raised to the power of”.

Assumptions & limits

Assumptions & limits

  • Partial-pivoted LU for real square matrices up to 20×20. A factorisation is not evidence that a matrix is well-conditioned or safely invertible. Double-precision results are approximate. Numeric tables use 12 significant digits and display components at roundoff scale (32 machine epsilons relative to their row or relevant calculation scale) as zero; scalar diagnostics retain full precision.
Are these inputs private?

These calculations run in your browser. A shared link contains the values you choose to share. Only questions submitted to the separate AI finder are sent to OpenAI.

Further reading

ml-matrix: numerical decompositions ↗

Background reading; this does not imply endorsement or independent review of SumFizz.

Share this page
Share this calculator

Leave unchecked to share the page without your entered values.