24.03.2013 Views

Chapter 3 Solution of Linear Systems - Math/CS

Chapter 3 Solution of Linear Systems - Math/CS

Chapter 3 Solution of Linear Systems - Math/CS

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

66 CHAPTER 3. SOLUTION OF LINEAR SYSTEMS<br />

If we can compute the factorization P A = LU, then<br />

Ax = b ⇒ P A = P b ⇒ LUx = P b ⇒ Ly = P b, where Ux = y.<br />

Therefore, the following steps can be used to solve Ax = b:<br />

• Compute the factorization P A = LU.<br />

• Permute entries <strong>of</strong> b to obtain d = P b.<br />

• Solve Ly = d using forward substitution.<br />

• Solve Ux = y using backward substitution.<br />

Example 3.3.5. Use the P A = LU factorization <strong>of</strong> the previous example to solve Ax = b, where<br />

⎡ ⎤<br />

1<br />

b = ⎣ 2 ⎦<br />

3<br />

Since the P A = LU factorization is given, we need only:<br />

⎡<br />

• Obtain d = P b = ⎣ 3<br />

⎤<br />

1 ⎦<br />

2<br />

• Solve Ly = d, or ⎡<br />

1 0<br />

⎤ ⎡<br />

0<br />

⎣ 1<br />

7 1 0 ⎦ ⎣<br />

1<br />

Using forward substitution, we obtain<br />

y1 = 3<br />

1<br />

7y1 + y2 = 1 ⇒ y2 = 1 − 1 4<br />

7 (3) = 7<br />

4<br />

7y1 + 1<br />

2y2 + y3 = 2 ⇒ y3 = 2 − 4 1<br />

7 (3) − 2<br />

• Solve Ux = y, or ⎡<br />

7 8 9<br />

⎣ 0<br />

0<br />

6<br />

7<br />

0<br />

19<br />

7<br />

− 1<br />

2<br />

Using backard substitution, we obtain<br />

− 1<br />

2 x3 = 0 ⇒ x3 = 0.<br />

6<br />

7x2 + 19<br />

7 x3 = 4<br />

7 ⇒ x2 = 7<br />

6<br />

( 4<br />

7<br />

4<br />

7<br />

7x1 + 8x2 + 9x3 = 3 ⇒ x1 = 1<br />

7<br />

1<br />

2<br />

y1<br />

y2<br />

y3<br />

⎤<br />

4 ( 7 ) = 0<br />

⎤ ⎡<br />

⎦<br />

19 2<br />

− 7 (0)) = 3 .<br />

(3 − 8( 2<br />

3<br />

Therefore, the solution <strong>of</strong> Ax = b is given by<br />

⎡<br />

x = ⎣<br />

⎣ x1<br />

x2<br />

x3<br />

⎡<br />

⎦ = ⎣<br />

⎤<br />

⎡<br />

⎦ = ⎣<br />

3<br />

1<br />

2<br />

) − 9(0)) = − 1<br />

3 .<br />

Problem 3.3.5. Use Gaussian elimination with partial pivoting to find the P A = LU factorization<br />

<strong>of</strong> the following matrices:<br />

− 1<br />

3<br />

2<br />

3<br />

0<br />

⎤<br />

⎦ .<br />

3<br />

4<br />

7<br />

0<br />

⎤<br />

⎦<br />

⎤<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!