Crout matrix decomposition
In linear algebra, the Crout matrix decomposition is an LU decomposition which decomposes a matrix into a lower triangular matrix, an upper triangular matrix and, although not always needed, a permutation matrix. It was developed by Prescott Durand Crout.
The Crout matrix decomposition algorithm differs slightly from the Doolittle method. Doolittle's method returns a unit lower triangular matrix and an upper triangular matrix, while the Crout method returns a lower triangular matrix and a unit upper triangular matrix.
So, if a matrix decomposition of a matrix A is such that:
being L a unit lower triangular matrix, D a diagonal matrix and U a unit upper triangular matrix, then Doolittle's method produces
and Crout's method producesImplementations
C implementation:
void crout
Octave/Matlab implementation:
function = LUdecompCrout
= size;
for i = 1:R
L = A;
U = 1;
end
for j = 2:R
U = A / L;
end
for i = 2:R
for j = 2:i
L = A - L * U;
end
for j = i + 1:R
U = - L * U) / L;
end
end
end