Examples on Gaussian Elimination

Comp.145  November 1996  Dr. A.J. Mestel

1. Solve the equations in Q. 2. of last week’s sheet by Gaussian elimination. It’s easier, isn’t it?

2. Use row operations to find the inverse of the 4 × 4 matrix A given by

A = ( \begin{matrix}1 & 2 & 0 & 0 \\ 0 & 1 & 2 & 1 \\ 1 & 2 & 2 & 1 \\ 1 & 3 & 2 & 2 \end{matrix} ) .

In so doing, obtain lower and upper triangular matrices L and U such that A = LU.

3. Consider the equations

\begin{aligned}x + 2y + 2z & = 3 + a \\ −2x + ay + z & = −3 \\ 2x + y + az & = 5 \end{aligned} .\}

Determine for which values of the constant a the system has no solution, a unique solution or infinitely many solutions.

4. Find all solutions of the equations A\underline{x} = 0 for the two cases

(i)  A = ( \begin{matrix}4 & −3 & −5 \\ 1 & 0 & −2 \\ 0 & 2 & −2 \end{matrix} )  and  (ii)  A = ( \begin{matrix}3 & 1 & 701 \\ 0 & 2 & 200 \\ 1 & 0 & 5 \end{matrix} ) .

5. Write a program to solve the 10 × 10 tri-diagonal system

( \begin{matrix}−2 & 1 & 0 & ... & 0 & 0 \\ 1 & −2 & 1 & ... & 0 & 0 \\ 0 & 1 & −2 & ... & 0 & 0 \\ ... & ... & ... & ... & ... & ... \\ 0 & 0 & 0 & ... & −2 & 1 \\ 0 & 0 & 0 & ... & 1 & −2 \end{matrix} ) ( x_{1} ; x_{2} ; x_{3} ; ⋮ ; x_{9} ; x_{10} ) = ( 2 2 2 ⋮ 2 2 )

Demonstrate that these equations are equivalent to the recurrence relations

x_{n+1} − 2x_{n} + x_{n−1} = 2 ,  x_{0} = 0 ,  x_{11} = 0 .

These equations have the exact solution x_{n} = n^{2} − 11n (by the end of the course you will be able to derive this.) Compare your computations with the exact solution.