Maths & numbers
Pivoted LU decomposition
Inspect lower and upper triangular factors and the row permutation.
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
| Factor | Row | C1 | C2 |
|---|---|---|---|
| L | 1 | 1 | 0 |
| L | 2 | 0 | 1 |
| U | 1 | 1 | 3 |
| U | 2 | 0 | 2 |
P × A = L × U. Permuted source row order: 2, 1. Partial pivoting; pivots at or below 10⁻¹² × max(1, largest absolute entry) are rejected.