PA = LU Factorization

Compute the PA = LU Factorization of a square matrix with various pivoting strategies.
Essential for solving linear systems, computing determinants, and matrix inversion.

For a square matrix $A$, the LU factorization with pivoting is:

$$ PA = LU $$

Components:

  • $P$ is a permutation matrix (row exchanges)
  • $L$ is a unit lower triangular matrix (diagonal entries are 1)
  • $U$ is an upper triangular matrix

Pivoting Strategies:

  • Partial Pivoting: Choose largest magnitude element in current column
  • Scaled Partial Pivoting: Account for row scaling to reduce errors
  • 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).

Matrix size $n$:
Pivoting method:
© 2025 Shelvean Kapita: kapita@tamu.edu
Last modified: June 2, 2025
Licensed under the MIT License.