Docsity

Linear Algebra Homework: Pivoting Strategies and LU Factorization, Assignments of Mathematics

Toggle sidebar
bg1
Math 151A Homework #7 – practice homework.
1. Pivoting strategies (Section 6.2, problems 1c,2c,3c,4c)
Given the linear system
2x1−3x2+ 2x3= 5
−4x1+ 2x2−6x3= 14
2x1+ 2x2+ 4x3= 8
find the row interchanges required when using:
a. simple pivoting (algorithm 6.1)
Answer:
The coefficient matrix is
2−3 2
−4 2 −6
224
So a1,16= 0 and we do (2E1+E2)→(E2) and (E3−E1)→(E3) and get
2−3 2
0−4−2
0 5 2
which has a2,26= 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 ( 1
2E1+E2)→(E2) and the
same for E3. We then get
−4 2 −6
0−2−1
031
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= max1≤j≤n|ai,j|. For this matrix they are s1= 3,
s2= 6 and s3= 4. Then the desired pivot element is the first maximum of |a1,1|/s1=2
3,
|a2,1|/s2=2
3, and |a3,1|/s3=1
2. Since this is the first row, no interchange is need. One
step of Gaussian elimination yields
2−3 2
0−4−2
0 5 2
Now we see that | − 4|/6 is less than |5|/4 so we exchange the last two rows.
d. complete pivoting
pf3
pf4

Partial preview of the text

Download Linear Algebra Homework: Pivoting Strategies and LU Factorization and more Assignments Mathematics in PDF only on Docsity!

Math 151A Homework #7 – practice homework.

  1. Pivoting strategies (Section 6.2, problems 1c,2c,3c,4c) Given the linear system

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.

  1. LU factorization Consider the linear system

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

P A =

b.

c.