chap09classlecture

chap09classlecture - Chapter 9 Gauss Elimination Gauss...

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

View Full Document Right Arrow Icon
Chapter 9 Chapter 9 Gauss Elimination Gauss Elimination
Background image of page 1

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

View Full DocumentRight Arrow Icon
Gauss Elimination Gauss Elimination 9.1 Solving small numbers of equations 9.2 Naive Gauss Elimination 9.3 Pivoting 9.4 Tridiagonal Systems MATLAB M-files GaussNaive, GaussPivot, Tridiag
Background image of page 2
Small Matrices Small Matrices For small numbers of equations, can be solved by hand Graphical Cramer ' s rule Elimination = + + + = + + + = + + + n n nn 2 2 n 1 1 n 2 n n 2 2 22 1 21 1 n n 1 2 12 1 11 b x a x a x a b x a x a x a b x a x a x a
Background image of page 3

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

View Full DocumentRight Arrow Icon
Graphical Method Graphical Method - = - = = + = - 1 2 1 2 2 1 2 1 x 3 x 3 x 2 x rearrange 3 x x 3 x x 2 2x 1 – x 2 = 3 x 1 + x 2 = 3 One solution
Background image of page 4
Graphical Method Graphical Method 2x 1 – x 2 = 3 2x 1 – x 2 = – 1 No solution
Background image of page 5

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

View Full DocumentRight Arrow Icon
Graphical Method Graphical Method 6x 1 – 3x 2 = 9 2x 1 – x 2 = 3 Infinite many solution
Background image of page 6
Graphical Method Graphical Method 2x 1 – x 2 = 3 2.1x 1 – x 2 = 3 Ill conditioned
Background image of page 7

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

View Full DocumentRight Arrow Icon
» xx=-10:1:10; yy=-10:1:10; [x,y]=meshgrid(xx,yy); » z1=3*x-2*y+3; z2=-2*x+3*y-2; z3=x+y-5; » surf(x,y,z1); hold on; surf(x,y,z2); surf(x,y,z3); 3 equations
Background image of page 8
Cramer’s Rule Cramer’s Rule Compute the determinant D 2 x 2 matrix 3 x 3 matrix 21 12 22 11 22 21 12 11 a a a a a a a a D - = = 32 31 22 21 13 33 31 23 21 12 33 32 23 22 11 33 32 31 23 22 21 13 12 11 a a a a a a a a a a a a a a a a a a a a a a a a D + - = =
Background image of page 9

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

View Full DocumentRight Arrow Icon
Cramer’s Rule Cramer’s Rule To find x k for the following system Replace k th column of a s with b s (i.e., a ik b i ) n n nn 2 2 n 1 1 n 2 n n 2 2 22 1 21 1 n n 1 2 12 1 11 b x a ... x a x a b x a ... x a x a b x a ... x a x a = + + + = + + + = + + + ) ) ( ij k D(a matrix new D x =
Background image of page 10
Example Example 3 x 3 matrix 33 32 31 23 22 21 13 12 11 a a a a a a a a a D = 3 32 31 2 22 21 1 12 11 3 3 33 3 31 23 2 21 13 1 11 2 2 33 32 3 23 22 2 13 12 1 1 1 b a a b a a b a a D 1 D D x a b a a b a a b a D 1 D D x a a b a a b a a b D 1 D D x = = = = = =
Background image of page 11

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

View Full DocumentRight Arrow Icon
Ill-Conditioned System Ill-Conditioned System What happen if the determinant D is very small or zero? Divided by zero (linearly dependent system) Divided by a small number: Round-off error Loss of significant digits [ ] 0 A det D =
Background image of page 12
Eliminate x 2 Subtract to get = + = + 2 2 22 1 21 1 2 12 1 11 b x a x a b x a x a = + = + 2 12 2 22 12 1 21 12 1 22 2 12 22 1 11 22 b a x a a x a a b a x a a x a a a a a a b a b a x a a a a b a b a x b a b a x a a x a a 21 12 22 11 1 21 2 11 2 21 12 11 22 2 12 1 22 1 2 12 1 22 1 21 12 1 11 22 - - = - - = - = - Elimination Method Elimination Method Not very practical for large number (> 4) of equations
Background image of page 13

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

View Full DocumentRight Arrow Icon
MATLAB’s Methods MATLAB’s Methods Forward slash ( / ) Back-slash ( \ ) Multiplication by the inverse of the quantity under the slash b * A inv x b A x b A x b Ax 1 ) ( \ = = = = -
Background image of page 14
Gauss Elimination Gauss Elimination Manipulate equations to eliminate one of the unknowns Develop algorithm to do this repeatedly The goal is to set up upper triangular matrix Back substitution to find solution (root) = nn n 3 33 n 2 23 22 n 1 13 12 11 a a a a a a a a a a U
Background image of page 15

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

View Full DocumentRight Arrow Icon
Basic Gauss Elimination Basic Gauss Elimination
Background image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/07/2009 for the course CVEN 302 taught by Professor Edge during the Spring '08 term at Texas A&M.

Page1 / 61

chap09classlecture - Chapter 9 Gauss Elimination Gauss...

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

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