21.04.2015 Views

Lesson 16 Linear Systems - Bruce E. Shapiro

Lesson 16 Linear Systems - Bruce E. Shapiro

Lesson 16 Linear Systems - Bruce E. Shapiro

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.

106 LESSON <strong>16</strong>. LINEAR SYSTEMS<br />

⎛<br />

⎝<br />

1 2 3<br />

0 −3 −10<br />

0 4 −1<br />

⎞ ⎛<br />

⎠ ⎝<br />

x<br />

y<br />

z<br />

⎞<br />

⎛<br />

⎠ = ⎝<br />

5<br />

−10<br />

5<br />

Now the first column is all zeroes (except for the first row). The next step is to<br />

subtract a multiple of the second row from the third row to get a zero in the second<br />

entry of the third row. Since the coefficient of y is -3 in the second row and 4 in the<br />

third row, we can add 4/3 times the second row to the third row.<br />

⎛<br />

⎝<br />

1 2 3<br />

0 −3 −10<br />

0 4 + (4/3)(−3) −1 + (4/3)(−10)<br />

⎛<br />

⎝<br />

1 2 3<br />

0 −3 −10<br />

0 0 −43/3<br />

⎞ ⎛<br />

⎠ ⎝<br />

⎞ ⎛<br />

⎠ ⎝<br />

x<br />

y<br />

z<br />

⎞<br />

x<br />

y<br />

z<br />

⎞<br />

⎠ = ⎝<br />

⎛<br />

⎠ = ⎝<br />

⎛<br />

⎞<br />

⎠<br />

5<br />

−10<br />

−25/3<br />

5<br />

−10<br />

5 + (4/3)(−10)<br />

This completes the Gaussian elimination. We can then read off the solution by backsubstitution.<br />

From the third row of the matrix,<br />

From the second row of the matrix,<br />

z = (−25/3)/(−43/3) = 25/43<br />

−3y − 10z = −10<br />

hence<br />

y = − 1 60<br />

(−10 + 10(25/43)) =<br />

3 43<br />

Finally, from the first row, we have<br />

x + 2y + 3z = 5<br />

( ) ( )<br />

60 25<br />

x = 5 − 2 − 3 = 20<br />

43 43 43<br />

We can write a simple recursive algorithm for Gaussian elimination as<br />

Algorithm <strong>Linear</strong>Solve<br />

Input: A, b<br />

If n > 1,<br />

{A ′ , b ′ } = Reduce(A, b)<br />

<strong>Linear</strong>Solve (A ′ , b ′ )<br />

End if<br />

x 1 = (b 1 − a 12 x 2 − a 13 x 3 − · · · − a 1n x n )/a 11<br />

⎞<br />

⎠<br />

⎞<br />

⎠<br />

Math 481A<br />

California State University Northridge<br />

2008, B.E.<strong>Shapiro</strong><br />

Last revised: November <strong>16</strong>, 2011

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

Saved successfully!

Ooh no, something went wrong!