Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)

Presentation on theme: "Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)"— Presentation transcript:

Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)

In the previous slide Accelerating convergence –linearly convergent –Newton’s method on a root of multiplicity >1 –(exercises) Proceed to systems of equations –linear algebra review –pivoting strategies 2

In this slide Error estimation in system of equations –vector/matrix norms LU decomposition –split a matrix into the product of a lower and a upper triangular matrices –efficient in dealing with a lots of right-hand-side vectors Direct factorization –as an systems of n 2 +n equations –Crout decomposition –Dollittle decomposition 3

3.3 4 Vector and Matrix Norms

Vector and matrix norms Pivoting strategies are designed to reduce the impact roundoff error The size of a vector/matrix is necessary to measure the error 5

Vector norm 6

7 The two most commonly used norms in practice

8

9

Vector norm Equivalent One of the other uses of norms is to establish the convergence Two trivial questions: –converge or diverge in different norms? –converge to different limit values in different norms? The answer to both is no –all vector norms are equivalent 10

11

12 The Euclidean norm and the maximum norm are equivalent

Matrix norms Similarly, there are various matrix norms, here we focus on those norms related to vector norms –natural matrix norms 13

Matrix norms Natural matrix norms 14

15

Natural matrix norms Computing maximum norm 16

17

18

Natural matrix norms Computing Euclidean norm Is, unfortunately, not as straightforward as computing maximum matrix norms Requires knowledge of the eigenvalues of the matrix 19

Eigenvalue review 20 later

21

Eigenvalue review 22

23

24 In action http://thomashawk.com/hello/209/1017/1024/Jackson%20Running.jpg

25

26

Any Questions? 27 3.3 Vector and Matrix Norms

3.4 28 Error Estimates and Condition Number

Error estimation A linear system Ax=b, and x’ is an approximate solution The error, e=x’-x, cannot be directly computed ( x is never known) The residue vector, r=Ax’-b, can be easily computed – r=0  x’=x  e=0 29

Any Questions? 30

Is ||r|| a good estimation of ||e|| ? Construct the relationship between r and e From the definition r=Ax’-b=Ax’-Ax=A(x’-x)=Ae answer 31 hint#1 hint#2 hint#4hint#3

32

33

34

35

Condition number 36

37

Perturbations (skipped) 38......

Any Questions? 39 3.4 Error Estimates and Condition Number

3.5 40 LU Decomposition

LU decomposition Motivation Gaussian elimination solve a linear system, Ax=b, with n unknowns – (2/3)n 3 + (3/2)n 2 – (7/6)n –with back substitution –the minimum number of operations If there are a lots of right-hand-side vectors –how many operations for a new RHS? –with Gaussian elimination, all operations are also carried out on the RHS 41

LU decomposition Given a matrix A, a lower triangular matrix L and an upper triangular matrix U for which LU=A are said to form an LU decomposition of A Here we replace mathematical descriptions with an example to show how use Gaussian elimination to obtain an LU decomposition 42

43

44

45

46

Any Questions? 47

Is there any other LU decompositions in addition to using modified Gaussian elimination? –degree of freedoms (number of unknowns) – A  n 2, LU  n 2 +n Direct factorization (3.6) –as an systems of n 2 +n equations 48 hint answer

Solving a linear system A  LU When a new RHS comes – Ax=b  PAx=Pb  LUx=Pb –with z=Ux, actually to solve Lz=Pb and Ux=z both steps are easy notice that Pb does not require real matrix- vector multiplication 49

50

Solving a linear system In summary Anyway, the two-step algorithm (LU decomposition) is superior to Gaussian elimination with back substitution 51

Any Questions? 52 3.5 LU Decomposition

3.6 Direct Factorization 53

Is there any other LU decompositions in addition to using modified Gaussian elimination? –degree of freedoms (number of unknowns) – A  n 2, LU  n 2 +n Direct factorization (3.6) –as an systems of n 2 +n equations 54 http://www.dianadepasquale.com/ThinkingMonkey.jpg Recall that

Direct factorization Just add more n equations –ex: diagonal must be 1 Crout decomposition – l ii =1 for each i=1, 2, …, n Dollittle decomposition – u ii =1 for each i=1, 2, …, n 55

56

57

58

59

Any Questions? 60 3.6 Direct Factorization