GAUSSIAN ELIMINATION OF SOLVING SIMULTANEOUS LINEAR EQUATIONS

AN INTERACTIVE EBOOK

 

On non Internet Explorer browsers, the equations may not show up.

As an alternative or if you prefer,

you can see the pdf version of the ebook instead

 

Title

An interactive e-book for illustrating the Gaussian Elimination with Partial Pivoting

Creator

Autar K Kaw

Subject and Keywords

Gaussian Elimination, Simultaneous Linear Equations, Mathcad, Maple, Mathematica, Matlab, Simulations.

Description

This is an interactive E-book for illustrating Simultaneous Linear Equations.  It includes links to simulations in Mathcad, Maple, Mathematica and Matlab for the algorithm, multiple choice quizzes, problem set, and a PowerPoint presentation.

Publisher

Holistic Numerical Methods Institute,

College of Engineering,

University of South Florida, Tampa, FL 33620-5350.

Contributors

Autar Kaw

Format

Text/HTML

Last Revised

Wednesday, March 12, 2008

Identifier

http://numericalmethods.eng.usf.edu/ebooks/gaussianelimination_04sle_ebook.pdf

Language

English

Rights

http://numericalmethods.eng.usf.edu/rights.htm

 

After reading this eBook,  you should be able to:

 

1.                                                                              Solve a set of simultaneous linear equations using Naïve Gauss Elimination,

  1. Learn the pitfalls of Naïve Gauss Elimination Method,
  2. Understand the effect of round off error on a solving set of linear equation by Naïve Gauss Elimination Method,
  3. Learn how to modify Naïve Gauss Elimination method to Gaussian Elimination with Partial Pivoting Method to avoid pitfalls of the former method,
  4. Find the determinant of a square matrix using Gaussian Elimination,
  5. Understand the relationship between determinant of coefficient matrix and the solution of simultaneous linear equations.

 

Table of Contents

 

How are a set of equations solved numerically?

Forward Elimination of Unknowns:

Back Substitution:

Example 1

Example 2

 

           Simulation (Mathcad Maple Mathematica Matlab)

 

Are there any pitfalls of Naïve Gauss Elimination Method?

Division by zero

Round-off error

Example 3

 

What are the techniques for improving Naïve Gauss Elimination Method?

 

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

Example 4

 

Can we use Naïve Gauss Elimination methods to find the determinant of a square matrix?

Example 5

 

What if I cannot find the determinant of the matrix using Naive Gauss Elimination method?

Example 6

 

Prove det (A) =1/det(inverse of A)

 

            Problem Sets:  Multiple choice question examination

 

How are a set of equations solved numerically?

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

 

     .                 .

     .                 .

     .                 .

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.

 

Forward Elimination of Unknowns: 

 

In the first step of forward elimination, the first unknown, x1 is eliminated from all rows below the first row.  The first equation is selected as the pivot equation to eliminate x1.  So, to eliminate x1 in the second equation, one divides the first equation by a11 (hence called the pivot element) and then multiply it by a21.  That is, same as multiplying the first equation by a21/ a11 to give

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

or

where

This procedure of eliminating , is now repeated for the third equation to the nth equation to reduce the set of equations as

           

           

             .                 .                .          

             .                 .                .          

             .                 .                .          

 

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  as the pivot element.  So, to eliminate x2 in the third equation, one divides the second equation by  (the pivot element) and then multiply it by .  That is, same as multiplying the second equation by  and subtracting from the third equation.  This makes the coefficient of x2 zero in the third equation.  The same procedure is now repeated for the fourth equation till the nth equation to give

                  

                  

                            .               .

                             .               .

                              .               .

                   

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

                                    

.             .

.             .

.             .

  

 

Back Substitution: 

 

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

Then the second last equation, that is the (n-1)th equation, has two unknowns - xn and xn-1, but xn 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

     for i = n – 1, n – 2,…,

and

Back to TOC

 

           Simulation (Mathcad Maple Mathematica Matlab)

 

Example 1

The upward velocity of a rocket is given at three different times in the following table

Time, t

Velocity, v

s

m/s

5