Numerical Analysis Fall. Gauss Elimination

Similar documents
Chapter 9: Gaussian Elimination

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

Chapter 8 Gauss Elimination. Gab-Byung Chae

7.6 The Inverse of a Square Matrix

Linear System of Equations

Solving Linear Systems Using Gaussian Elimination. How can we solve

Linear Algebraic 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

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

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

Matrix decompositions

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

A Review of Matrix Analysis

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

Simultaneous Linear Equations

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

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

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.

Linear System of Equations

1 Number Systems and Errors 1

1.Chapter Objectives

Chapter 2: Approximating Solutions of Linear Systems

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

MATH 3511 Lecture 1. Solving Linear Systems 1

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

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

Linear Algebraic Equations

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

Introduction to Applied Linear Algebra with MATLAB

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

Matrix decompositions

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

CE 206: Engineering Computation Sessional. System of Linear Equations

Process Model Formulation and Solution, 3E4

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

Order of Operations. Real numbers

Scientific Computing

Engineering Computation

5. Direct Methods for Solving Systems of Linear Equations. They are all over the place...

9. Numerical linear algebra background

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

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

22A-2 SUMMER 2014 LECTURE 5

Simultaneous Linear Equations

Linear Programing and Inversions

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

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

Section Matrices and Systems of Linear Eqns.

Miller Objectives Alignment Math

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

CSE 160 Lecture 13. Numerical Linear Algebra

Computational Methods. Systems of Linear Equations

Numerical Linear Algebra

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

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

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 7

2.1 Gaussian Elimination

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

POLI270 - Linear Algebra

Systems of Linear Equations

Learning Module 1 - Basic Algebra Review (Appendix A)

Numerical Analysis FMN011

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

Methods of Solution of Linear Simultaneous Equations

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

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

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

Computational Fluid Dynamics Prof. Sreenivas Jayanti Department of Computer Science and Engineering Indian Institute of Technology, Madras

Review Questions REVIEW QUESTIONS 71

Math 2331 Linear Algebra

Exercise Sketch these lines and find their intersection.

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

Chapter 8 Linear Algebraic Equations

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

Chapter 2. Solving Systems of Equations. 2.1 Gaussian elimination

9. Numerical linear algebra background

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

Solving Consistent Linear Systems

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

Linear Algebra I Lecture 10

Math 552 Scientific Computing II Spring SOLUTIONS: Homework Set 1

Numerical Methods I: Numerical linear algebra

A Primer on Solving Systems of Linear Equations

1.5 F15 O Brien. 1.5: Linear Equations and Inequalities

Conceptual Questions for Review

Linear Equations in Linear Algebra

Numerical Linear Algebra Primer. Ryan Tibshirani Convex Optimization /36-725

Section 3.6 Complex Zeros

CPE 310: Numerical Analysis for Engineers

Linear Systems of n equations for n unknowns

Math 154 :: Elementary Algebra

Linear Systems and LU

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

Polynomial and Rational Functions. Copyright Cengage Learning. All rights reserved.

GAUSSIAN ELIMINATION AND LU DECOMPOSITION (SUPPLEMENT FOR MA511)

1 Multiply Eq. E i by λ 0: (λe i ) (E i ) 2 Multiply Eq. E j by λ and add to Eq. E i : (E i + λe j ) (E i )

Scientific Computing: Dense Linear Systems

Cathedral Catholic High School Course Catalog

MAC Module 2 Systems of Linear Equations and Matrices II. Learning Objectives. Upon completing this module, you should be able to :

Definition (The carefully thought-out calculus version based on limits).

Transcription:

Numerical Analysis 2015 Fall Gauss Elimination

Solving systems m g g m m g x x x k k k k k k k k k 3 2 1 3 2 1 3 3 3 2 3 2 2 2 1 0 0

Graphical Method For small sets of simultaneous equations, graphing them and determining the location of the intercept provides a solution.

Graphical Method (cont) Graphing the equations can also show systems where: a) No solution exists b) Infinite solutions exist c) System is ill-conditioned

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

Determinants D > 0 D = 0 D ~ 0 singular system

Cramer s Rule Cramer s Rule states that 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 Rule Example Find x 2 in the following system of equations: Find the determinant D D 0.3 0.52 1 0.5 1 1.9 0.3 1 1.9 0.3 0.5 0.1 0.3 0.5 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 0.520.5 1.9 0.1 0.5 10.5 1 0.1 0.4 0.0022 Find determinant D 2 by replacing D s second column with b 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 0.010.5 1.9 0.1 0.5 10.5 0.67 0.1 0.44 0.0649 Divide x 2 D 2 D 0.0649 0.0022 29.5

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 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 Elimination Program Homework

Gauss Program Efficiency

Gauss Program Efficiency

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: 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)

Pivoting 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.

Partial Pivoting Program Homework

Pivoting If the rows to the right of the pivot element are also checked and columns switched, this is called complete pivoting.

Determinant by Gauss Elim. Determinant calculation is expensive with large system Determinant provides a system condition information Gauss elimination can be used to calculate determinant (determinant of triangular matrix) Determinant is not changed by Gauss elimination

Tridiagonal Systems A tridiagonal system is a banded system with a bandwidth of 3: f 1 g 1 e 2 f 2 g 2 e 3 f 3 g 3 e n1 f n1 g n1 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. e n f n x 1 x 2 x 3 x n1 x n r 1 r 2 r 3 r n1 r n

Tridiagonal System Solver Homework