


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



Math 151A Homework #7 – practice homework.
2 x 1 − 3 x 2 + 2x 3 = 5 − 4 x 1 + 2x 2 − 6 x 3 = 14 2 x 1 + 2x 2 + 4x 3 = 8
find the row interchanges required when using:
a. simple pivoting (algorithm 6.1) Answer: The coefficient matrix is
So a 1 , 1 6 = 0 and we do (2E 1 + E 2 ) → (E 2 ) and (E 3 − E 1 ) → (E 3 ) and get
which has a 2 , 2 6 = 0, so no row interchanges are required. b. partial pivoting (algorithm 6.2) Answer: Since | − 4 | > | 2 |, we exchange rows 1 and 2. Then we do ( 12 E 1 + E 2 ) → (E 2 ) and the same for E 3. We then get
We see that | 3 | > | − 2 | and so we exchange rows 3 and 2. Thus, in total, we exchanged rows 1 and 2, and then rows 2 and 3. c. scaled partial pivoting (algorithm 6.3) Answer: The scale factors are defined as si = max 1 ≤j≤n |ai,j |. For this matrix they are s 1 = 3, s 2 = 6 and s 3 = 4. Then the desired pivot element is the first maximum of |a 1 , 1 |/s 1 = 23 , |a 2 , 1 |/s 2 = 23 , and |a 3 , 1 |/s 3 = 12. Since this is the first row, no interchange is need. One step of Gaussian elimination yields
Now we see that | − 4 |/6 is less than | 5 |/4 so we exchange the last two rows. d. complete pivoting
Answer: The largest element in the coefficient matrix is |a 2 , 3 | = 6, so we swap rows 1 and 2 and columns 1 and 3 to get
Elimination yields
We see the largest element of the remaining submatrix is a 3 , 3 so we exchange rows 2 and 3 and columns 2 and 3.
2 x 1 + x 2 + x 3 = b 1 − 2 x 1 − 1 x 2 = b 2 2 x 1 + 3x 2 = b 3
The coefficient matrix for the system does not have an LU factorization. Using an appropriate permutation matrix, factor the resulting matrix (P A = LU ). Use this factorization to solve the system for x when b = (1, 2 , 3)T^.
Answer: The coefficient matrix is
After one elimination step, we get
which requires swapping rows 2 and 3. This means our permutation matrix should be
So now we factor the permuted matrix
b.
c.