Example 2.  Consider the linear system  [Graphics:Images/CholeskyMod_gr_95.gif].  
2 (c).  Solve the linear system  AX = B  by using the Cholesky method.  

Solution 2 (c).

(i).  Enter the matrix and vector.  

[Graphics:../Images/CholeskyMod_gr_149.gif]



[Graphics:../Images/CholeskyMod_gr_150.gif]

[Graphics:../Images/CholeskyMod_gr_151.gif]

(ii).  Construct the Cholesky factorization of matrix A.

[Graphics:../Images/CholeskyMod_gr_152.gif]



[Graphics:../Images/CholeskyMod_gr_153.gif]

[Graphics:../Images/CholeskyMod_gr_154.gif]

(iii). Solve the linear system using our  ForeSub[n]  and  [BackSub[n]  subroutines.

First, solve the lower-triangular system    LY = B  for  Y.

[Graphics:../Images/CholeskyMod_gr_155.gif]



[Graphics:../Images/CholeskyMod_gr_156.gif]

Verify that  LY = B.

[Graphics:../Images/CholeskyMod_gr_157.gif]



[Graphics:../Images/CholeskyMod_gr_158.gif]

[Graphics:../Images/CholeskyMod_gr_159.gif]

[Graphics:../Images/CholeskyMod_gr_160.gif]

Second, solve the upper-triangular system    UX = Y  for  X.

[Graphics:../Images/CholeskyMod_gr_161.gif]



[Graphics:../Images/CholeskyMod_gr_162.gif]

[Graphics:../Images/CholeskyMod_gr_163.gif]

Verify that  UX = Y.  

[Graphics:../Images/CholeskyMod_gr_164.gif]



[Graphics:../Images/CholeskyMod_gr_165.gif]

[Graphics:../Images/CholeskyMod_gr_166.gif]

[Graphics:../Images/CholeskyMod_gr_167.gif]

[Graphics:../Images/CholeskyMod_gr_168.gif]

Therefore X is the solution to  LUX = B. and hence AX = B
And we can verify that it is the solution.

[Graphics:../Images/CholeskyMod_gr_169.gif]



[Graphics:../Images/CholeskyMod_gr_170.gif]

[Graphics:../Images/CholeskyMod_gr_171.gif]

[Graphics:../Images/CholeskyMod_gr_172.gif]

[Graphics:../Images/CholeskyMod_gr_173.gif]

[Graphics:../Images/CholeskyMod_gr_174.gif]

We can compare this solution with the solution obtained in parts (a) and (b).

[Graphics:../Images/CholeskyMod_gr_175.gif]



[Graphics:../Images/CholeskyMod_gr_176.gif]

[Graphics:../Images/CholeskyMod_gr_177.gif]

[Graphics:../Images/CholeskyMod_gr_178.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004