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.  

Solution 2 (a).

(i).  Enter the matrix and vector.  

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



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

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

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

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



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

[Graphics:../Images/CholeskyMod_gr_101.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_102.gif]



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

Verify that  LY = B.

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



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

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

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

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

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



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

Verify that  UX = Y.  

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



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

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

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

[Graphics:../Images/CholeskyMod_gr_114.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_115.gif]



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

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

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

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

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

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004