LU decomposition is a square matrix factorization technique.

For a given square matrix M, there exists a decomposition of the form:

  • M = the input matrix of dimension n x n.
  • L = lower triangular matrix
  • U = upper triangular matrix

LU-decomp is a way of gaussian elimination, which is used to solve a system of linear equations.

There is a variant of LU-decomp with partial pivoting, of the form: where P is a permutation of rows. This approach, in practice, is more numerically stable.