Professional Documents
Culture Documents
Statistics
Lecture 1:
Gaussian Elimination
Objectives
Introduction
Gaussian Elimination
Pitfalls in Gauss Elimination Method
Pivoting
Scaling
or '
a22 x2 a23
'
x3 ... a2' n xn b2'
where the prime indicates the new values for the elements.
Similarly equation (1) can be multiplied by a31/a11 and the result subtracted
from the third equation.
Repeating the procedure for the remaining equations give the following
modified forms:
(5c)
2. Back Substitution
The last unknown xn is now given by:
bn( n 1)
xn ( n 1) (6)
ann
1. Forward elimination
Multiply 1st equation (a) by 0.1/3 and subtract from 2nd equation (b) to eliminate
x1 from the latter equation:
7.00333x2 – 0.293333x3 = -19.5617
Then multiply 1st equation (a) by 0.3/3 and subtract from 3rd equation (c) to
eliminate x1 from the latter equation:
-0.190000x2 + 10.0200x3 = 70.6150
Now let’s eliminate x2 from latest 3rd equation (c’) by multiplying equation (b’)
by -0.190000/7.00333 and subtract the result from equation (c’):
10.0200x3 = 70.0843
The system of equations is now reduced to an upper triangular form:
2. Back Substitution
Solve last equation (c’’) to find x3:
x3 = 70.0843/10.0200 = 7.00003
x1 = 3.00000
1. Division by zero
2. Round-off errors
This may be due to some of the following:
Large number of equations to be solved due to the fact that every
result is dependent on previous results.
Errors in early steps will tend to propagate.
2. Switch the rows so that the largest element is the pivot element.
This is known as partial pivoting.
1. Firstly, let’s solve these equations the same way we did in example 1:
Forward elimination:
− Multiply equation (1) by 1/0.0003 to get
x1 + 10,000x2 = 6667
− Subtract the resulting equation from equation (2) to get
-9999x2 = -6666 x2 = 2/3
Back substitution:
0.0003x1 + 3.0000x2 = 2.0001 x1 = 2.0001 – 3(2/3)
0.0003
Significant
figures x2 x1 εx1(%)
3 0.667 -3.33 1099
4 0.6667 0.0000 100
5 0.66667 0.30000 10
6 0.666667 0.330000 1
7 0.6666667 0.3330000 0.1
Forward elimination:
− Multiply equation (1) by 0.0003 to get
Back substitution:
x1 + x2 = 1 x1 = 1 – (2/3)
1
Significant
figures x2 x1 εx1(%)
3 0.667 0.333 0.1
4 0.6667 0.3333 0.01
5 0.66667 0.33333 0.001
6 0.666667 0.333333 0.0001
7 0.6666667 0.3333333 0.00001
1. Gauss elimination:
− Forward elimination
2 x1 + 100000 x2 = 10000 (1)
- 50000 x2 = -5000 (2)
− Back substitution
x2 = 0.10 and x1 = 0.00
− Pivoting
x1 + x2 = 2 (1)
0.00002 x1 + x2 = 0.1 (2)
− Forward elimination
x1 + x2 = 2
x2 = 0.1
− Back substitution
x1 = 1.90 and x2 = 0.10