EE103 Section 4

EE103 Section 4 - SECTION 4: INTRODUCTION TO BASIC...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
SECTION 4: INTRODUCTION TO BASIC NUMERICAL LINEAR ALGEBRA IN R N ................. 46 BASIC LINEAR ALGEBRA FACTS ............................................................................................................. 47 Linear Independence ........................................................................................................................... 50 Rank of a Matrix .................................................................................................................................. 56 The Matrix Inverse .............................................................................................................................. 57 Gauss Elimination (Change of Basis, and Matrix Inverse): .............................................................. 59 INCOMPLETE GAUSS ELIMINATION AND LU FACTORIZATION: ............................................................ 66 Permutation Matrices: ......................................................................................................................... 67 Row Interchanges: ............................................................................................................................... 71 The Doolittle Method for Computing an LU Factorization: .............................................................. 77 Recursive LU Factorization: ........................................................................................................................... 79 POSITIVE DEFINITE MATRICES: ............................................................................................................. 86 Examples of the Occurrence of Positive Definite Matrices: .............................................................. 87 The General Linear Least Squares (LLS) Problem ...................................................................................... 88 Choleski Factorization: ....................................................................................................................... 89 SAMPLE MATLAB CODES: ....................................................................................................................... 95 EE103piv.m : One Gauss-Jordan Pivot Operation ............................................................................. 95 E103CGE.m : Complete Gauss Elimination ....................................................................................... 96 EE103LU.m : LU Factorization .......................................................................................................... 97 FORW.m : Forward Substitution ........................................................................................................ 97 BACK.m : Backward Substitution ....................................................................................................... 98 EE103PD: Symmetric Positive Definite Factorization ...................................................................... 98 FLOATING POINT OPERATIONS (FLOPS): ................................................................................................ 99 Examples of Flops: .............................................................................................................................. 99 Flops Comparisons ............................................................................................................................ 102
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
EE103 Lecture Notes, Winter 2009, Prof S. Jacobsen Section 4 46 SECTION 4: INTRODUCTION TO BASIC NUMERICAL LINEAR ALGEBRA IN R n Section 4 culminates with two factorization methods for solving various types of systems of linear equations. The first of these methods is LU factorization, and the second is Choleski factorization. LU factorization is important for solving large systems of linear equations, especially those for which there are many “right-hand-side” vectors. That is ,1 , , i Ax b i k == " where k is quite large. For instance, such problems arise in large linear programming applications. Choleski factorization is important for a special class of A matrices, called “positive definite” matrices. We begin by laying the linear algebraic foundation for these methods. Recall an earlier example: 12 2 (1 10 ) 2 10 kk xx + = ++ = + The exact answer is * (1,1) ' x = . However, the vector (0,2)' x = results in residuals of 0 and 10 k for the first and second equations, respectively. Therefore, if one didn't know the exact solution it might appear that the vector x is not a bad solution for the system of equations. However, as we've already seen, the relative error is * * || 1.0 x = , a percentage error of 100%. Example: Consider the system of equations .0003 1.566 1.569 .3454 2.436 1.018 + = −= The exact solution of this system of equations is * (10,1) ' x = . However, let's use (,) ( 1 0 , 4 ) n β = arithmetic to solve this system by Gauss elimination. That is we "pivot" on 11 .0003 a = . Upon doing so, in (10,4) arithmetic, the new 22 a coefficient is
Background image of page 2
EE103 Lecture Notes, Winter 2009, Prof S. Jacobsen Section 4 47 22 1804 a =− and the new coefficient on the right hand side of the second equation becomes 2 1805 b . Of course, this implies that 2 1.001 x = and therefore 1 (1.569 1.566 1.001) /.0003 3.333 x = Hence, we have that (3.333,1.001)' x = . However, the relative error is enormous; in fact, the percentage error for 1 x is 66.67%. Exercise: Interchange the two rows and pivot as we did above, in (10,4) arithmetic, and show that you arrive at the exact solution (10,1). Therefore, a mere interchange of rows leads to a far superior answer. In fact, look above at the expression for 1 x and it becomes clear that the relatively small error in the value of 2 x (1.001 instead of 1.000) is being greatly inflated because of the division by the number .0003.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/30/2009 for the course EE 103 taught by Professor Vandenberghe,lieven during the Winter '08 term at UCLA.

Page1 / 60

EE103 Section 4 - SECTION 4: INTRODUCTION TO BASIC...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online