- Solve the following system of equations using Gaussian elimination:
2x + y + 3z = 1
2x + 6y + 8z = 3
6x + 8y + 18z = 5
I think I'll use the first row to clear out the x-terms from the second and third rows:
Technically, I should now divide the first row by 2 to get a leading 1, but that will give me fractions, and I'd like to avoid that for as long as possible. Instead, I'll move on to using the second row to clear out the y-term from the third row:
I can divide the third row by 4:
To be technically correct, I'll now divide the second row by 5 and the first row by 2:
(You might want to check with your instructor regarding how particular he's going to be about proper form. Do you "have" to show all 1's for the leading coefficients, or it is acceptable to avoid fractions).
Back-solving, I get:
y + (0) = 2/5
y = 2/5
x + ( 1/2 )( 2/5 ) + ( 3/2 )(0) = 1/2
x + 1/5 = 1/2
x = 3/10
Then the solution is (x, y, z) = ( 3/10, 2/5, 0).
Warning: While I didn't show my scratch work on this last problem, I did have to do the scratch work. Please use scratch paper and write things out; don't try to do this stuff in your head; there are just way too many opportunities for errors. (Ya wanna know how many mistakes I made while writing this lesson? Don't even get me started).
Gaussian Elimination with Partial Pivoting
- Find the entry in the left column with the largest absolute value. This entry is called the pivot.
- Perform a row interchange, if necessary, so that the pivot is in the first row.
- Divide the first row by the pivot. (This step is unnecessary if the pivot is 1).
- Use elementary row operations to reduce the remaining entries in the first column to zero.