chap09classlecture - Chapter 9 Gauss Elimination Gauss...

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

Chapter 9 Chapter 9 Gauss Elimination Gauss Elimination
Image of page 1

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

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
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
Image of page 3

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

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
Image of page 4
Graphical Method Graphical Method 2x 1 – x 2 = 3 2x 1 – x 2 = – 1 No solution
Image of page 5

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

Graphical Method Graphical Method 6x 1 – 3x 2 = 9 2x 1 – x 2 = 3 Infinite many solution
Image of page 6
Graphical Method Graphical Method 2x 1 – x 2 = 3 2.1x 1 – x 2 = 3 Ill conditioned
Image of page 7

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

» 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
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 + - = =
Image of page 9

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

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 =
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 = = = = = =
Image of page 11

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

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 =
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
Image of page 13

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

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 ) ( \ = = = = -
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
Image of page 15

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

Basic Gauss Elimination Basic Gauss Elimination
Image of page 16
Image of page 17
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '08
  • EDGE

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern