Maths & numbers

Pivoted LU decomposition

Inspect lower and upper triangular factors and the row permutation.

Pivoted LU decomposition
Esc to restore

Your inputs

Up to 6 × 6. Entries separated by spaces or commas; finite magnitudes from 10⁻¹² to 10¹², or zero.

Results update as you type. Larger files run when you press Update result.

Your result

LOCAL & PRIVATE

Your result will appear here.

Your inputs stay in this browser. Nothing is uploaded or saved.

A clear answer. Here’s how.

Uses Gaussian elimination with partial pivoting, returning L, U and the permuted source-row order for P A=L U. L has a unit diagonal. Supports square matrices up to 6 × 6 and rejects pivots at or below 10⁻¹² × max(1, largest absolute input entry). Factors are numeric approximations and are not symbolic exact decompositions.

See a worked example

Worked example

A fixed demonstration, separate from the values you enter above.

Matrix: one row per line
0, 2
1, 3

Example result

Example result
FactorRowC1C2
L110
L201
U113
U202

P × A = L × U. Permuted source row order: 2, 1. Partial pivoting; pivots at or below 10⁻¹² × max(1, largest absolute entry) are rejected.