Follow the row operations that turn a matrix into echelon form—and see how the same operations produce its PALU decomposition.
At each pivot, eliminate entries below it by subtracting a multiple of the pivot row. The multiples are recorded in a unit lower-triangular matrix $L$; the resulting echelon matrix is $U$. If the pivot rows are reordered, that row permutation is the permutation matrix $P$.
Here $P$ reorders rows of the original matrix, $L$ stores the elimination multipliers, and $U$ is the row-echelon result. For a square nonsingular matrix, this is the familiar PALU factorization. The same identity also applies to the rectangular matrices in this demo.
A pivot is the first nonzero entry of a row after earlier elimination steps. A row-echelon matrix has pivots moving strictly right as you go down, with zero rows at the bottom.
Partial pivoting picks the largest-magnitude eligible pivot. Both choices may reorder rows; the difference is how the pivot is chosen.
Current matrix: × ; displayed to decimal places.
The final row order defines $P$. In the displayed $L$, each entry below the diagonal is the multiplier used to eliminate that row; the diagonal entries are 1. $U$ is the echelon matrix after putting rows in that same order. Entries are rounded to the displayed precision.
The source matrix is random; choose a shape or density to generate another example.