Gaussian Elimination in 2D
Gaussian Elimination in 2D
GAUSSIAN ELIMINATION IN 2D
WQ-2014
Gaussian Elimination is a systematic way to solve systems of linear equations, such as 1x + 2y 3x + 2y or, equivalently, a matrix equations of the form Ax = b, where A = is the called the coecient matrix and the vector b = is called the right-hand side (RHS). Gaussian Elimination: Before: 1x + 2y 3x + 2y = = 1 11 After: 1x + 2y 8y = = 1 8 (5) 1 11 (4) 1 2 3 2 (2) = = 1 11 (1)
(3)
2. Subtract 3 times the rst equation in (1) from the second equation in (1), in order to eliminate the rst term, 3 x, in the second equation: 3x + 2 y = 11 3 8
3 x + 6 y = 0x + 8y =
This produces an equivalent set of equations, in upper triangular form, U x = c, where U is an upper triangular matrix, U = and the new RHS is now c = 1 8 . (8) Fri 17th Jan, 2014 at 12:39 1 2 0 8 , (7) (6)
GAUSSIAN ELIMINATION IN 2D
WQ-2014
1 Note 1: In general, the vector c = [ 1 8 ] on the right-hand side of (6) is not the equal to the vector b = [ 11 ] on the right-hand side of (2).
Here is a question to think about: Under what conditions will the vector c on the right-hand side of (6) always equal the vector b on the right-hand side of (2)? Note 2: Since the second equation in (5) is now 8 y = 8, the line corresponding to this equation is now dierent than the line corresponding to the second equation in (1), as shown on the right in Figure 1. However, the point of intersection (3, 1), which is the solution vector x = [ 3 1 ], remains the same!
Figure 1: Eliminating x from the second equation in (1) makes the second line horizontal: 8y = 8. This yields y = 1.
BACK SUBSTITUTION 1. Solve the last equation in the upper triangular system 8 y = 8 = y = 1 2. Substitute y = 1 into the rst equation leaving x 2 = 1, which implies x = 3. Important Point! The original equations have the same solution x = 3 and y = 1. The step that eliminates x from the second equation is the fundamental operation of this Chapter 2, and is known as an elementary row operation. c Professor E. G. Puckett 2014 Revision 2.00 2 Fri 17th Jan, 2014 at 12:39
GAUSSIAN ELIMINATION IN 2D
WQ-2014
To eliminate x: Subtract a multiple l2,1 of the rst equation in (1) from the second equation in (1). Important! Memorize the list of items [1][6] at the top of page 50, especially items [2] and [3] . Here are items [3], [2],and [4] from that list, in that order. 3. The multiplier is li,j =
def
(9)
Pivots cannot be zero! (A zero in the pivot position can be repaired if there is a nonzero entry below it.) 2. Now subtract li,j times equation j from equation i to make the i, j th entry of the matrix zero. 4. Solve the upper triangular system by back substitution . You will see the multiplier rule if we change the rst equation to 4x 8y = 4. 4x + 8y 3x + 2y = = 4 11 (10)
Now, multiply the rst equation in (10) by l2,1 = 3 and subtract it from the second equation in (10) to 4 obtain, 4x + 8y = 4 (11) 8y = 8 The second equation in (11) is the same straight line as the second equation on the right-hand side in (5), but now the st pivot in (10) is 4. To nd the multiplier li,j divide the coecient to be eliminated, namely 3, by the pivot 4, l2,1 = 3 . 4
Pivot = First nonzero entry in the row that does the elimination. Multiplier li,j = entry to eliminate divided by the pivot. 1. Multiply the rst equation in (10) by the multiplier l2,1 =
3 . 4
2. Subtract this equation from the second equation (10) to obtain the second equation in (11), which can then be solved by back substitution.
-EGP