ECIV 301 - PowerPoint PPT Presentation

1 / 98
About This Presentation
Title:

ECIV 301

Description:

ECIV 301 Programming & Graphics Numerical Methods for Engineers REVIEW II Topics Introduction to Matrix Algebra Gauss Elimination LU Decomposition Matrix Inversion ... – PowerPoint PPT presentation

Number of Views:69
Avg rating:3.0/5.0
Slides: 99
Provided by: Dimitri69
Learn more at: http://www.ce.sc.edu
Category:
Tags: eciv | concept | interior

less

Transcript and Presenter's Notes

Title: ECIV 301


1
ECIV 301
  • Programming Graphics
  • Numerical Methods for Engineers
  • REVIEW II

2
Topics
  • Introduction to Matrix Algebra
  • Gauss Elimination
  • LU Decomposition
  • Matrix Inversion
  • Iterative Methods
  • Function Interpolation Approximation
  • Newton Polynomials
  • Lagrange Polynomials

3
Matrix Algebra
Rectangular Array of Elements Represented by a
single symbol A
4
Matrix Algebra
n x m Matrix
5
Matrix Algebra
6
Matrix Algebra
1 Row, m Columns
Row Vector
7
Matrix Algebra
n Rows, 1 Column
Column Vector
8
Matrix Algebra
If n m Square Matrix
e.g. nm5
9
Matrix Algebra
Special Types of Square Matrices
Symmetric aij aji
10
Matrix Algebra
Special Types of Square Matrices
Diagonal aij 0, i?j
11
Matrix Algebra
Special Types of Square Matrices
Identity aii1.0 aij 0, i?j
12
Matrix Algebra
Special Types of Square Matrices
Upper Triangular
13
Matrix Algebra
Special Types of Square Matrices
Lower Triangular
14
Matrix Algebra
Special Types of Square Matrices
Banded
15
Matrix Operating Rules - Equality
AmxnBpxq
np
mq
aijbij
16
Matrix Operating Rules - Addition
Cmxn AmxnBpxq
np
cij aijbij
mq
17
Matrix Operating Rules - Addition
Properties
AB BA
A(BC) (AB)C
18
Multiplication by Scalar
19
Matrix Multiplication
A n x m . B p x q C n x q
20
Matrix Multiplication
21
Matrix Multiplication
22
Matrix Multiplication - Properties
If dimensions suitable
Associative A(BC) (AB)C
Distributive A(BC) ABA C
Attention AB ? BA
23
Operations - Transpose
24
Operations - Inverse
A
A-1
A A-1I
If A-1 does not exist A is singular
25
Operations - Trace
Square Matrix
trA Saii
26
Linear Equations in Matrix Form
27
(No Transcript)
28
Gauss Elimination
Consider
(Eq 1)
2(Eq 1)
(Eq 2)
(Eq 2)
Solution
Solution
!!!!!!
Scaling Does Not Change the Solution
29
Gauss Elimination
Consider
(Eq 1)
(Eq 1)
(Eq 2)-(Eq 1)
(Eq 2)
Solution
Solution
!!!!!!
Operations Do Not Change the Solution
30
Gauss Elimination
Example
Forward Elimination
31
Gauss Elimination
-
32
Gauss Elimination
Substitute 2nd eq with new
33
Gauss Elimination
-
34
Gauss Elimination
Substitute 3rd eq with new
35
Gauss Elimination
-
36
Gauss Elimination
Substitute 3rd eq with new
37
Gauss Elimination
Forward Elimination
38
Gauss Elimination
Back Substitution
39
Gauss Elimination Potential Problem
Pivoting
40
Partial Pivoting
NO
YES
41
Partial Pivoting
42
Full Pivoting
  • In addition to row swaping
  • Search columns for max elements
  • Swap Columns
  • Change the order of xi
  • Most cases not necessary

43
LU Decomposition
44
LU Decomposition
PIVOTS Column 1
PIVOTS Column 2
45
LU Decomposition
Upper Triangular Matrix
U
As many as, and in the location of, zeros
46
LU Decomposition
PIVOTS Column 2
PIVOTS Column 1
Lower Triangular Matrix
L
47
LU Decomposition

This is the original matrix!!!!!!!!!!
48
LU Decomposition
L
y
b
49
LU Decomposition
L
y
b
50
LU Decomposition
51
LU Decomposition
  • Axb
  • ALU - LU Decomposition
  • Lyb - Solve for y
  • Uxy - Solve for x

52
Matrix Inversion
53
Matrix Inversion
A
A-1
A A-1I
If A-1 does not exist A is singular
54
Matrix Inversion
55
Matrix Inversion
Solution
56
Matrix Inversion
  • To calculate the invert of a nxn matrix solve n
    times

57
Iterative Methods
Recall Techniques for Root finding of Single
Equations
Initial Guess New Estimate Error
Calculation Repeat until Convergence
58
Gauss Seidel
59
Gauss Seidel
First Iteration
60
Gauss Seidel
Second Iteration
61
Gauss Seidel
Iteration Error
Convergence Criterion
62
Jacobi Iteration
63
Jacobi Iteration
First Iteration
64
Jacobi Iteration
Second Iteration
65
Jacobi Iteration
Iteration Error
66
Determinants
Are composed of same elements
Completely Different Mathematical Concept
67
Determinants
Defined in a recursive form
2x2 matrix
68
Determinants
Defined in a recursive form
3x3 matrix
69
Determinants
Minor a11
70
Determinants
Minor a12
71
Determinants
Minor a13
72
Singular Matrices
If detA0 solution does NOT exist
73
Determinants and LU Decomposition
74
Curve Fitting
Often we are faced with the problem
75
Curve Fitting
Question 1 Is it possible to find a simple and
convenient formula that reproduces the points
exactly?
Interpolation
76
Curve Fitting
Question 2 Is it possible to find a simple and
convenient formula that represents data
approximately ?
Approximation
77
Linear Interpolation
First order interpolating polynomial
Slope of Line
1st DIVIDED DIFFERENCE f xi1,xi
78
Function Interpolation
  • Quadratic Interpolation
  • Better Accuracy if
  • 2nd Order Polynomial

79
General Form of Newtons Interpolating Polynomials
80
Lagrange Interpolating Polynomials
  • Reformulation of Newtons Polynomials
  • Avoid Calculation of Divided Differences

x f(x)
xo f(xo )
x1 f(x1 )
x2 f(x2 )

xn f(xn)
81
Lagrange Interpolating Polynomial
Cardinal Functions Product of n-1 linear factors
Property
82
Errors in Polynomial Interpolation
f(x)
It is expected that as number of nodes increases,
error decreases, HOWEVER.
83
Errors in Polynomial Interpolation
Beware of Oscillations.
For Example Consider f(x)(1x2)-1 evaluated at
9 points in -5,5 And corresponding p8(x)
Lagrange Interpolating Polynomial
84
Other Methods
Direct Evaluation
n1 coefficients
n1 Data Points
Interpolating Polynomial should represent them
exactly
85
Other Methods
Direct Evaluation
86
Other Methods
Solve Using any of the methods we have learned
87
Other Methods
  • Not the most efficient method
  • Ill-conditioned matrix (nearly singular)
  • If n is large highly inaccurate coefficients
  • Limit to lower order polynomials

88
Inverse Interpolation
X?
89
Inverse Interpolation
Switch x and y and then interpolate?
X?
Not a Good Idea!
90
Splines
91
Splines
Piecewise smooth polynomials
92
(No Transcript)
93
E.G Quadratic Splines
  • Function Values at adjacent polynomials are equal
    at interior nodes

94
E.G Quadratic Splines
  • First and Last Functions pass through end points

95
E.G Quadratic Splines
  • First Derivatives at Interior nodes are equal

96
E.G Quadratic Splines
  • Assume Second Derivative _at_ First Point0

97
E.G Quadratic Splines
  • Assume Second Derivative _at_ First Point0

Solve 3nx3n system of Equations
98
Spline Interpolation
Write a Comment
User Comments (0)
About PowerShow.com