Numerical Analysis/LU decomposition exercises

LU Decomposition exercises and quiz edit

Exercise 1 edit


Problem
Given the 3x3 matrix:

 

Find LU decomposition of A


Solution

The procedure of LU decomposition runs similar to the process of Gaussian Elimination. Firstly A is reduced to upper triangular form, which is U, using just the third elementary row operation, namely: add to one row of matrix a scalar time another row of that same matrix. Those scalar used during this process are co-efficient in the L matrix.

The final result will look like this:  .

Here are the solution for this problem:

According to Gaussian Elimination, the first number in row 2 must be zero-out by adding the first row of matrix a scalar times second row. This scalar, fortunately, is  .

Therefore:

 

.
And  .
In the similar manner we have:
 

.
And  
 

.
And  .
Eventually, A has been factorized to LU:
 .


Exercise 2 edit

Use exercise 1's result to solve the system:

 

Solution:

The idea of using LU decomposition to solve systems of simultaneous linear equations Ax=b is rewriting the systems as L(Ux)=b. To solve x, we first solve the systems Ly=b for y, and then, once y is determined, we solve the systems: Ux=y for x. Both systems are easy to solve, the first by forward substitution and the second by backward substitution.

Here is the solution for this exercise:

This system has the matrix form:

  =  

Since  , by Exercise 1 we have:

 

Lets  , we have:

 .

Use forward substitution we have:

 

 

 

Next, since  , we have
 .
Use backward substitution we have: