Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHAPTER 9: GAUSSIAN ELIMINATION.

Similar presentations


Presentation on theme: "CHAPTER 9: GAUSSIAN ELIMINATION."— Presentation transcript:

1 CHAPTER 9: GAUSSIAN ELIMINATION.
Essential Mathematics for Economics and Business, 4th Edition CHAPTER 9: GAUSSIAN ELIMINATION. © John Wiley and Sons 2013 © John Wiley and Sons 2013

2 Procedure: Gaussian elimination is a method for systematically solving a system of linear equations by… …progressively working through the equations using elementary row operations …to eliminate variables from equations, one at a time …eventually ending up with one equation in one unknown, two equations in two unknowns etc. …then solve for all the unknowns by back substitution Terminology in bold type explained in following examples 

3 Example showing the effect of elimination
Before elimination: 3 equations in 3 unknowns, x, y, z After elimination: Each equation contains one varible less than the previous..

4 To solve by back substitution…
Solve the last equation first, then work backwards, to solve the previous equation… ..finally solving equation (1) …from equation (3) z = 4/2 = 2 -y + (2) = -2 -y = -2 – (2) = -4 …substitute z = 2 into eq. (2) y = 4 x + (4) – (2) = 3 x = 1 …substitute z = 2, y = 4 into eq. (1)

5 Writing a system of equations in matrix form..
Columns contain the Coefficents of x, y, z and RHS This is called the Augmented matrix

6 Elementary row operations
..means adding multiples on one equation (row) to another (row) In Gaussian elimination, elementary row operations are used …to eliminate variables from equations, one at a time in order to reduce the system of equations …to upper triangular form so that they may be solved by back substitution

7 Worked example 9.7 Solve by Gaussian elimination

8 Write the equations in matrix form…
Worked Example 9.7 Write the equations in matrix form… Start with column 1. …use elementary row operations to generate 0’s beneath the first element: a 1,1

9 To get the required 0’s in column 1, add… {-2  row (1)} to row (2)
Worked Example 9.7 To get the required 0’s in column 1, add… {-2  row (1)} to row (2) {-2  row (1)} to row (3) Each of these elementary row operations will give –2 + 2 = 0 in column 1, as required…

10 Worked example 9.7: Add {-2  row (1)} to row (2)
…(1)  -2 …(2) adding Update row 2

11 Worked example 9.7: Add {-2  row (1)} to row (3)
…(1)  -2 …(3) adding Update row 3

12 Worked example 9.7 ….continued
In this particular example, there is already a ‘0’ beneath a 2,2 in column 2 The augmented matrix is in upper triangular form So proceed to solve by back substitution…

13 Worked example 9.7: Solve by back substitution
Solve the last equation first, then work backwards, to solve the previous equation… ..finally solving equation (1) …from equation (3) z = 6/3 = 2 -y + (2) = -2 -y = -2 – (2) = -4 …substitute z = 2 into eq. (2) y = 4 x + (4) – (2) = 3 x = 1 …substitute z = 2, y = 4 into eq. (1)

14 Worked example 9.8 Solve by Gaussian elimination

15 Write the equations in matrix form…
Worked Example 9.8 Write the equations in matrix form… Start with column 1. …use elementary row operations to generate ‘0’s beneath the first element: a 1,1

16 Worked example 9.8: Generate 0’s in column 1 beneath a1,1
..to convert this element to a ‘1’ divide row 1 by 2 ..the elimination of elements in column 1 will be easier if the element in position a1,1 is 1 Then add multiples of row(1) to row(2) and to ròw (3) to get the required zeros

17 Worked example 9.8: row(1) divided by 2
Update row(1)

18 To get the required 0’s in column 1, add… {-6  row (1)1} to row (2)
Worked Example 9.8 To get the required 0’s in column 1, add… {-6  row (1)1} to row (2) {-4  row (1)1} to row (3)

19 Worked example 9.8: Add {-6  row (1)} to row (2)
…(1)1 -6 …(2) adding Update row 2

20 Worked example 9.8: Add {-4  row (1)} to row (3)
…(1)1 -4 …(3) adding Update row 3

21 Worked example 9.8: Generate 0’s in column 2 beneath a 2,2
..to convert this element to ‘1’ divide row(2)1 by 2 ..so we need to add +3 to -3 in row (3)1 to get the required ‘0’ ..This elimination will be easier if the element in position a2,2 is 1 Then add 3  row(2)1 /2 to row (3) to get the required ‘0’. See next slide

22 Worked example 9.8: row(2) divided by 2
Update row 2 again

23 Worked example 9.8: Add {3  row (2)2} to row (3)
…(2)2  3 …(3)1 adding Update row (3)1

24 Worked example 9.8 ….continued
The augmented matrix is in upper triangular form So proceed to solve by back substitution

25 Worked example 9.8: Solve by back substitution
..from equation (3)2 z = -64/(-8) = 8 y - 3(8) = -15 ..substitute z = 8 into eq. (2)2 y = (8) = 9 x + 0.5(9) + 0.5(8) = 6 ..substitute z = 8, y = 9 into eq.(1)1 x = -2.5 Solution: x = -2.5, y = 9, z = 8

26 Note: How to use a single row operation to generate the required 0 in column 2
We used 2 seperate row operations First: divided row(2)1 by 2… to rearrange a2,2 = 1 Second: multiplied row(2)2 by 3… ..then added to row(3)1 to obtain the required 0 in row 3 Instead multiply row(2)1 by 3/2 and add to row(3)

27 Worked example 9.8: Add {3/2  row (2)} to row (3)
…(2)1  3/2 …(3)1 adding Update row (3)1

28 Gaussian elimination: a systematic method
Write the system of equations in matrix form Use elementary row operations {a single row operation to generate each zero} ..to generate zero’s beneath a1,1 in column 1 ..to generate zero’s beneath a2,2 in column 2 ..etc. ..until the augmented matrix is reduced to upper triangular from ..finally solve by back substitution

29 Worked Example 9.8 (again!)
To get the required 0’s in column 1, add… {-6/2  row (1)} to row (2) {-4/2  row (1)} to row (3)

30 Worked example 9.8 Add {-6/2  row (1)} to row (2)
…(1)  -6/2 …(2) adding Update row (2)

31 Worked example 9.8: Add {-4/2  row (1)} to row (3)
…(1)  -4/2 …(3) adding Update row 3

32 Worked example 9.8: Add {3/2  row (2)} to row (3)
…(2)1  3/2 …(3)1 adding Update row (3)1

33 Worked example 9.8: Solve by back substitution
..from equation (3)2 z = -64/(-8) = 8 y - 3(8) = -15 ..substitute z = 8 into eq. (2)2 y = (8) = 9 ..substitute z = 8, y = 9 into eq.(1) 2 x + (9) + (8) = 12 x = -2.5 Solution: x = -2.5, y = 9, z = 8


Download ppt "CHAPTER 9: GAUSSIAN ELIMINATION."

Similar presentations


Ads by Google