# gauss - 6x + 7y + 8z = 16 4x + 2y + 4z = 16 S=[7, 8, 4]...

This preview shows pages 1–12. Sign up to view the full content.

Week 9 - Gaussian elimination - Scaled partial pivoting

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Naive Gaussian Elimination Part 1: Eliminate all the lower coefficients in each column by subtracting a multiple of the diagonal element in the matrix.
Naive Gaussian Elimination [ ] 2 3 4 4 3 4 6 6 1 [ ] 2 3 4 0 -3 -4 6 6 1 [ ] 2 3 4 0 -3 -4 0 -3 -11 [ ] 2 3 4 0 -3 -4 0 0 -7 Done! -4 -6 -8 -6 -9 -12 0 3 4

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Naive Gaussian Elimination Part 2: Backwards substitute to get an answer.
Naive Gaussian Elimination Solve: x + y + z = 3 2x + 3y + z = 5 -x - 2y +3z = 4 [ ] 1 1 1 3 2 3 1 5 -1 -2 3 4 [ ] 1 1 1 3 0 1 -1 -1 0 0 3 6 z=2 , y=1, x=0

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Scaled Partial Pivoting Part 1: Use a special form of Gaussian elimination to get zeros below the diagonal Part 2: Back substitute like always
Scaled Partial Pivoting First, store the largest coefficient on each row in an array “S” 2x + 3y + 7z = 16 6x + 7y + 8z = 16 4x + 2y + 4z = 16 S=[7, 8, 4]

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Scaled Partial Pivoting Second, find the relatively largest coefficient of each row that isn't done 2x + 3y + 7z = 16

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 6x + 7y + 8z = 16 4x + 2y + 4z = 16 S=[7, 8, 4] Max: [2/7, 6/8, 4/4] Scaled Partial Pivoting Third, swap the row found in step 2 with the row equal to the current column number and record the swap 2x + 3y + 7z = 16 6x + 7y + 8z = 16 4x + 2y + 4z = 16 4x + 2y + 4z = 16 6x + 7y + 8z = 16 2x + 3y + 7z = 16 L=[1, 2, 3] L=[3, 2, 1] Scaled Partial Pivoting Third, record the swap found in step 2 by keeping track of an “L” array 4x + 2y + 4z = 16 L=[1, 2, 3] 6x + 7y + 8z = 16 2x + 3y + 7z = 16 to L=[3, 2, 1] Scaled Partial Pivoting Fourth, do Gaussian elimination 2x + 3y + 7z = 16 6x + 7y + 8z = 16 4x + 2y + 4z = 16 2 3 7 16 6 7 8 16 4 2 4 16 [ ] [ ] 2 3 7 16 0 4 2 -8 4 2 4 16 [ ] 0 2 5 8 0 4 2 -8 4 2 4 16 Scaled Partial Pivoting Go back to step 2 until done! [ ] [ ] 0 0 4 12 0 4 2 -8 4 2 4 16 0 2 5 8 0 4 2 -8 4 2 4 16 S=[7, 8, 4] Max: [2/7, 4/8] L=[3, 2, 1]...
View Full Document

## This note was uploaded on 10/21/2011 for the course CSCI 2031 taught by Professor Meyer during the Spring '08 term at Minnesota.

### Page1 / 12

gauss - 6x + 7y + 8z = 16 4x + 2y + 4z = 16 S=[7, 8, 4]...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online