03.03.2014 Views

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3.3. LU FACTORIZATION 33<br />

We pivot on the third row, with a multiplier of −1. Thus we get<br />

⎛<br />

⎞<br />

2 1 1 3 7<br />

⎜ 0 2 −2 1 −3<br />

⎟<br />

⎝ 0 0 3 7 13 ⎠<br />

0 0 0 12 18<br />

We have multiplied by M 3 :<br />

We are now solving<br />

M 3 =<br />

⎡<br />

⎢<br />

⎣<br />

1 0 0 0<br />

0 1 0 0<br />

0 0 1 0<br />

0 0 1 1<br />

⎤<br />

⎥<br />

⎦<br />

M 3 M 2 M 1 Ax = M 3 M 2 M 1 b.<br />

But we have an upper triangular form, that is, if we let<br />

⎡<br />

⎤<br />

2 1 1 3<br />

U = ⎢ 0 2 −2 1<br />

⎥<br />

⎣ 0 0 3 7 ⎦<br />

0 0 0 12<br />

Then we have<br />

M 3 M 2 M 1 A = U,<br />

A = (M 3 M 2 M 1 ) −1 U,<br />

A = M 1 −1 M 2 −1 M 3 −1 U,<br />

A = LU.<br />

We are hoping that L is indeed lower triangular, and has ones on the diagonal. It turns out that<br />

the inverse of each M i matrix has a nice form (See Exercise (3.6)). We write them here:<br />

⎡<br />

⎤ ⎡<br />

⎤ ⎡<br />

⎤<br />

1 0 0 0 1 0 0 0 1 0 0 0<br />

L = ⎢ 2 1 0 0<br />

⎥ ⎢ 0 1 0 0<br />

⎥ ⎢ 0 1 0 0<br />

⎥<br />

⎣ 3 0 1 0 ⎦ ⎣ 0 1 1 0 ⎦ ⎣ 0 0 1 0 ⎦<br />

1 0 0 1 0 −1 0 1 0 0 −1 1<br />

=<br />

⎡<br />

⎢<br />

⎣<br />

1 0 0 0<br />

2 1 0 0<br />

3 1 1 0<br />

1 −1 −1 1<br />

⎤<br />

⎥<br />

⎦<br />

This is really crazy: the matrix L looks to be composed of ones on the diagonal and multipliers<br />

under the diagonal.<br />

Now we check to see if we made any mistakes:<br />

LU =<br />

=<br />

⎡<br />

⎢<br />

⎣<br />

⎡<br />

⎢<br />

⎣<br />

1 0 0 0<br />

2 1 0 0<br />

3 1 1 0<br />

1 −1 −1 1<br />

2 1 1 3<br />

4 4 0 7<br />

6 5 4 17<br />

2 −1 0 7<br />

⎤ ⎡<br />

⎥ ⎢<br />

⎦ ⎣<br />

⎤<br />

⎥<br />

⎦ = A.<br />

2 1 1 3<br />

0 2 −2 1<br />

0 0 3 7<br />

0 0 0 12<br />

⎤<br />

⎥<br />

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

Saved successfully!

Ooh no, something went wrong!