A procedure for decomposing an matrix into a product of a lower triangular matrix and an upper triangular matrix ,
(1)
|
LU decomposition is implemented in the Wolfram Language as LUDecomposition[m].
Written explicitly for a matrix, the decomposition is
(2)
|
(3)
|
This gives three types of equations
(4)
| |
(5)
| |
(6)
|
This gives equations for unknowns (the decomposition is not unique), and can be solved using Crout's method. To solve the matrix equation
(7)
|
first solve for . This can be done by forward substitution
(8)
| |||
(9)
|
for , ..., . Then solve for . This can be done by back substitution
(10)
| |||
(11)
|
for , ..., 1.