Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 9 Linear Systems of Equations: Gauss Elimination.

Slides:



Advertisements
Similar presentations
Chapter 2 Solutions of Systems of Linear Equations / Matrix Inversion
Advertisements

Linear Algebra Applications in Matlab ME 303. Special Characters and Matlab Functions.
Algebraic, transcendental (i.e., involving trigonometric and exponential functions), ordinary differential equations, or partial differential equations...
Scientific Computing Linear Systems – Gaussian Elimination.
Simultaneous Linear Equations
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
CISE301_Topic3KFUPM1 SE301: Numerical Methods Topic 3: Solution of Systems of Linear Equations Lectures 12-17: KFUPM Read Chapter 9 of the textbook.
Lecture 9: Introduction to Matrix Inversion Gaussian Elimination Sections 2.4, 2.5, 2.6 Sections 2.2.3, 2.3.
Part 3 Chapter 9 Gauss Elimination
Chapter 9 Gauss Elimination The Islamic University of Gaza
Major: All Engineering Majors Author(s): Autar Kaw
Ecuaciones Algebraicas lineales. An equation of the form ax+by+c=0 or equivalently ax+by=- c is called a linear equation in x and y variables. ax+by+cz=d.
Linear Algebraic Equations
Part 3 Chapter 10 LU Factorization PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill Companies,
Dr. Jie Zou PHY Chapter 3 Solution of Simultaneous Linear Algebraic Equations: Lecture (II) Note: Besides the main textbook, also see Ref: Applied.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 15 Solution of Systems of Equations.
Algorithm for Gauss elimination 1) first eliminate for each eq. j, j=1 to n-1 for all eq.s k greater than j a) multiply eq. j by a kj /a jj b) subtract.
Mujahed AlDhaifallah (Term 342) Read Chapter 9 of the textbook
Systems of Linear Equations
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Part 31 Chapter.
Linear Simultaneous Equations
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Linear Algebraic Equations ~ Gauss Elimination Chapter.
Major: All Engineering Majors Author(s): Autar Kaw
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Chapter 8 Objectives Understanding matrix notation.
Introduction to MATLAB for Engineers, Third Edition William J. Palm III Chapter 8 Linear Algebraic Equations PowerPoint to accompany Copyright © 2010.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Part 31 Linear.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 11.
MECN 3500 Inter - Bayamon Lecture 7 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
ΑΡΙΘΜΗΤΙΚΕΣ ΜΕΘΟΔΟΙ ΜΟΝΤΕΛΟΠΟΙΗΣΗΣ 4. Αριθμητική Επίλυση Συστημάτων Γραμμικών Εξισώσεων Gaussian elimination Gauss - Jordan 1.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
CMPS 1371 Introduction to Computing for Engineers MATRICES.
Chemical Engineering Majors Author(s): Autar Kaw
Lecture 7 - Systems of Equations CVEN 302 June 17, 2002.
1 Faculty of Applied Engineering and Urban Planning Civil Engineering Department ECGD3110 Numerical Analysis Lecture 11 1 st Semester 2009/2010 UoP Copyrights.
Gaussian Elimination Electrical Engineering Majors Author(s): Autar Kaw Transforming Numerical Methods Education for.
Matrices and Systems of Equations
Chapter 9 Gauss Elimination The Islamic University of Gaza
Introduction to MATLAB 7
Gaussian Elimination Industrial Engineering Majors Author(s): Autar Kaw Transforming Numerical Methods Education for.
Gaussian Elimination Mechanical Engineering Majors Author(s): Autar Kaw Transforming Numerical Methods Education for.
Lecture 6 - Single Variable Problems & Systems of Equations CVEN 302 June 14, 2002.
Part 3 Chapter 9 Gauss Elimination PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill Companies,
Gaussian Elimination Civil Engineering Majors Author(s): Autar Kaw Transforming Numerical Methods Education for STEM.
Unit #1 Linear Systems Fall Dr. Jehad Al Dallal.
Copyright © 2014, The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Linear Algebra Review Tuesday, September 7, 2010.
Autar Kaw Benjamin Rigsby Transforming Numerical Methods Education for STEM Undergraduates.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 8 Linear Algebraic Equations and Matrices.
Numerical Methods. Introduction Prof. S. M. Lutful Kabir, BRAC University2  One of the most popular techniques for solving simultaneous linear equations.
1 Numerical Methods Solution of Systems of Linear Equations.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 9.
Numerical Methods. Prof. S. M. Lutful Kabir, BRAC University2  One of the most popular techniques for solving simultaneous linear equations is the Gaussian.
Pitfalls of Gauss Elimination ● Division by zero (avoid by pivoting) ● Round-off errors – Important with >100 eqns – Substitute answer into original eqn.
Part 3 Chapter 9 Gauss Elimination
Applied Numerical Methods
Simultaneous Linear Equations
Gaussian Elimination.
Naïve Gauss Elimination Pitfalls
Part 3 - Chapter 9.
Engineering Analysis ENG 3420 Fall 2009
Major: All Engineering Majors Author(s): Autar Kaw
Matrix Solutions to Linear Systems
Part 3 Chapter 10 LU Factorization
Lecture 13 Simultaneous Linear Equations – Gaussian Elimination (2) Partial Pivoting Dr .Qi Ying.
Simultaneous Linear Equations Gaussian Elimination with Partial Pivoting
Naïve Gauss Elimination Pitfalls
Presentation transcript:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 9 Linear Systems of Equations: Gauss Elimination

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2 Gauss Elimination Chapter 9 Solving Small Numbers of Equations There are many ways to solve a system of linear equations: –Graphical method –Cramer’s rule –Method of elimination Computer methods are necessary for large numbers of equations For n ≤ 3

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 3 Graphical Method For two equations: Solve both equations for x 2:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 Plot x 2 vs. x 1 on rectilinear paper, the intersection of the lines present the solution. Fig. 9.1

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 5

6 Figure 9.2 No Solutions Infinite Solutions Ill conditioned

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 7 Determinants and Cramer’s Rule Cramer’s rule uses determinants to solve for the vector of unknowns, x.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The technique for calculating a determinant is similar to that for calculating the cross product (chapter 8) 8

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9 Is the same as:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 10 Cramer’s rule expresses the solution of a system of linear equations in terms of ratios of determinants of the array of coefficients of the equations. For example, x 1 would be computed as:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 11

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Solve Example 9.2 using the det function in MATLAB 12

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 13

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 14

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 15 Method of Elimination The basic strategy is to –successively solve one of the equations of the set for one of the unknowns –and to eliminate that variable from the remaining equations by substitution. The elimination of unknowns can be extended to systems with more than two or three equations; however, the method becomes extremely tedious to solve by hand.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. For example… page rd edition 16

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 17 Naive Gauss Elimination Extension of method of elimination to large sets of equations by developing a systematic scheme or algorithm to eliminate unknowns and to back substitute. As in the case of the solution of two equations, the technique for n equations consists of two phases: –Forward elimination of unknowns –Back substitution

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 18

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 19 Pivot row

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 20 Pivot row

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 21 Pivot row

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 22

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 23

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Example 9.3

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 25 % Example 9.3

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 26 Pitfalls of Elimination Methods Division by zero. It is possible that during both elimination and back-substitution phases a division by zero can occur. Round-off errors. Ill-conditioned systems. Systems where small changes in coefficients result in large changes in the solution.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 27 Singular systems. When two equations are identical, we would loose one degree of freedom. Use the fact that the determinant of a singular system is zero to test for singular systems.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 28 Techniques for Improving Solutions Use of more significant figures. Pivoting. If a pivot element is zero, normalization step leads to division by zero. The same problem may arise, when the pivot element is close to zero. Problem can be avoided: –Partial pivoting. Switching the rows so that the largest element is the pivot element. –Complete pivoting. Searching for the largest element in all rows and columns then switching.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 29

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 30 Example 9.4 Partial Pivoting Use Gauss elimination with and without partial pivoting to solve:

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Multiply the first equation by 1/

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Subtract 32

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Back Substitute 33

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The answer is highly dependent on the number of significant figures you carry 34 Significant Figures X2X2 X1X1 Absolute Value of Percent Relative Error

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Implement Pivoting 35 Make the equation with the largest value of a I,1 the pivot row

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Multiply the first equation by.0003/1 36

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Subtract 37

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Back Substitute 38

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The answer is much less dependent on the number of significant figures you carry 39 Significant Figures X2X2 X1X1 Absolute Value of Percent Relative Error

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Tridiagonal Systems A tridiagonal system is a banded system with a bandwidth of 3: Tridiagonal systems can be solved using the same method as Gauss elimination, but with much less effort because most of the matrix elements are already 0.

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Tridiagonal System Solver

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Summary For small systems of linear equations we can use –Graphical techniques –Cramer’s rule –Method of elimination For large systems of linear equations we need a computer technique such as gaussian elimination 42

Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Gaussian Elimination Naïve Gaussian elimination Pivoting –Partial Pivoting –Complete Pivoting Left Division implements Gaussian elimination 43