Chapter 9: Gaussian Elimination

Similar documents
Numerical Analysis Fall. Gauss Elimination

Gauss Elimination. Hsiao-Lung Chan Dept Electrical Engineering Chang Gung University, Taiwan

Chapter 8 Gauss Elimination. Gab-Byung Chae

MAC1105-College Algebra. Chapter 5-Systems of Equations & Matrices

Linear System of Equations

Matrix notation. A nm : n m : size of the matrix. m : no of columns, n: no of rows. Row matrix n=1 [b 1, b 2, b 3,. b m ] Column matrix m=1

Solving Linear Systems Using Gaussian Elimination. How can we solve

Matrix decompositions

Simultaneous Linear Equations

7.6 The Inverse of a Square Matrix

Linear Algebraic Equations

LU Factorization. Marco Chiarandini. DM559 Linear and Integer Programming. Department of Mathematics & Computer Science University of Southern Denmark

Lecture 5. Linear Systems. Gauss Elimination. Lecture in Numerical Methods from 24. March 2015 UVT. Lecture 5. Linear Systems. show Practical Problem.

1 Number Systems and Errors 1

MATH 3511 Lecture 1. Solving Linear Systems 1

y b where U. matrix inverse A 1 ( L. 1 U 1. L 1 U 13 U 23 U 33 U 13 2 U 12 1

Today s class. Linear Algebraic Equations LU Decomposition. Numerical Methods, Fall 2011 Lecture 8. Prof. Jinbo Bi CSE, UConn

A Review of Matrix Analysis

Chapter 4 No. 4.0 Answer True or False to the following. Give reasons for your answers.

Matrix decompositions

Ack: 1. LD Garcia, MTH 199, Sam Houston State University 2. Linear Algebra and Its Applications - Gilbert Strang

Linear Algebraic Equations

Introduction to Applied Linear Algebra with MATLAB

Chapter 6 Page 1 of 10. Lecture Guide. Math College Algebra Chapter 6. to accompany. College Algebra by Julie Miller

1.Chapter Objectives

Process Model Formulation and Solution, 3E4

Lecture 12 Simultaneous Linear Equations Gaussian Elimination (1) Dr.Qi Ying

Simultaneous Linear Equations

Linear Algebra Section 2.6 : LU Decomposition Section 2.7 : Permutations and transposes Wednesday, February 13th Math 301 Week #4

COURSE Numerical methods for solving linear systems. Practical solving of many problems eventually leads to solving linear systems.

5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns

Gaussian Elimination -(3.1) b 1. b 2., b. b n

Chapter 2: Approximating Solutions of Linear Systems

2.1 Gaussian Elimination

POLI270 - Linear Algebra

Chapter 12: Iterative Methods

Computational Methods. Systems of Linear Equations

Linear System of Equations

Linear Systems of n equations for n unknowns

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

Direct Methods for Solving Linear Systems. Simon Fraser University Surrey Campus MACM 316 Spring 2005 Instructor: Ha Le

CS412: Lecture #17. Mridul Aanjaneya. March 19, 2015

Numerical Analysis FMN011

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

SOLVING LINEAR SYSTEMS

Example: Current in an Electrical Circuit. Solving Linear Systems:Direct Methods. Linear Systems of Equations. Solving Linear Systems: Direct Methods

Order of Operations. Real numbers

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 7

A Primer on Solving Systems of Linear Equations

Scientific Computing

9. Numerical linear algebra background

Review Questions REVIEW QUESTIONS 71

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination

Matrices. A matrix is a method of writing a set of numbers using rows and columns. Cells in a matrix can be referenced in the form.

Miller Objectives Alignment Math

Lecture 12 (Tue, Mar 5) Gaussian elimination and LU factorization (II)

CSE 160 Lecture 13. Numerical Linear Algebra

Numerical Linear Algebra

Program Lecture 2. Numerical Linear Algebra. Gaussian elimination (2) Gaussian elimination. Decompositions, numerical aspects

Linear Programing and Inversions

Linear Algebra Linear Algebra : Matrix decompositions Monday, February 11th Math 365 Week #4

Engineering Computation

Computational Techniques Prof. Sreenivas Jayanthi. Department of Chemical Engineering Indian institute of Technology, Madras

(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

Department of Mathematics California State University, Los Angeles Master s Degree Comprehensive Examination in. NUMERICAL ANALYSIS Spring 2015

MAC Learning Objectives. Learning Objectives (Cont.) Module 10 System of Equations and Inequalities II

Hani Mehrpouyan, California State University, Bakersfield. Signals and Systems

ANALYTICAL MATHEMATICS FOR APPLICATIONS 2018 LECTURE NOTES 3

Identity Matrix: EDU> eye(3) ans = Matrix of Ones: EDU> ones(2,3) ans =

Numerical Linear Algebra

Learning Module 1 - Basic Algebra Review (Appendix A)

Solving Linear and Rational Inequalities Algebraically. Definition 22.1 Two inequalities are equivalent if they have the same solution set.

Section Matrices and Systems of Linear Eqns.

Methods of Solution of Linear Simultaneous Equations

CHAPTER 8: Matrices and Determinants

Math 2331 Linear Algebra

AMS526: Numerical Analysis I (Numerical Linear Algebra)

Introduction to Mathematical Programming

12/1/2015 LINEAR ALGEBRA PRE-MID ASSIGNMENT ASSIGNED BY: PROF. SULEMAN SUBMITTED BY: M. REHAN ASGHAR BSSE 4 ROLL NO: 15126

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

1300 Linear Algebra and Vector Geometry Week 2: Jan , Gauss-Jordan, homogeneous matrices, intro matrix arithmetic

CS227-Scientific Computing. Lecture 4: A Crash Course in Linear Algebra

8-15. Stop by or call (630)

Direct Methods for Solving Linear Systems. Matrix Factorization

Direct Methods for solving Linear Equation Systems

9. Numerical linear algebra background

Solving Consistent Linear Systems

Lectures on Linear Algebra for IT

Y = ax + b. Numerical Applications Least-squares. Start with Self-test 10-1/459. Linear equation. Error function: E = D 2 = (Y - (ax+b)) 2

7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Linear Algebra I Lecture 10

Problem Sheet 1 with Solutions GRA 6035 Mathematics

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

Gaussian Elimination without/with Pivoting and Cholesky Decomposition

1.5 F15 O Brien. 1.5: Linear Equations and Inequalities

MAC Module 1 Systems of Linear Equations and Matrices I

Exercise Sketch these lines and find their intersection.

Conceptual Questions for Review

Linear Equations in Linear Algebra

Transcription:

Uchechukwu Ofoegbu Temple University Chapter 9: Gaussian Elimination

Graphical Method The solution of a small set of simultaneous equations, can be obtained by graphing them and determining the location of the intercept

Graphical Method (cont) Graphing the equations can also show systems where: a) No solution exists The coefficient matrix is singular (determinant = 0) b) Infinite solutions exist The coefficient matrix is singular (determinant = 0) c) System is ill-conditioned The coefficient matrix is almost singular (determinant 0)

Determinants The determinant D= A of a matrix is formed from the coefficients of [A]. Determinants for small matrices are: 1 1 a 11 = a 11 2 2 3 3 a 11 a 12 a 21 a 22 = a 11 a 22 a 12 a 21 a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 = a 11 a 22 a 23 a 32 a 33 a 12 a 21 a 23 a 31 a 33 + a 13 a 21 a 22 a 31 a 32 Determinants for matrices larger than 3 x 3 can be very complicated.

Example Find the determinants of the following matrices: A = 0.5 0.1 1.9 0.5 0.3 0.52 1 B = 0.5 1 1.9 0.1 0.3 0.5

Cramer s s Rule Definition: each unknown in a system of linear algebraic equations may be expressed as a fraction of two determinants with denominator D and with the numerator obtained from D by replacing the column of coefficients of the unknown in question by the constants b 1, b 2,, b n.

Cramer s s Rule Example Find x 2 in the following system of equations: Find the determinant D of the coefficient matrix 0.3 0.52 D = 0.5 1 0.1 0.3 0.3x 1 + 0.52x 2 + x 3 = 0.01 0.5x 1 + x 2 +1.9x 3 = 0.67 0.1x 1 + 0.3x 2 + 0.5x 3 = 0.44 1 1 1.9 0.5 1.9 0.5 1 1.9 = 0.3 0.52 + 1 = 0.0022 0.3 0.5 0.1 0.5 0.1 0.4 0.5 Find determinant D 2 by replacing D s second column with b Divide D 2 = 0.3 0.01 1 0.5 0.67 1.9 0.1 0.44 0.5 0.67 1.9 = 0.3 0.44 0.5 x 2 = D 2 D = 0.0649 0.0022 = 29.5 0.010.5 1.9 0.1 0.5 +10.5 0.67 0.1 0.44 = 0.0649

Naïve Gauss Elimination For larger systems, Cramer s Rule can become unwieldy. Instead, a sequential process of removing unknowns from equations using forward elimination followed by back substitution may be used - this is Gauss elimination. Naïve Gauss elimination simply means the process does not check for potential problems resulting from division by zero.

Naïve Gauss Elimination (cont) Forward elimination Starting with the first row, add or subtract multiples of that row to eliminate the first coefficient from the second row and beyond. Continue this process with the second row to remove the second coefficient from the third row and beyond. Stop when an upper triangular matrix remains. Back substitution Starting with the last row, solve for the unknown, then substitute that value into the next highest row. Because of the upper-triangular nature of the matrix, each row will contain only one more unknown.

Gauss Program Efficiency The execution of Gauss elimination depends on the amount of floating-point operations (or flops). The flop count for an n x n system is: Forward Elimination Back Substitution Total 2n 3 ( ) 3 + On2 n 2 + On 2n 3 () ( ) 3 + On2 Conclusions: As the system gets larger, the computation time increases greatly. Most of the effort is incurred in the elimination step.

Pivoting Problems arise with naïve Gauss elimination if a coefficient along the diagonal is 0 (problem: division by 0) or close to 0 (problem: round-off error) One way to combat these issues is to determine the coefficient with the largest absolute value in the column below the pivot element. The rows can then be switched so that the largest element is the pivot element. This is called partial pivoting. If the rows to the right of the pivot element are also checked and columns switched, this is called complete pivoting.

Example Example Using the Gaussian Elimination method, solve: = + + = + = + 9 3 2 1 1 2 4 2 1 3 2 z y x z y x z y x

Example Open the GaussPivot function Use the Gauss Pivot function to solve the problem instead

Ex 9.6 by hand Using matlab colon operations Using the GaussPivot function Lab