Module

for

Cholesky, Doolittle and Crout Factorization

 

Background

Definition (LU-Factorization).  The nonsingular matrix A has an LU-factorization if it can be expressed as the product of a lower-triangular matrix L and an upper triangular matrix U:  

          [Graphics:Images/CholeskyMod_gr_1.gif].  

When this is possible we say that A has an LU-decomposition.  It turns out that this factorization (when it exists) is not unique.  If L has 1's on it's diagonal, then it is called a Doolittle factorization.  If U has 1's on its diagonal, then it is called a Crout factorization.  When  [Graphics:Images/CholeskyMod_gr_2.gif]  (or [Graphics:Images/CholeskyMod_gr_3.gif]),  it is called a Cholesky decomposition.  

 

Theorem (A = LU;  Factorization with NO Pivoting).  Assume that A has a Doolittle, Crout or Cholesky factorization.  The solution X to the linear system  [Graphics:Images/CholeskyMod_gr_4.gif], is found in three steps:  

    
1.  Construct the matrices  [Graphics:Images/CholeskyMod_gr_5.gif], if possible.  
    
2.  Solve  [Graphics:Images/CholeskyMod_gr_6.gif]  for  [Graphics:Images/CholeskyMod_gr_7.gif]  using forward substitution.
    
3.  Solve  [Graphics:Images/CholeskyMod_gr_8.gif]  for  [Graphics:Images/CholeskyMod_gr_9.gif]  using back substitution.

Proof  LU Factorization  LU Factorization  

 

Theorem (A = LU;  Doolittle Factorization).  Assume that A has a Doolittle factorization A = LU.  
[Graphics:Images/CholeskyMod_gr_10.gif] = [Graphics:Images/CholeskyMod_gr_11.gif][Graphics:Images/CholeskyMod_gr_12.gif]  

The solution X to the linear system
  [Graphics:Images/CholeskyMod_gr_13.gif], is found in three steps:  
    
1.  Construct the matrices  [Graphics:Images/CholeskyMod_gr_14.gif], if possible.  
    
2.  Solve  [Graphics:Images/CholeskyMod_gr_15.gif]  for  [Graphics:Images/CholeskyMod_gr_16.gif]  using forward substitution.
    
3.  Solve  [Graphics:Images/CholeskyMod_gr_17.gif]  for  [Graphics:Images/CholeskyMod_gr_18.gif]  using back substitution.

Proof  Cholesky, Doolittle and Crout Factorization  Cholesky, Doolittle and Crout Factorization  

 

For curiosity, the reader might be interested in other methods of computing  L  and  U.

Theorem (A = LU;  Crout Factorization).  Assume that A has a Crout factorization A = LU.  
[Graphics:Images/CholeskyMod_gr_19.gif] = [Graphics:Images/CholeskyMod_gr_20.gif][Graphics:Images/CholeskyMod_gr_21.gif]  

The solution X to the linear system
  [Graphics:Images/CholeskyMod_gr_22.gif], is found in three steps:  
    
1.  Construct the matrices  [Graphics:Images/CholeskyMod_gr_23.gif], if possible.  
    
2.  Solve  [Graphics:Images/CholeskyMod_gr_24.gif]  for  [Graphics:Images/CholeskyMod_gr_25.gif]  using forward substitution.
    
3.  Solve  [Graphics:Images/CholeskyMod_gr_26.gif]  for  [Graphics:Images/CholeskyMod_gr_27.gif]  using back substitution.

Proof  Cholesky, Doolittle and Crout Factorization  Cholesky, Doolittle and Crout Factorization  

 

Mathematica Subroutine (Doolittle).

[Graphics:Images/CholeskyMod_gr_28.gif]

Mathematica Subroutine (Crout).

[Graphics:Images/CholeskyMod_gr_29.gif]

Mathematica Subroutine (Forward Elimination).

[Graphics:Images/CholeskyMod_gr_30.gif]

Mathematica Subroutine (Back Substitution).

[Graphics:Images/CholeskyMod_gr_31.gif]

Theorem (Cholesky Factorization).  If A is real, symmetric and positive definite matrix, then it has a Cholesky factorization  

          [Graphics:Images/CholeskyMod_gr_32.gif]        

where U an upper triangular matrix.  

Remark.  Observe that [Graphics:Images/CholeskyMod_gr_33.gif] is a lower triangular matrix, so that  A = LU.  Hence we could also write Cholesky factorization  

          [Graphics:Images/CholeskyMod_gr_34.gif]    

where L a lower triangular matrix.  

 

Theorem (A = LU;  Cholesky Factorization).  Assume that A has a Cholesky factorization  [Graphics:Images/CholeskyMod_gr_35.gif],  where  [Graphics:Images/CholeskyMod_gr_36.gif].
[Graphics:Images/CholeskyMod_gr_37.gif] = [Graphics:Images/CholeskyMod_gr_38.gif][Graphics:Images/CholeskyMod_gr_39.gif]  

Or if you prefer to write the Cholesky factorization as  [Graphics:Images/CholeskyMod_gr_40.gif],  where [Graphics:Images/CholeskyMod_gr_41.gif].
[Graphics:Images/CholeskyMod_gr_42.gif] = [Graphics:Images/CholeskyMod_gr_43.gif][Graphics:Images/CholeskyMod_gr_44.gif]  

The solution X to the linear system
  [Graphics:Images/CholeskyMod_gr_45.gif], is found in three steps:  
    
1.  Construct the matrices  [Graphics:Images/CholeskyMod_gr_46.gif], if possible.  
    
2.  Solve  [Graphics:Images/CholeskyMod_gr_47.gif]  for  [Graphics:Images/CholeskyMod_gr_48.gif]  using forward substitution.
    
3.  Solve  [Graphics:Images/CholeskyMod_gr_49.gif]  for  [Graphics:Images/CholeskyMod_gr_50.gif]  using back substitution.

Proof  Cholesky, Doolittle and Crout Factorization  Cholesky, Doolittle and Crout Factorization  

 

    The following Cholesky subroutine can be used when the matrix  A  is real, symmetric and positive definite.
Observe that the loop starting with  For[j=k,j<=n,j++,  is not necessary and that  U  is computed by forming the transpose of  L.

 

Computer Programs  Cholesky, Doolittle and Crout Factorization  Cholesky, Doolittle and Crout Factorization  

Mathematica Subroutine (Cholesky factorization).

[Graphics:Images/CholeskyMod_gr_51.gif]

Example 1 (a).  Find the  A = LU factorization for the matrix  [Graphics:Images/CholeskyMod_gr_52.gif].  Use the Doolittle method.  

Example 1 (b).  Find the A = LU  factorization for the matrix  [Graphics:Images/CholeskyMod_gr_53.gif].  Use the Crout method.  

Example 1 (c).  Find the A = LU  factorization for the matrix  [Graphics:Images/CholeskyMod_gr_54.gif].  Use the Cholesky method.  
Solution 1 (a).
Solution 1 (b).
Solution 1 (c).

 

 

Example 2.  Consider the linear system  [Graphics:Images/CholeskyMod_gr_95.gif].  

2 (a).  Solve the linear system  AX = B  by using the Doolittle method.  
2 (b).  Solve the linear system  AX = B  by using the Crout method.  
2 (c).  Solve the linear system  AX = B  by using the Cholesky method.  
Solution 2 (a).
Solution 2 (b).
Solution 2 (c).

 

 

Application to Polynomial Curve Fitting

Theorem (
Least-Squares Polynomial Curve Fitting). Given the  [Graphics:Images/CholeskyMod_gr_179.gif]  data points  [Graphics:Images/CholeskyMod_gr_180.gif],  the least squares polynomial of degree  m  of the form  

        [Graphics:Images/CholeskyMod_gr_181.gif]

that fits the n data points is obtained by solving the following linear system


        [Graphics:Images/CholeskyMod_gr_182.gif][Graphics:Images/CholeskyMod_gr_183.gif]  

for the m+1 coefficients [Graphics:Images/CholeskyMod_gr_184.gif].  These equations are referred to as the "normal equations".

Proof  Least Squares Polynomials  Least Squares Polynomials  

 

Example 3.  Find the "least squares cubic" that for the four data points[Graphics:Images/CholeskyMod_gr_185.gif].   
Solution 3.

 

 

Application to Continuous Least Squares Approximation

    The continuous least squares approximation to a function  [Graphics:Images/CholeskyMod_gr_233.gif] on the interval [0,1] for the set of functions  [Graphics:Images/CholeskyMod_gr_234.gif]  can solved by using the normal equations

(1)        [Graphics:Images/CholeskyMod_gr_235.gif]   for   [Graphics:Images/CholeskyMod_gr_236.gif].

Where the inner product is [Graphics:Images/CholeskyMod_gr_237.gif].  Solve the linear system (1) for the coefficients [Graphics:Images/CholeskyMod_gr_238.gif] and construct the approximation function
        
        [Graphics:Images/CholeskyMod_gr_239.gif].

 

Definition (Gram Matrix).  The Gram matrix G is a matrix of inner products where the elements are  [Graphics:Images/CholeskyMod_gr_240.gif].  

    The case when the set of functions is  [Graphics:Images/CholeskyMod_gr_241.gif]  will produce the Hilbert matrix.  Since we require the computation to be as exact as possible and an exact formula is known for the inverse of the Hilbert matrix, this is an example where an inverse matrix comes in handy.

 

Example 4.  Find the continuous least squares polynomial of degree n=4 that approximates the function  [Graphics:Images/CholeskyMod_gr_242.gif]  over the interval  [Graphics:Images/CholeskyMod_gr_243.gif].  
Solution 4.

 

Old Lab Project (Doolittle's Method  Doolittle's Method).  Internet hyperlinks to an old lab project.  

 

Research Experience for Undergraduates

Cholesky, Doolittle and Crout Factorizations  Cholesky, Doolittle and Crout Factorizations  Internet hyperlinks to web sites and a bibliography of articles.  

 

Download this Mathematica Notebook Cholesky, Doolittle and Crout Factorization

 

Return to Numerical Methods - Numerical Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004