Doolittle algorithm and Cholesky's factorization

Filter Course


Doolittle algorithm and Cholesky's factorization

Published by: Dikshya

Published date: 19 Jul 2023

Doolittle algorithm and Cholesky's factorization

Doolittle's Algorithm:

- Doolittle's algorithm is a method used for LU decomposition of a square matrix. LU decomposition decomposes a matrix into the product of a lower triangular matrix (L) and an upper triangular matrix (U). This algorithm is particularly useful for solving systems of linear equations and finding the inverse of a matrix.

Given a square matrix A, the Doolittle's algorithm proceeds as follows:

Step 1: Initialize two empty matrices L and U of the same size as A.

Step 2: Set the main diagonal elements of L to 1, and the other elements to 0. Set the upper triangular part of U to the corresponding elements of A, and the lower triangular part of L to the corresponding elements of A.

Step 3: For each row and column of A (assuming 1-based indexing):

a. Update the elements of the current row in U using the formula:
   U[i][j] = A[i][j] - sum(L[i][k] * U[k][j] for k = 1 to i-1).

b. Update the elements of the current column in L using the formula:
   L[i][j] = (A[i][j] - sum(L[i][k] * U[k][j] for k = 1 to i-1)) / U[i][i].

Step 4: Once the computation is complete, you will have matrices L and U, such that A = L * U.

Doolittle's algorithm is more straightforward to implement compared to other LU decomposition methods and is numerically stable for non-singular matrices.

 

Cholesky's Factorization:

Cholesky's factorization is a specialized method used for symmetric positive-definite matrices. It decomposes a symmetric positive-definite matrix A into the product of a lower triangular matrix (L) and its transpose (LT). The factorization is expressed as A = L * LT.

Since Cholesky's factorization is specifically designed for symmetric positive-definite matrices, it is more efficient and numerically stable compared to general LU decomposition methods.

Given a symmetric positive-definite matrix A, the Cholesky's factorization algorithm proceeds as follows:

Step 1: Initialize an empty lower triangular matrix L of the same size as A.

Step 2: For each row and column of A (assuming 1-based indexing):

a. Update the diagonal element of L:
   L[i][i] = sqrt(A[i][i] - sum(L[i][k]^2 for k = 1 to i-1)).

b. Update the elements below the diagonal of L using the formula:
   L[i][j] = (A[i][j] - sum(L[i][k] * L[j][k] for k = 1 to j-1)) / L[j][j], for j > i.

Step 3: Once the computation is complete, you will have the lower triangular matrix L, and its transpose LT can be easily obtained.

Cholesky's factorization is extensively used in solving linear systems of equations, least squares problems, and generating samples from multivariate normal distributions. Since it requires a symmetric positive-definite matrix, it is essential to ensure these properties hold before applying the algorithm.