Dartmouth...Examples of Gaussian Elimination Example 1

advertisement
Examples of Gaussian Elimination
Example 1: Use Gaussian elimination to solve the system of linear equations
x1 + 5x2
−2x1 − 7x2
= 7
= −5.
Solution: We carry out the elimination procedure on both the system of equations and the corresponding
augmented matrix, simultaneously. In general only one set of reductions is necessary, and the latter
(dealing with matrices only) is preferable because of the simplified notation.
x1
−2x1
+ 5x2
− 7x2
= 7
= −5
1
−2
5
−7
7
−5
Add twice Row 1 to Row 2.
x1
+
5x2
3x2
=
=
7
9
1
0
5
3
7
9
5
1
7
3
−8
3
Multiply Row 2 by 1/3.
x1
+
5x2
x2
= 7
= 3
1
0
Add −5 times Row 2 to Row 1.
x1
x2
= −8
= 3
1
0
0
1
Example 2: Use Gaussian elimination to solve the system of linear equations
2x2 + x3
x1 − 2x2 − 3x3
−x1 + x2 + 2x3
= −8
= 0
= 3.
Solution: As before, we carry out reduction on the system of equations and on the augmented matrix
simultaneously, in order to make it clear that row operations on equations correspond exactly to row
operations on matrices.
x1
−x1
2x2
− 2x2
+ x2
+ x3
− 3x3
+ 2x3
= −8
= 0
= 3

0
 1
−1
2
−2
1
1
−3
2

−8
0 
3
−2
2
1
−3
1
2

0
−8 
3
Swap Row 1 and Row 2.
x1
−x1
− 2x2
2x2
+ x2
− 3x3
+ x3
+ 2x3
= 0
= −8
= 3

1
 0
−1
Add Row 1 to Row 3.
x1
− 2x2
2x2
− x2
− 3x3
+ x3
− x3
= 0
= −8
= 3

−2
2
−1
−3
1
−1

0
−8 
3
−2
−1
2
−3
−1
1

0
3 
−8
−2
−1
0
−3
−1
−1

0
3 
−2
−2
−1
0
0
0
−1

6
5 
−2
1
 0
0
Swap Row 2 and Row 3.
x1
− 2x2
− x2
2x2
− 3x3
− x3
+ x3
= 0
= 3
= −8

1
 0
0
Add twice Row 2 to Row 3.
x1
− 2x2
− x2
− 3x3
− x3
− x3
= 0
= 3
= −2

1
 0
0
Add −1 times Row 3 to Row 2.
Add −3 times Row 3 to Row 1.
x1
− 2x2
− x2
− x3
= 6
= 5
= −2

1
 0
0
Add −2 times Row 2 to Row 1.
x1
− x2
− x3

= −4
= 5
= −2
1
 0
0
0
−1
0

−4
5 
−2
0
0
−1
Multiply Rows 2 and 3 by −1.
x1
x2
x3

= −4
= −5
= 2
1
 0
0
0
1
0

−4
−5 
2
0
0
1
1cm
Example 3: Use Gaussian elimination to solve the system of linear equations
x1 − 2x2 − 6x3
2x1 + 4x2 + 12x3
x1 − 4x2 − 12x3
= 12
= −17
= 22.
Solution: In this case, we convert the system to its corresponding augmented matrix, perform the
necessary row operations on the matrix alone, and then convert back to equations at the end to identify
the solution.
x1
2x1
x1
− 2x2
+ 4x2
− 4x2
− 6x3
+ 12x3
− 12x3

= 12
= −17
= 22

1
 0
0
−2
8
−2
1
 2
1
−6
24
−6

12
−41 
10
Add −2 times Row 1 to Row 2.
Add −1 times Row 1 to Row 3.

1
 0
0
−2
−2
8
−6
−6
24

12
10 
−41
Swap Row 2 and Row 3.
−2
4
−4
−6
12
−12

12
−17 
22

1
 0
0
−2
−2
0

12
10 
−1
−6
−6
0
Add 4 times Row 2 to Row 3.

1
 0
0
−2
−2
0
−6
−6
0

12
10 
−1
x1
Since the final equation
0 = −1
cannot be satisfied, this system has no solutions.
− 2x2
− 2x2
− 6x3
− 6x3
0
= 12
= 10
= −1
Download