PA = LU Factorization
Compute the PA = LU factorization1
of a square matrix with various pivoting strategies.
Essential for solving linear systems2, computing determinants, and matrix inversion.
For a square matrix \(A\), the LU factorization with pivoting is:
\[ PA = LU \]
Components:
- \(P\) is a permutation matrix3 (row exchanges)
- \(L\) is a unit lower triangular matrix (diagonal entries are 1)
- \(U\) is an upper triangular matrix
Pivoting Strategies:
- Partial Pivoting: Choose the largest magnitude element in the current column
- Scaled Partial Pivoting: Account for row scaling to reduce errors4
- No Pivoting: No row exchanges (may fail for some matrices)
Used to solve \(Ax = b\) by solving \(Ly = Pb\) then \(Ux = y\) (both triangular systems).
Enter the matrix size n and click Generate Matrix to create an n×n input grid.
1 — Set Up
Loads a pre-filled 3×3 matrix — ready to factor.
2 — Compute
Performs LU decomposition with partial pivoting, showing P, L, and U step by step.
Resets all dimensions, matrix entries, and results.