# Chapter 6 Gaussian Elimination Method for Solving Simultaneous Linear Equations

## 6.1 Learning Objectives

After successful completion of this lesson, you should be able to

(1). write the algorithm to solve a set of simultaneous linear equations using Naïve Gauss elimination method

(2). solve a set of simultaneous linear equations using Naïve Gauss elimination.

(3). use the forward elimination steps of Gauss elimination method to find determinant of a square matrix,

(4). enumerate theorems related to determinant of matrices,

(5). relate the zero and non-zero value of the determinant of a square matrix to the existence or non-existence of the matrix inverse.

(6). enumerate the pitfalls of the Naïve Gauss elimination method

(7). show the pitfalls of Naïve Gauss elimination method through examples

(8). write the algorithm to solve a set of simultaneous linear equations using Gaussian elimination with Partial Pivoting.

(9). solve a set of simultaneous linear equations using Gauss elimination method with partial pivoting

## 6.2 How is a set of equations solved numerically by Gaussian elimination method?

One of the most popular techniques for solving simultaneous linear equations is the Gaussian elimination method. The approach is designed to solve a general set of $$n$$ equations and $$n$$ unknowns

$\begin{split} &a_{11}x_{1} + a_{12}x_{2} + a_{13}x_{3} + \ldots + a_{1n}x_{n} = b_{1}\\ &a_{21}x_{1} + a_{22}x_{2} + a_{23}x_{3} + \ldots + a_{2n}x_{n} = b_{2}\\ &\vdots \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \vdots\\ &a_{n1}x_{1} + a_{n2}x_{2} + a_{n3}x_{3} + \ldots + a_{{nn}}x_{n} = b_{n} \end{split}$

Gaussian elimination consists of two steps

1. Forward Elimination of Unknowns: In this step, the unknown is eliminated in each equation starting with the first equation. This way, the equations are reduced to one equation and one unknown in each equation.

2. Back Substitution: In this step, starting from the last equation, each of the unknowns is found.

## 6.3 Forward Elimination of Unknowns:

In the first step of forward elimination, the first unknown, $$x_{1}$$ is eliminated from all rows below the first row. The first equation is selected as the pivot equation to eliminate $$x_{1}$$. So, to eliminate $$x_{1}$$ in the second equation, one divides the first equation by $$a_{11}$$ (hence called the pivot element) and then multiplies it by $$a_{21}$$. This is the same as multiplying the first equation by $$a_{21}/a_{11}$$ to give

$a_{21}x_{1} + \frac{a_{21}}{a_{11}}a_{12}x_{2} + \ldots + \frac{a_{21}}{a_{11}}a_{1n}x_{n} = \frac{a_{21}}{a_{11}}b_{1}$

Now, this equation can be subtracted from the second equation to give

$\left( a_{22} - \frac{a_{21}}{a_{11}}a_{12} \right)x_{2} + \ldots + \left( a_{2n} - \frac{a_{21}}{a_{11}}a_{1n} \right)x_{n} = b_{2} - \frac{a_{21}}{a_{11}}b_{1}$

or

${a^\prime }_{22}x_{2} + \ldots + {a^\prime }_{2n}x_{n} = {b^\prime }_{2}$

where

$\begin{split} &{a^\prime }_{22} = a_{22} - \frac{a_{21}}{a_{11}}a_{12}\\ &\vdots\\ &{a^\prime }_{2n} = a_{2n} - \frac{a_{21}}{a_{11}}a_{1n}\end{split}$

This procedure of eliminating $$x_{1}$$, is now repeated for the third equation to the $$n^{{th}}$$ equation to reduce the set of equations as

$\begin{split} &a_{11}x_{1} + a_{12}x_{2} + a_{13}x_{3} + \ldots + a_{1n}x_{n} = b_{1}\\ &{a^\prime }_{22}x_{2} + {a^\prime }_{23}x_{3} + \ldots + {a^\prime }_{2n}x_{n} = {b^\prime }_{2}\\ &{a^\prime }_{32}x_{2} + {a^\prime }_{33}x_{3} + \ldots + {a^\prime }_{3n}x_{n} = {b^\prime }_{3}\\ &\vdots \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \vdots \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \vdots\\ &{a^\prime }_{n2}x_{2} + {a^\prime }_{n3}x_{3} + \ldots + {a^\prime }_{\text{nn}}x_{n} = {b^\prime }_{n} \end{split}$

This is the end of the first step of forward elimination. Now for the second step of forward elimination, we start with the second equation as the pivot equation and $${a^\prime }_{22}$$ as the pivot element. So, to eliminate $$x_{2}$$ in the third equation, one divides the second equation by $${a^\prime }_{22}$$ (the pivot element) and then multiply it by$${a^\prime }_{32}$$. This is the same as multiplying the second equation by $$\displaystyle {a^\prime }_{32}/{a^\prime }_{22}$$ and subtracting it from the third equation. This makes the coefficient of $$x_{2}$$ zero in the third equation. The same procedure is now repeated for the fourth equation till the $$n^{\text{th}}$$equation to give

$\begin{split} &a_{11}x_{1} + a_{12}x_{2} + a_{13}x_{3} + \ldots + a_{1n}x_{n} = b_{1}\\ &{a^\prime }_{22}x_{2} + {a^\prime }_{23}x_{3} + \ldots + {a^\prime }_{2n}x_{n} = {b^\prime }_{2}\\ &{a^{\prime\prime}}_{33}x_{3} + \ldots + {a^{\prime\prime}}_{3n}x_{n} = {b^{\prime\prime}}_{3}\\ &\vdots \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \vdots\\ &{a^{\prime\prime}}_{n3}x_{3} + \ldots + {a^{\prime\prime}}_{\text{nn}}x_{n} = {b^{\prime\prime}}_{n} \end{split}$

The next steps of forward elimination are conducted by using the third equation as a pivot equation and so on. That is, there will be a total of $$n - 1$$ steps of forward elimination. At the end of $$n - 1$$ steps of forward elimination, we get a set of equations that look like

$\begin{split} &a_{11}x_{1} + a_{12}x_{2} + a_{13}x_{3} + \ldots + a_{1n}x_{n} = b_{1}\\ &\ \ \ \ \ \ \ \ \ \ \ \ \ {a^\prime }_{22}x_{2} + {a^\prime }_{23}x_{3} + \ldots + {a^\prime }_{2n}x_{n} = {b^\prime }_{2}\\ &\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {a^{\prime\prime}}_{33}x_{3} + \ldots + {a^{\prime\prime}}_{3n}x_{n} = {b{\prime\prime}}_{3}\\ &\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \vdots \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \vdots\\ &\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ a_{{nn}}^{\left( n - 1 \right)}x_{n} = b_{n}^{\left( n - 1 \right)}\end{split}$

## 6.4 Back Substitution:

Now the equations are solved starting from the last equation as it has only one unknown.

$x_{n} = \frac{b_{n}^{(n - 1)}}{a_{{nn}}^{(n - 1)}}$

Then the second last equation, that is the $$(n - 1)^{{th}}$$ equation, has two unknowns: $$x_{n}$$ and $$x_{n - 1}$$, but $$x_{n}$$ is already known. This reduces the $$(n - 1)^{th}$$ equation also to one unknown. Back substitution hence can be represented for all equations by the formula

$x_{i} = \frac{b_{i}^{\left( i - 1 \right)} - \displaystyle\sum_{j = i + 1}^{n}{a_{{ij}}^{\left( i - 1 \right)}x_{j}}}{a_{{ii}}^{\left( i - 1 \right)}}\ \text{for }i = n - 1,\ \ n - 2,\ldots\ ,\ 1$

and

$x_{n} = \frac{b_{n}^{(n - 1)}}{a_{{nn}}^{(n - 1)}}$

## 6.5 Example 1

The upward velocity of a rocket is given at three different times in Table 1.

Table 1: Velocity vs. time data.

Time, t (s) Velocity, v (m/s)
$$5$$ $$106.8$$
$$8$$ $$177.2$$
$$12$$ $$279.2$$

The velocity data is approximated by a polynomial as

$v\left( t \right) = a_{1}t^{2} + a_{2}t + a_{3},5 \leq t \leq 12$

The coefficients $$a_{1},a_{2},anda_{3}$$ for the above expression are given by

$\begin{bmatrix} 25 & 5 & 1 \\ 64 & 8 & 1 \\ 144 & 12 & 1 \\ \end{bmatrix}\begin{bmatrix} a_{1} \\ a_{2} \\ a_{3} \\ \end{bmatrix} = \begin{bmatrix} 106.8 \\ 177.2 \\ 279.2 \\ \end{bmatrix}$

Find the values of $$a_{1},a_{2},and\ a_{3}$$ using the Naïve Gauss elimination method. Find the velocity at $$t = 6,7.5,9,11$$ seconds.

Solution

The augmented matrix is

$\begin{bmatrix} 25 & 5 & 1 & | & 106.8 \\ 64 & 8 & 1 & | & 177.2 \\ 144 & 12 & 1 & | & 279.2 \\ \end{bmatrix}$

Forward Elimination of Unknowns

Since there are three equations, there will be two steps of forward elimination of unknowns.

First step

Divide Row $$1$$ by $$25$$ and then multiply it by $$64$$, that is, multiply Row $$1$$ by $$64/25 = 2.56$$.

$\left( \begin{matrix} \left\lbrack 25 \right.\ & \ 5 & \ \ \ \ \ \ \ 1\ \ \ \ \ \ \ |\ \ \ \ \ \\ \end{matrix}106.8\rbrack \right) \times 2.56\ \text{gives Row 1 as}$

$\begin{matrix} \left\lbrack 64 \right.\ & 12.8 & 2.56 \\ \end{matrix}\ \ \ \ \ |\ \ 273.408\rbrack$

Subtract the result from Row $$2$$

$\frac{\begin{matrix} \ \ \ \lbrack\begin{matrix} 64 & \ \ \ \ 8 & \ \ \ \ \ 1 \\ \end{matrix}\ \ \ \ \ |\ \ & 177.2\rbrack \\- \lbrack\begin{matrix} 64 & 12.8 & 2.56 \\ \end{matrix}\ \ | & 273.408\rbrack \\ \end{matrix}}{\ \ \ \begin{matrix} \begin{matrix} 0 & - 4.8 & - 1.56 \\ \end{matrix} & - 96.208 \\ \end{matrix}}$

to get the resulting equations as

$\left\lbrack \begin{matrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 144 & 12 & 1 \\ \end{matrix} \ \ \ \ \ \ \ \ \begin{matrix} | \ \ \ \ \ \ \ 106.8 \\ \ |\ - 96.208 \\ |\ \ \ \ \ \ \ 279.2 \\ \end{matrix} \right\rbrack$

Divide Row $$1$$ by $$25$$ and then multiply it by $$144$$, that is, multiply Row $$1$$ by $$144/25 = 5.76$$.

$\left( \begin{matrix} \left\lbrack 25 \right.\ & \ \ \ \ 5 & \ \ \ 1 \\ \end{matrix} \ \ \ \ \ \ |\ \ \ \ \ \ \ \ \ 106.8\rbrack \right) \times 5.76\ \text{gives Row 1 as}$

$\left\lbrack \begin{matrix} 144 & 28.8 & 5.76 \\ \end{matrix} \ \ \ \ \right|\ \ \ \ \ \ 615.168\rbrack$

Subtract the result from Row $$3$$

$\frac{\begin{matrix} \ \ \ \ \lbrack\begin{matrix} 144 & 12 & \ \ \ \ \ \ 1 \\ \end{matrix}\ \ \ \ | & 279.2\rbrack \\ - \begin{matrix} \lbrack 144 & 28.8 & 5.76 \\ \end{matrix}\ \ \ | & 615.168\rbrack \\ \end{matrix}}{\ \ \ \ \begin{matrix} \begin{matrix} 0 & - 16.8 & - 4.76 \\ \end{matrix} & - 335.968 \\ \end{matrix}}$

to get the resulting equations as

$\left\lbrack \begin{matrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & - 16.8 & - 4.76 \\ \end{matrix}\ \ \ \ \ \ \ \ \ \begin{matrix} |\ \ \ \ \ \ \ \ \ 106.8 \\ |\ \ - 96.208 \\| - 335.968 \\ \end{matrix} \right\rbrack$

Second step

We now divide Row $$2$$ by $$-4.8$$ and then multiply by $$-16.8$$, that is, multiply Row $$2$$ by $$-16.8/-4.8 = 3.5$$.

$\left( \left\lbrack 0 - 4.8\ \ - 1.56\ \ \ \ \ \ \ \ \ \ \right|\ \ \ - 96.208\rbrack\ \right) \times 3.5\ \text{gives Row 2 as}$

$\left\lbrack 0 - 16.8\ - 5.46\ \ \ \ \ \ \ \ \ \ \right| - 336.728\rbrack$

Subtract the result from Row $$3$$

$\frac{\begin{matrix} \ \ \ \ \ \lbrack\begin{matrix} 0 & -16.8 & -4.76\ \\ \end{matrix} \ \ \ \ \ | & -335.968\rbrack \\ \ -\ \lbrack \begin{matrix} 0 & -16.8 & -5.46\ \\ \end{matrix}\ \ \ \ \ | & -336.728\rbrack \\ \end{matrix}}{\begin{matrix} \ \ \ \ \ \begin{matrix} 0 & \ \ \ \ \ \ \ 0 & \ \ \ \ \ \ 0.7 \end{matrix} & \ \ \ \ \ \ \ \ \ \ \ 0.76 \ \ \ \end{matrix}}$

to get the resulting equations as

$\left\lbrack \begin{matrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & 0 & 0.7 \\ \end{matrix} \ \ \ \ \ \ \ \begin{matrix} |\ \ \ \ \ \ 106.8 \\ \ \ |\ - 96.208 \\ |\ \ \ \ \ \ \ \ 0.76 \\ \end{matrix} \right\rbrack$

$\begin{bmatrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & 0 & 0.7 \\ \end{bmatrix}\begin{bmatrix} a_{1} \\ a_{2} \\ a_{3} \\ \end{bmatrix} = \begin{bmatrix} 106.8 \\ - 96.208 \\ 0.76 \\ \end{bmatrix}$

Back substitution

From the third equation

$0.7a_{3} = 0.76$

$\begin{split} a_{3} &= \frac{0.76}{0.7}\\ &= 1.08571 \end{split}$

Substituting the value of $$a_{3}$$ in the second equation,

$- 4.8a_{2} - 1.56a_{3} = - 96.208$

$\begin{split} a_{2} &= \frac{- 96.208 + 1.56a_{3}}{- 4.8}\\ &= \frac{- 96.208 + 1.56 \times 1.08571}{- 4.8}\\ &= 19.6905\end{split}$

Substituting the value of $$a_{2}$$ and $$a_{3}$$ in the first equation,

$25a_{1} + 5a_{2} + a_{3} = 106.8$

$\begin{split} a_{1} &= \frac{106.8 - 5a_{2} - a_{3}}{25}\\ &= \frac{106.8 - 5 \times 19.6905 - 1.08571}{25}\\ &= 0.290472 \end{split}$

Hence the solution vector is

$\begin{bmatrix} a_{1} \\ a_{2} \\ a_{3} \\ \end{bmatrix} = \begin{bmatrix} 0.290472 \\ 19.6905 \\ 1.08571 \\ \end{bmatrix}$

The polynomial that passes through the three data points is then

$\begin{split} v\left( t \right) &= a_{1}t^{2} + a_{2}t + a_{3}\\ &= 0.290472t^{2} + 19.6905t + 1.08571,\ \ 5 \leq t \leq 12 \end{split}$

Since we want to find the velocity at $$t = 6,7.5,9$$ and $$11$$ seconds, we could simply substitute each value of $$t$$ in $$v\left( t \right) = 0.290472t^{2} + 19.6905t + 1.08571$$ and find the corresponding velocity. For example, at $$t = 6$$

$\begin{split} v\left( 6 \right) &= 0.290472\left( 6 \right)^{2} + 19.6905\left( 6 \right) + 1.08571\\ &= 129.686\ \ m/s \end{split}$

However, we could also find all the needed values of velocity at $$t$$ = $$6, 7.5, 9, 11$$ seconds using matrix multiplication.

$v\left( t \right) = \left\lbrack 0.290472\ \ 19.6905 \ \ 1.08571 \right\rbrack\begin{bmatrix} t^{2} \\ t \\ 1 \\ \end{bmatrix}$

So, if we want to find $$v\left( 6 \right),v\left( 7.5 \right),v\left( 9 \right),v\left( 11 \right),$$ it is given by

$\begin{split} \begin{matrix}\left\lbrack v\left( 6 \right)v\left( 7.5 \right)v\left( 9 \right)v\left( 11 \right) \right\rbrack \end{matrix} &= \left\lbrack 0.290472 \ \ 19.6905\ \ 1.08571 \right\rbrack\begin{bmatrix} 6^{2} & 7.5^{2} & 9^{2} & 11^{2} \\ 6 & 7.5 & 9 & 11 \\ 1 & 1 & 1 & 1 \end{bmatrix}\\ &= \left\lbrack 0.290472 \ \ 19.6905 \ \ 1.08571 \right\rbrack\begin{bmatrix} 36 & 56.25 & 81 & 121 \\ 6 & 7.5 & 9 & 11 \\ 1 & 1 & 1 & 1 \end{bmatrix}\\ &= \left\lbrack 129.686 \ \ 165.104\ \ 201.828 \ \ 252.828 \right\rbrack \end{split}$

$v(6) = 129.686\ m/s$

$v(7.5) = 165.1\ 04\ m/s$

$v(9) = 201.828\ m/s$

$v(11) = 252.828\ m/s$

## 6.6 Can we use Naive Gauss elimination methods to find the determinant of a square matrix?

One of the more efficient ways to find the determinant of a square matrix is by taking advantage of the following two theorems on a determinant of matrices coupled with Naive Gauss elimination.

Theorem 1:

Let $$\lbrack A\rbrack$$ be a $$n \times n$$ matrix. Then, if $$\lbrack B\rbrack$$ is a $$n \times n$$ matrix that results from adding or subtracting a multiple of one row to another row, then $$det(A) = det(B)$$ (The same is true for column operations also).

Theorem 2:

Let $$\lbrack A\rbrack$$ be a $$n \times n$$ matrix that is upper triangular, lower triangular or diagonal, then

$\begin{split} \det(A) &= a_{11} \times a_{22} \times ... \times a_{{ii}} \times ... \times a_{{nn}}\\ &= \prod_{i = 1}^{n}a_{{ii}} \end{split}$

This implies that if we apply the forward elimination steps of the Naive Gauss elimination method, the determinant of the matrix stays the same according to Theorem 1. Then since at the end of the forward elimination steps, the resulting matrix is upper triangular, the determinant will be given by Theorem 2.

### 6.6.1 Example 2

Find the determinant of

$\lbrack A\rbrack = \begin{bmatrix} 25 & 5 & 1 \\ 64 & 8 & 1 \\ 144 & 12 & 1 \\ \end{bmatrix}$

Solution

Remember in Example 1, we conducted the steps of forward elimination of unknowns using the Naive Gauss elimination method on $$\lbrack A\rbrack$$ to give

$\left\lbrack B \right\rbrack = \begin{bmatrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & 0 & 0.7 \\ \end{bmatrix}$

According to Theorem 2

$\begin{split} det(A) &= det(B)\\ &= 25 \times ( - 4.8) \times 0.7\\ &= - 84.00 \end{split}$

## 6.7 What if I cannot find the determinant of the matrix using the Naive Gauss elimination method, for example, if I get division by zero problems during the Naive Gauss elimination method?

Well, you can apply Gaussian elimination with partial pivoting. However, the determinant of the resulting upper triangular matrix may differ by a sign. The following theorem applies in addition to the previous two to find the determinant of a square matrix.

Theorem 3:

Let $$\lbrack A\rbrack$$ be a $$n \times n$$ matrix. Then, if $$\lbrack B\rbrack$$ is a matrix that results from switching one row with another row, then $$det(B) = - det(A)$$.

### 6.7.1 Example 3

Find the determinant of

$\lbrack A\rbrack = \begin{bmatrix} 10 & - 7 & 0 \\ - 3 & 2.099 & 6 \\ 5 & - 1 & 5 \\ \end{bmatrix}$

Solution

The end of the forward elimination steps of Gaussian elimination with partial pivoting, we would obtain

$\lbrack B\rbrack = \begin{bmatrix} 10 & - 7 & 0 \\ 0 & 2.5 & 5 \\ 0 & 0 & 6.002 \\ \end{bmatrix}$

$\begin{split} \det\left( B \right) &= 10 \times 2.5 \times 6.002\\ &= 150.05 \end{split}$

Since rows were switched once during the forward elimination steps of Gaussian elimination with partial pivoting,

$\begin{split} \det\left( A \right) &= - det(B)\\ &= - 150.05 \end{split}$

### 6.7.2 Example 4

Prove

$\det(A) = \frac{1}{\det\left( A^{- 1} \right)}$

Solution

$\lbrack A\rbrack\lbrack A\rbrack^{- 1} = \lbrack I\rbrack$

$\det(AA^{- 1}) = det(I)$

$\det(A)\det(A^{-1}) = 1$

$\det(A) = \frac{1}{\det(A^{-1})}$

If $${\lbrack A\rbrack}$$ is a $${n \times n}$$ matrix and $${\det(A) \neq 0}$$, what other statements are equivalent to it?

(1)  $$\lbrack A\rbrack$$ is invertible.

(2)  $$\lbrack A\rbrack^{- 1}$$ exists.

(3)  $$\lbrack A\rbrack\ \lbrack X\rbrack = \lbrack C\rbrack$$ has a unique solution.

(4)  $$\lbrack A\rbrack\ \lbrack X\rbrack = \lbrack 0\rbrack$$ solution is $$\lbrack X\rbrack = \lbrack{0}\rbrack$$.

(5)  $$\lbrack A\rbrack\ \lbrack A\rbrack^{- 1} = \lbrack I\rbrack = \lbrack A\rbrack^{- 1}\ \lbrack A\rbrack$$.

## 6.8 Are there any pitfalls of the Naïve Gauss elimination method?

Yes, there are two pitfalls of the Naïve Gauss elimination method.

Division by zero: It is possible for division by zero to occur during the beginning of the $$n - 1$$ steps of forward elimination.

For example

$5x_{2} + 6x_{3} = 11$

$4x_{1} + 5x_{2} + 7x_{3} = 16$

$9x_{1} + 2x_{2} + 3x_{3} = 15$

will result in division by zero in the first step of forward elimination as the coefficient of $$x_{1}$$ in the first equation is zero as is evident when we write the equations in matrix form.

$\begin{bmatrix} 0 & 5 & 6 \\ 4 & 5 & 7 \\ 9 & 2 & 3 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 11 \\ 16 \\ 15 \\ \end{bmatrix}$

But what about the equations below: Is division by zero a problem?

$5x_{1} + 6x_{2} + 7x_{3} = 18$

$10x_{1} + 12x_{2} + 3x_{3} = 25$

$20x_{1} + 17x_{2} + 19x_{3} = 56$

Written in matrix form,

$\begin{bmatrix} 5 & 6 & 7 \\ 10 & 12 & 3 \\ 20 & 17 & 19 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 18 \\25 \\ 56 \\ \end{bmatrix}$

there is no issue of division by zero in the first step of forward elimination. The pivot element is the coefficient of $$x_{1}$$ in the first equation, 5, and that is a non-zero number. However, at the end of the first step of forward elimination, we get the following equations in matrix form

$\begin{bmatrix} 5 & 6 & 7 \\ 0 & 0 & - 11 \\ 0 & - 7 & - 9 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 18 \\ - 11 \\ - 16 \\ \end{bmatrix}$

Now at the beginning of the $$2^{nd}$$ step of forward elimination, the coefficient of $$x_{2}$$ in Equation 2 would be used as the pivot element. That element is zero and hence would create the division by zero problem.

So it is important to consider that the possibility of division by zero can occur at the beginning of any step of forward elimination.

Round-off error: The Naïve Gauss elimination method is prone to round-off errors. This is true when there are large numbers of equations as errors propagate. Also, if there is subtraction of numbers from each other, it may create large errors. See the example below.

### 6.8.1 Example 5

Remember Example 2 where we used Naïve Gauss elimination to solve

$20x_{1} + 15x_{2} + 10x_{3} = 45$

$- 3x_{1} - 2.249x_{2} + 7x_{3} = 1.751$

$5x_{1} + x_{2} + 3x_{3} = 9$

using six significant digits with chopping in your calculations? Repeat the problem, but now use five significant digits with chopping in your calculations.

Solution

Writing in the matrix form

$\begin{bmatrix} 20 & 15 & 10 \\ - 3 & - 2.249 & 7 \\ 5 & 1 & 3 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 45 \\ 1.751 \\ 9 \\ \end{bmatrix}$

Forward Elimination of Unknowns

First step

Divide Row 1 by 20 and then multiply it by –3, that is, multiply Row 1 by $$- 3/20 = - 0.15$$.

$\begin{pmatrix} \begin{bmatrix} 20 & 15 & 10 \\ \end{bmatrix} & \left\lbrack 45 \right\rbrack \\ \end{pmatrix} \times - 0.15\ \text{gives Row 1 as}$

$\begin{matrix} \left\lbrack - 3 \right.\ & - 2.25 & \left. \ - 1.5 \right\rbrack \\ \end{matrix} \ \ \ \ \ \ \ \ \left\lbrack - 6.75 \right\rbrack$

Subtract the result from Row 2

$\frac{\begin{matrix} \ \ \lbrack\begin{matrix} -3 & \ \ \ -2.249 & \ \ \ \ \ 7 \\ \end{matrix}\ \ \ \ \ \ | & 1.751\rbrack \\ - \begin{matrix} \lbrack -3 & \ \ \ \ -2.25 \ \ -1.5 \ \ \\ \end{matrix}\ \ \ | & -6.75\rbrack \\ \end{matrix}}{\ \ \ \ \begin{matrix} \begin{matrix} 0 & \ \ \ \ \ 0.001 & \ \ \ \ 8.5 \\ \end{matrix} & \ \ \ \ \ 8.501 \end{matrix}}$

to get the resulting equations as

$\begin{bmatrix} 20 & 15 & 10 \\ 0 & 0.001 & 8.5 \\ 5 & 1 & 3 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 45 \\ 8.501 \\ 9 \\ \end{bmatrix}$

Divide Row 1 by 20 and then multiply it by $$5$$, that is, multiply Row 1 by $$5/20 = 0.25$$.

$\begin{pmatrix} \begin{bmatrix} 20 & 15 & 10 \\ \end{bmatrix} & \left\lbrack 45 \right\rbrack \\ \end{pmatrix} \times 0.25\ \text{gives Row 1 as}$

$\begin{matrix} \left\lbrack 5 \right.\ & 3.75 & \left. \ 2.5 \right\rbrack \\ \end{matrix} \ \ \ \ \ \ \ \ \left\lbrack 11.25 \right\rbrack$

Subtract the result from Row 3

$\frac{\begin{matrix} \ \ \lbrack\begin{matrix} 5 & \ \ \ \ \ \ 1 & \ \ \ \ \ \ 3 \\ \end{matrix}\ \ \ \ \ \ \ | & 9\rbrack \\ - \begin{matrix} \lbrack 5 & \ \ \ \ 3.75 \ \ \ \ \ 2.5 \ \ \\ \end{matrix}\ \ \ | & 11.25\rbrack \\ \end{matrix}}{\ \ \ \begin{matrix} \begin{matrix} 0 &\ -2.75 \ \ \ \ \ \ 0.5 \\ \end{matrix} & \ -2.25 \end{matrix}}$

to get the resulting equations as

$\begin{bmatrix} 20 & 15 & 10 \\ 0 & 0.001 & 8.5 \\ 0 & - 2.75 & 0.5 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 45 \\ 8.501 \\ - 2.25 \\ \end{bmatrix}$

Second step

Now for the second step of forward elimination, we will use Row 2 as the pivot equation and eliminate Row 3: Column 2.

Divide Row 2 by $$0.001$$ and then multiply it by $$-2.75$$, that is, multiply Row 2 by $$- 2.75/0.001 = - 2750$$.

$\begin{pmatrix} \begin{bmatrix} 0 & 0.001 & 8.5 \\ \end{bmatrix} & \left\lbrack 8.501 \right\rbrack \\ \end{pmatrix} \times - 2750\ \text{gives Row 2 as}$

$\begin{matrix} \left\lbrack 0 \right.\ & - 2.75 & \left. \ - 23375 \right\rbrack \\ \end{matrix}\ \ \ \ \ \ \ \ \left\lbrack - 23377.75 \right\rbrack$

Rewriting within 5 significant digits with chopping

$\begin{matrix} \left\lbrack 0 \right.\ & - 2.75 & \left. \ - 23375 \right\rbrack \\ \end{matrix} \ \ \ \ \ \ \ \ \left\lbrack - 23377 \right\rbrack$

Subtract the result from Row 3

$\frac{\begin{matrix} \ \ \lbrack\begin{matrix} 0 & \ \ \ \ \ \ -2.75 & \ \ \ \ \ \ 0.5 \\ \end{matrix}\ \ \ \ \ \ \ | & -2.25\rbrack \\ - \begin{matrix} \lbrack 0 & \ \ \ \ -2.75 \ \ \ \ \ -23375 \ \ \\ \end{matrix}\ \ \ | & -23377\rbrack \\ \end{matrix}}{\begin{matrix} \begin{matrix} 0 &\ \ \ \ \ \ \ \ \ \ \ \ 0 \ \ \ \ \ \ \ \ \ \ \ 23375 \\ \end{matrix} & \ \ \ \ \ \ \ \ 23374 \end{matrix}}$

Rewriting within 6 significant digits with chopping

$\begin{matrix} \left\lbrack 0 \right.\ & 0 & \left. \ 23375 \right\rbrack \\ \end{matrix} \ \ \ \ \ \ \ \ \left\lbrack - 23374 \right\rbrack$

to get the resulting equations as

$\begin{bmatrix} 20 & 15 & 10 \\ 0 & 0.001 & 8.5 \\ 0 & 0 & 23375 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 45 \\ 8.501 \\ 23374 \\ \end{bmatrix}$

This is the end of the forward elimination steps.

Back substitution

We can now solve the above equations by back substitution. From the third equation,

$\begin{split} 23375x_{3} &= 23374\\ x_{3} &= \frac{23374}{23375}\\ &= 0.99995 \end{split}$

Substituting the value of $$x_{3}$$ in the second equation

$0.001x_{2} + 8.5x_{3} = 8.501$

$\begin{split} x_{2} &= \frac{8.501 - 8.5x_{3}}{0.001}\\ &= \frac{8.501 - 8.5 \times 0.99995}{0.001}\\ &= \frac{8.501 - 8.499575}{0.001}\\ &= \frac{8.501 - 8.4995}{0.001}\\ &= \frac{0.0015}{0.001}\\ &= 1.5 \end{split}$

Substituting the value of $$x_{3}$$ and $$x_{2}$$ in the first equation,

$20x_{1} + 15x_{2} + 10x_{3} = 45$

$\begin{split} x_{1} &= \frac{45 - 15x_{2} - 10x_{3}}{20}\\ &= \frac{45 - 15 \times 1.5 - 10 \times 0.99995}{20}\\ &= \frac{45 - 22.5 - 9.9995}{20}\\ &= \frac{22.5 - 9.9995}{20}\\ &= \frac{12.5005}{20}\\ &= \frac{12.500}{20}\\ &= 0.625 \end{split}$

Hence the solution is

$\begin{split} \left\lbrack X \right\rbrack &= \begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix}\\ &= \begin{bmatrix} 0.625 \\ 1.5 \\ 0.99995 \\ \end{bmatrix} \end{split}$

Compare this with the exact solution of

$\left\lbrack X \right\rbrack = \begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \\ 1 \\ \end{bmatrix}$

## 6.9 What are some techniques for improving the Naïve Gauss elimination method?

As seen in Example 3, round off errors were large when five significant digits were used as opposed to six significant digits. One method of decreasing the round-off error would be to use more significant digits, that is, use double or quad precision for representing the numbers. However, this would not avoid possible division by zero errors in the Naïve Gauss elimination method. To avoid division by zero as well as reduce (not eliminate) round-off error, Gaussian elimination with partial pivoting is the method of choice.

## 6.10 How does Gaussian elimination with partial pivoting differ from Naïve Gauss elimination?

The two methods are the same, except in the beginning of each step of forward elimination, a row switching is done based on the following criterion. If there are $$n$$ equations, then there are $$n - 1$$ forward elimination steps. At the beginning of the $$k^{{th}}$$ step of forward elimination, one finds the maximum of

$\left| a_{{kk}} \right|,\left| a_{k + 1,k} \right|,\ldots\ldots,\left| a_{{nk}} \right|$

Then if the maximum of these values is $$\left| a_{{pk}} \right|$$ in the $$p^{{th}}$$ row, $$k \leq p \leq n$$, then switch rows $$p$$ and $$k$$.

The other steps of forward elimination are the same as the Naïve Gauss elimination method. The back substitution steps stay exactly the same as the Naïve Gauss elimination method.

## 6.11 Example 6

In the previous two examples, we used Naive Gauss elimination to solve

$20x_{1} + 15x_{2} + 10x_{3} = 45$

$- 3x_{1} - 2.249x_{2} + 7x_{3} = 1.751$

$5x_{1} + x_{2} + 3x_{3} = 9$

using five and six significant digits with chopping in the calculations. Using five significant digits with chopping, the solution found was

$\begin{split} \left\lbrack X \right\rbrack &= \begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix}\\ &= \begin{bmatrix} 0.625 \\ 1.5 \\ 0.99995 \\ \end{bmatrix} \end{split}$

This is different from the exact solution of

$\begin{split} \left\lbrack X \right\rbrack &= \begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix}\\ &= \begin{bmatrix} 1 \\ 1 \\ 1 \\ \end{bmatrix} \end{split}$

Find the solution using Gaussian elimination with partial pivoting using five significant digits with chopping in your calculations.

Solution

$\begin{bmatrix} 20 & 15 & 10 \\ - 3 & - 2.249 & 7 \\ 5 & 1 & 3 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 45 \\ 1.751 \\ 9 \\ \end{bmatrix}$

Forward Elimination of Unknowns

Now for the first step of forward elimination, the absolute value of the first column elements below Row 1 is

$\left| 20 \right|,\left| - 3 \right|,\left| 5 \right|$

or

$20,\ 3,\ 5$

So, the largest absolute value is in the Row $$1$$. So as per Gaussian elimination with partial pivoting, the switch is between Row $$1$$ and Row $$1$$ to give

$\begin{bmatrix} 20 & 15 & 10 \\ - 3 & - 2.249 & 7 \\ 5 & 1 & 3 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 45 \\ 1.751 \\ 9 \\ \end{bmatrix}$

Divide Row $$1$$ by $$20$$ and then multiply it by $$-3$$, that is, multiply Row $$1$$ by $$\displaystyle - 3/20 = - 0.15$$.

$\begin{pmatrix} \begin{bmatrix} 20 & 15 & 10 \\ \end{bmatrix} & \left\lbrack 45 \right\rbrack \\ \end{pmatrix} \times - 0.15\ \text{gives Row 1 as}$

$\begin{matrix} \left\lbrack - 3 \right.\ & - 2.25 & \left. \ - 1.5 \right\rbrack \\ \end{matrix}\ \ \ \ \ \ \ \ \left\lbrack - 6.75 \right\rbrack$

Subtract the result from Row $$2$$

$\frac{\begin{matrix} \ \ \lbrack\begin{matrix} -3 & \ \ \ -2.249 & \ \ \ \ \ 7 \\ \end{matrix}\ \ \ \ \ \ | & 1.751\rbrack \\ - \begin{matrix} \lbrack -3 & \ \ \ \ -2.25 \ \ -1.5 \ \ \\ \end{matrix}\ \ \ | & -6.75\rbrack \\ \end{matrix}}{\ \ \ \ \begin{matrix} \begin{matrix} 0 & \ \ \ \ \ 0.001 & \ \ \ \ 8.5 \\ \end{matrix} & \ \ \ \ \ 8.501 \end{matrix}}$

to get the resulting equations as

$\begin{bmatrix} 20 & 15 & 10 \\ 0 & 0.001 & 8.5 \\ 5 & 1 & 3 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 45 \\ 8.501 \\ 9 \\ \end{bmatrix}$

Divide Row $$1$$ by $$20$$ and then multiply it by $$5$$, that is, multiply Row $$1$$ by $$5/20 = 0.25$$.

$\begin{pmatrix} \begin{bmatrix} 20 & 15 & 10 \\ \end{bmatrix} & \left\lbrack 45 \right\rbrack \\ \end{pmatrix} \times 0.25\ \text{gives Row 1 as}$

$\begin{matrix} \left\lbrack 5 \right.\ & 3.75 & \left. \ 2.5 \right\rbrack \\ \end{matrix}\ \ \ \ \ \ \ \ \left\lbrack 11.25 \right\rbrack$

Subtract the result from Row $$3$$

$\displaystyle \frac{\begin{matrix} \ \ \lbrack\begin{matrix} 5 & \ \ \ \ \ \ 1 & \ \ \ \ \ \ 3 \\ \end{matrix}\ \ \ \ \ \ \ | & 9\rbrack \\ - \begin{matrix} \lbrack 5 & \ \ \ \ 3.75 \ \ \ \ \ 2.5 \ \ \\ \end{matrix}\ \ \ | & 11.25\rbrack \\ \end{matrix}}{\ \ \ \begin{matrix} \begin{matrix} 0 &\ -2.75 \ \ \ \ \ \ 0.5 \\ \end{matrix} & \ -2.25 \end{matrix}}$

to get the resulting equations as

$\begin{bmatrix} 20 & 15 & 10 \\ 0 & 0.001 & 8.5 \\ 0 & - 2.75 & 0.5 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 45 \\ 8.501 \\ - 2.25 \\ \end{bmatrix}$

This is the end of the first step of forward elimination.

Now for the second step of forward elimination, the absolute value of the second column elements below Row 1 is

$\left| 0.001 \right|,\left| - 2.75 \right|$

or

$0.001,\ 2.75$

So, the largest absolute value is in Row $$3$$. So, Row $$2$$ is switched with Row $$3$$ to give

$\begin{bmatrix} 20 & 15 & 10 \\ 0 & - 2.75 & 0.5 \\ 0 & 0.001 & 8.5 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 45 \\ - 2.25 \\ 8.501 \\ \end{bmatrix}$

Divide Row $$2$$ by $$-2.75$$ and then multiply it by $$0.001$$, that is, multiply Row $$2$$ by $$0.001/ - 2.75 = - 0.00036363$$.

$\begin{pmatrix} \begin{bmatrix} 0 & - 2.75 & 0.5 \\ \end{bmatrix} & \left\lbrack - 2.25 \right\rbrack \\ \end{pmatrix} \times - 0.00036363\ \text{gives Row 2 as}$

$\begin{matrix} \left\lbrack 0 \right.\ & 0.00099998 & \left. \ - 0.00018182 \right\rbrack \\ \end{matrix}\ \ \ \ \ \ \ \ \left\lbrack 0.00081816 \right\rbrack$

Subtract the result from Row $$3$$

$\displaystyle \frac{\begin{matrix} \ \ \ \lbrack \begin{matrix} 0 & \ \ \ \ \ \ \ \ \ \ \ 0.001 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 8.5 \\ \end{matrix} \ \ \ \ \ \ \ \ \ \ \ \ \ \ | & 8.501\rbrack \\ - \begin{matrix} \lbrack 0 & \ \ \ \ 0.00099998 \ \ \ \ \ -0.00018182 \ \ \\ \end{matrix}\ \ \ | & 0.00081816\rbrack \\ \end{matrix}}{\ \ \begin{matrix} \ \begin{matrix} 0 &\ \ \ \ \ \ \ \ \ \ \ 0 \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 8.50018182 \\ \end{matrix} & \ \ \ \ \ \ \ \ \ 8.50018184 \end{matrix}}$

Rewriting within $$5$$ significant digits with chopping

$\begin{matrix} \left\lbrack 0 \right.\ & 0 & \left. \ 8.5001 \right\rbrack \\ \end{matrix}\ \ \ \ \ \ \ \ \left\lbrack 8.5001 \right\rbrack$

to get the resulting equations as

$\begin{bmatrix} 20 & 15 & 10 \\ 0 & - 2.75 & 0.5 \\ 0 & 0 & 8.5001 \\ \end{bmatrix}\begin{bmatrix} x_{1} \\ x_{2} \\ x_{3} \\ \end{bmatrix} = \begin{bmatrix} 45 \\ - 2.25 \\ 8.5001 \\ \end{bmatrix}$

Back substitution

$8.5001x_{3} = 8.5001$

$\begin{split} x_{3} &= \frac{8.5001}{8.5001}\\ &= 1 \end{split}$

Substituting the value of $$x_{3}$$ in Row $$2$$

$- 2.75x_{2} + 0.5x_{3} = - 2.25$

$\begin{split} x_{2} &= \frac{- 2.25 - 0.5x_{2}}{- 2.75}\\ &= \frac{- 2.25 - 0.5 \times 1}{- 2.75}\\ &= \frac{- 2.25 - 0.5}{- 2.75}\\ &= \frac{- 2.75}{- 2.75}\\ &= 1\end{split}$

Substituting the value of $$x_{3}$$ and $$x_{2}$$ in Row 1

$20x_{1} + 15x_{2} + 10x_{3} = 45$

$\begin{split} x_{1} &= \frac{45 - 15x_{2} - 10x_{3}}{20}\\ &= \frac{45 - 15 \times 1 - 10 \times 1}{20}\\ &= \frac{45 - 15 - 10}{20}\\ &= \frac{30 - 10}{20}\\ &= \frac{20}{20}\\ &= 1 \end{split}$

## 6.12 Gaussian Elimination Method for Solving Simultaneous Linear Equations Quiz

(1). The goal of forward elimination steps in the Naïve Gauss elimination method is to reduce the coefficient matrix to a (an) _____________ matrix.

(A) diagonal

(B) identity

(C) lower triangular

(D) upper triangular

(2). Division by zero during forward elimination steps in Naïve Gaussian elimination of the set of equations $$\left\lbrack A \right\rbrack\left\lbrack X \right\rbrack = \left\lbrack C \right\rbrack$$ implies the coefficient matrix $$\left\lbrack A \right\rbrack$$

(A) is invertible

(B) is nonsingular

(C) may be singular or nonsingular

(D) is singular

(3). Using a computer with four significant digits with chopping, the Naïve Gauss elimination solution to

$\begin{matrix} 0.0030x_{1} + 55.23x_{2} = 58.12 \\ 6.239x_{1} - 7.123x_{2} = 47.23 \\ \end{matrix}$ is

(A) $$x_{1} = 26.66;\ x_{2} = 1.051$$

(B) $$x_{1} = 8.769;\ x_{2} = 1.051$$

(C) $$x_{1} = 8.800;\ x_{2} = 1.000$$

(D) $$x_{1} = 8.771;\ x_{2} = 1.052$$

(4). Using a computer with four significant digits with chopping, the Gaussian elimination with partial pivoting solution to

$\begin{matrix} 0.0030x_{1} + 55.23x_{2} = 58.12 \\ 6.239x_{1} - 7.123x_{2} = 47.23 \\ \end{matrix}$ is

(A) $$x_{1} = 26.66;\ x_{2} = 1.051$$

(B) $$x_{1} = 8.769;\ x_{2} = 1.051$$

(C) $$x_{1} = 8.800;\ x_{2} = 1.000$$

(D) $$x_{1} = 8.771;\ x_{2} = 1.052$$

(5). At the end of the forward elimination steps of the Naïve Gauss elimination method on the following equations

$\begin{bmatrix} {4.2857 \times 1}{0}^{{7}} & {- 9.2307 \times 1}{0}^{{5}} & {0} & {0} \\ {4.2857 \times 1}{0}^{{7}} & {- 5.4619 \times 1}{0}^{{5}} & {- 4.2857 \times 1}{0}^{{7}} & {5.4619 \times 1}{0}^{{5}} \\ {- 6.5} & {- 0.15384} & {6.5} & {0.15384} \\ {0} & {0} & {4.2857 \times 1}{0}^{{7}} & {- 3.6057 \times 1}{0}^{{5}} \\ \end{bmatrix}{{\ \ }}\begin{bmatrix} {c}_{{1}} \\ {c}_{{2}} \\ {c}_{{3}} \\ {c}_{{4}} \\ \end{bmatrix}{=}\begin{bmatrix} {- 7.887 \times 1}{0}^{{3}} \\ {0} \\ {0.007} \\ {0} \\ \end{bmatrix}$

the resulting equations in matrix form are given by

$\begin{bmatrix} {4.2857 \times 1}{0}^{{7}} & {- 9.2307 \times 1}{0}^{{5}} & {0} & {0} \\ {0} & {3.7688 \times 1}{0}^{{5}} & {- 4.2857 \times 1}{0}^{{7}} & {5.4619 \times 1}{0}^{{5}} \\ {0} & {0} & {- 26.9140} & {0.579684} \\ {0} & {0} & {0} & {5.62500 \times 1}{0}^{{5}} \\ \end{bmatrix}{{\ \ }}\begin{bmatrix} {c}_{{1}} \\ {c}_{{2}} \\ {c}_{{3}} \\ {c}_{{4}} \\ \end{bmatrix}{=}\begin{bmatrix} {- 7.887 \times 1}{0}^{{3}} \\ {7.887 \times 1}{0}^{{3}} \\ {1.19530 \times 1}{0}^{{- 2}} \\ {1.90336 \times 1}{0}^{{4}} \\ \end{bmatrix}$

The determinant of the original coefficient matrix is

(A) $${0.00}$$

(B) $${4.2857 \times 1}{0}^{{7}}$$

(C) $${5.486 \times 1}{0}^{{19}}$$

(D) $${- 2.445 \times 1}{0}^{{20}}$$

(6). The following data is given for the velocity of the rocket as a function of time. To find the velocity at $$t = 21s$$, you are asked to use a quadratic polynomial, $$v(t) = at^{2} + {bt} + c$$ to approximate the velocity profile.

$$t$$ $$(s)$$ 0 14 15 20 30 35
$$v(t)$$ $$(m/s)$$ 0 227.04 362.78 517.35 602.97 901.67

The correct set of equations that will find a, b and c are

(A) $$\begin{bmatrix} {176} & {14} & {1} \\ {225} & {15} & {1} \\ {400} & {20} & {1} \\ \end{bmatrix}\begin{bmatrix} {a} \\ {b} \\ {c} \\ \end{bmatrix}{=}\begin{bmatrix} {227.04} \\ {362.78} \\ {517.35} \\ \end{bmatrix}$$

(B) $$\begin{bmatrix} {225} & {15} & {1} \\ {400} & {20} & {1} \\ {900} & {30} & {1} \\ \end{bmatrix}\begin{bmatrix} {a} \\ {b} \\ {c} \\ \end{bmatrix}{=}\begin{bmatrix} {362.78} \\ {517.35} \\ {602.97} \\ \end{bmatrix}$$

(C) $$\begin{bmatrix} {0} & {0} & {1} \\ {225} & {15} & {1} \\ {400} & {20} & {1} \\ \end{bmatrix}\begin{bmatrix} {a} \\ {b} \\ {c} \\ \end{bmatrix}{=}\begin{bmatrix} {0} \\ {362.78} \\ {517.35} \\ \end{bmatrix}$$

(D) $$\begin{bmatrix} 400 & 20 & 1 \\ 900 & 30 & 1 \\ 1225 & 35 & 1 \\ \end{bmatrix}\begin{bmatrix} a \\ b \\ c \\ \end{bmatrix} = \begin{bmatrix} 517.35 \\ 602.97 \\ 901.67 \\ \end{bmatrix}$$

## 6.13 Gaussian Elimination Method for Solving Simultaneous Linear Equations Exercise

(1). Use Naïve Gauss elimination to solve

${4x_{1} + x_{2} - x_{3} = - 2}$ ${5x_{1} + x_{2} + 2x_{3} = 4}$ ${6x_{1} + x_{2} + x_{3} = 6}$

(2). Assume that you are using a computer with four significant digits with chopping. Use Naïve Gauss elimination method to solve

${4x_{1} + x_{2} - x_{3} = - 2}$ ${5x_{1} + x_{2} + 2x_{3} = 4}$ ${6x_{1} + x_{2} + x_{3} = 6}$

(3). For

$[A]= \begin{bmatrix} 10 & - 7 & 0 \\ - 3 & 2.099 & 6 \\ 5 & - 1 & 5 \\ \end{bmatrix}$

Find the determinant of [A] using forward elimination step of naïve Gauss elimination method.

(4). At the end of forward elimination steps using naïve Gauss elimination method on the coefficient matrix

$[A]= \begin{bmatrix} 25 & c & 1 \\ 64 & a & 1 \\ 144 & b & 1 \\ \end{bmatrix}$

[A] reduces to

$[B]= \begin{bmatrix} 25 & 5 & 1 \\ 0 & - 4.8 & - 1.56 \\ 0 & 0 & 0.7 \\ \end{bmatrix}$

What is the determinant of $$[A]$$?

(5). Using Gaussian elimination with partial pivoting to solve

${4x_{1} + x_{2} - x_{3} = - 2}$ ${5x_{1} + x_{2} + 2x_{3} = 4}$ ${6x_{1} + x_{2} + x_{3} = 6}$

(6). Assume that you are using a computer with four significant digits with chopping, use Gaussian elimination with partial pivoting to solve

${4x_{1} + x_{2} - x_{3} = - 2}$ ${5x_{1} + x_{2} + 2x_{3} = 4}$ ${6x_{1} + x_{2} + x_{3} = 6}$