Chapter 2 Solutions of Systems of Linear Equations / Matrix Inversion

Slides:



Advertisements
Similar presentations
Gauss Elimination.
Advertisements

Chapter 2 Simultaneous Linear Equations
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
Lecture 7 Intersection of Hyperplanes and Matrix Inverse Shang-Hua Teng.
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
Solution of linear system of equations
Chapter 9 Gauss Elimination The Islamic University of Gaza
Major: All Engineering Majors Author(s): Autar Kaw
Solving Systems of Linear Equations Part Pivot a Matrix 2. Gaussian Elimination Method 3. Infinitely Many Solutions 4. Inconsistent System 5. Geometric.
Linear Systems of Equations Ax = b Marco Lattuada Swiss Federal Institute of Technology - ETH Institut für Chemie und Bioingenieurwissenschaften ETH Hönggerberg/
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.
Math for CSLecture 21 Solution of Linear Systems of Equations Consistency Rank Geometric Interpretation Gaussian Elimination Lecture 2. Contents.
Mujahed AlDhaifallah (Term 342) Read Chapter 9 of the textbook
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Part 31 Chapter.
Gauss-Jordan Matrix Elimination Brought to you by Tutorial Services – The Math Center.
Solving System of Linear Equations. 1. Diagonal Form of a System of Equations 2. Elementary Row Operations 3. Elementary Row Operation 1 4. Elementary.
Elementary Linear Algebra Howard Anton Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 1.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Linear Algebraic Equations ~ Gauss Elimination Chapter.
© 2005 Baylor University Slide 1 Fundamentals of Engineering Analysis EGR 1302 Unit 1, Lecture F Approximate Running Time - 24 minutes Distance Learning.
SYSTEMS OF LINEAR EQUATIONS
Major: All Engineering Majors Author(s): Autar Kaw
Elementary Linear Algebra Howard Anton Copyright © 2010 by John Wiley & Sons, Inc. All rights reserved. Chapter 1.
MATRICES AND DETERMINANTS
Advanced Computer Graphics Spring 2014 K. H. Ko School of Mechatronics Gwangju Institute of Science and Technology.
MATH 250 Linear Equations and Matrices
Systems of Linear Equations Let’s say you need to solve the following for x, y, & z: 2x + y – 2z = 10 3x + 2y + 2z = 1 5x + 4y + 3z = 4 Two methods –Gaussian.
Row Reduction Method Lesson 6.4.
ΑΡΙΘΜΗΤΙΚΕΣ ΜΕΘΟΔΟΙ ΜΟΝΤΕΛΟΠΟΙΗΣΗΣ 4. Αριθμητική Επίλυση Συστημάτων Γραμμικών Εξισώσεων Gaussian elimination Gauss - Jordan 1.
Chemical Engineering Majors Author(s): Autar Kaw
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 9 Linear Systems of Equations: Gauss Elimination.
Gaussian Elimination Electrical Engineering Majors Author(s): Autar Kaw Transforming Numerical Methods Education for.
Meeting 19 System of Linear Equations. Linear Equations A solution of a linear equation in n variables is a sequence of n real numbers s 1, s 2,..., s.
Chapter 9 Gauss Elimination The Islamic University of Gaza
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.
4-8 Cramer’s Rule We can solve a system of linear equations that has a unique solution by using determinants and a pattern called Cramer’s Rule (named.
Gaussian Elimination Civil Engineering Majors Author(s): Autar Kaw Transforming Numerical Methods Education for STEM.
Notes Over 4.3 Evaluate Determinants of 2 x 2 Matrices
Autar Kaw Benjamin Rigsby Transforming Numerical Methods Education for STEM Undergraduates.
Linear Algebra Engineering Mathematics-I. Linear Systems in Two Unknowns Engineering Mathematics-I.
1 SYSTEM OF LINEAR EQUATIONS BASE OF VECTOR SPACE.
Lecture 9 Numerical Analysis. Solution of Linear System of Equations Chapter 3.
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.
Pitfalls of Gauss Elimination ● Division by zero (avoid by pivoting) ● Round-off errors – Important with >100 eqns – Substitute answer into original eqn.
College Algebra Chapter 6 Matrices and Determinants and Applications
Downhill product – Uphill product.
Multivariable Linear Systems and Row Operations
TYPES OF SOLUTIONS SOLVING EQUATIONS
Section 6.1 Systems of Linear Equations
Part 3 Chapter 9 Gauss Elimination
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
TYPES OF SOLUTIONS SOLVING EQUATIONS
Simultaneous Linear Equations
Gaussian Elimination.
MATRICES AND DETERMINANTS
Part 3 - Chapter 9.
Chapter 4 Systems of Linear Equations; Matrices
Major: All Engineering Majors Author(s): Autar Kaw
Matrix Solutions to Linear Systems
Numerical Analysis Lecture14.
Numerical Analysis Lecture10.
Linear Systems Numerical Methods.
Chapter 4 Systems of Linear Equations; Matrices
Simultaneous Linear Equations Gaussian Elimination with Partial Pivoting
Presentation transcript:

Chapter 2 Solutions of Systems of Linear Equations / Matrix Inversion Chem 302 - Math 252 Chapter 2 Solutions of Systems of Linear Equations / Matrix Inversion

Solutions of Systems of Linear Equations n linear equations, n unknowns Three possibilities Unique solution No solution Infinite solutions Numerically systems that are almost singular cause problems Range of solutions Ill-conditioned problem Singular Systems

Solutions of Systems of Linear Equations Direct Methods Determine solution in finite number of steps Usually preferred Round-off error can cause problems Indirect Methods Use iteration scheme Require infinite operations to determine exact solution Useful when Direct Methods fail

Direct Methods Cramer’s Rule Gaussian Elimination Gauss-Jordan Elimination Maximum Pivot Strategy

Cramer’s Rule Write coefficient matrix (A) Evaluate |A| Form A1 If |A|=0 then singular Form A1 Replace column 1 of A with answer column Compute x1 = |A1|/|A| Repeat 3 and 4 for other variables

Cramer’s Rule Not singular: System has unique solution

Cramer’s Rule

Cramer’s Rule Good for small systems Good if only one or two variables are needed Very slow and inefficient for large systems n order system requires (n+1)! × & (n+1)! Additions 2nd order 6 ×, 6 + 10th order 3628800 ×, 3628800 + 600th order 1.27×101408 ×, 1.27×101408 +

Gaussian Elimination Form augmented matrix Use elementary row operations to transform the augmented matrix so that the A portion is in upper triangular form Switch rows Multiply row by constant Linear combination of rows Use back substitution to find solutions Requires n3+n2- n ×, n3+½n2- n +

Gaussian Elimination

Gauss-Jordan Elimination Form augmented matrix Normalize 1st row Use elementary row operations to transform the augmented matrix so that the A portion is the identity matrix Switch rows Multiply row by constant Linear combination of rows Requires ½n3+n2- 2½n+2 ×, ½n3-1½n+1 + Can also be used to find matrix inverse

Gauss-Jordan Elimination

Maximum Pivot Strategy Elimination methods can run into difficulties if one or more of diagonal elements is close to (or exactly) zero Normalize row with largest (magnitude) element.

Gauss-Jordan Elimination

Comparison of Direct Methods Small systems (n<10) not a big deal Large systems critical Number of floating point operations n Cramer’s Gaussian Elimination Gauss-Jordan Elimination 2 12 9 7 3 48 28 27 4 240 62 67 5 1440 115 133 10 79833600 805 1063 20 1.0×1020 5910 8323 100 1.9×10160 681550 1009603 1000 4.0×102570 6.7×108 1.0×109

Comparison of Direct Methods Time required on a 300 MFLOP computer (500 TFLOP) n Cramer’s Gaussian Elimination Gauss-Jordan Elimination 2 2.4×10-8s 1.8×10-8s 1.4×10-8s 3 9.6×10-8s 5.6×10-8s 5.4×10-8s 4 4.8×10-7s 1.2×10-7s 1.3×10-7s 5 2.9×10-6s 2.3×10-7s 2.7×10-7s 10 0.16s 1.6×10-6s 2.1×10-6s 20 6475 years (2.4 days) 1.2×10-5s 1.7×10-5s 100 1×10144 (1×10138) years 1.4×10-3s 2.0×10-3s 1000 102554 (102548) years 1.3

Indirect Methods Jacobi Method Gauss-Seidel Method Use iterations Guess solution Iterate to self consistent Can be combined with Direct Methods

Jacobi Method Rearrange system of equations to isolate the diagonal elements Guess solution Iterate until self-consistent

Jacobi Method iteration x1 x2 x3 1 0.571429 1.333333 2 1.095238 1 0.571429 1.333333 2 1.095238 1.047619 3 0.994048 1.027211 0.968254 4 0.99263 0.990079 0.998299 5 1.001027 0.998461 1.00274 6 1.000535 1.00093 0.999943 7 0.999877 1.00006 0.999778 8 0.999965 0.999919 1.000021 9 1.000013 1.000001 1.000017 10 1.000002 1.000007 0.999997 11 0.999999 12 13

Gauss-Seidel Method Same as Jacobi method, but use updated values as soon as they are calculated.

Jacobi Method Gauss-Seidel Method iteration x1 x2 x3 1 0.571429 1 0.571429 1.333333 2 1.095238 1.047619 3 0.994048 1.027211 0.968254 4 0.99263 0.990079 0.998299 5 1.001027 0.998461 1.00274 6 1.000535 1.00093 0.999943 7 0.999877 1.00006 0.999778 8 0.999965 0.999919 1.000021 9 1.000013 1.000001 1.000017 10 1.000002 1.000007 0.999997 11 0.999999 12 13 iteration x1 x2 x3 1 0.714286 1.031746 2 1.039683 1.014739 0.989544 3 0.996851 0.996563 1.001082 4 1.000565 1.00039 0.999831 5 0.99993 0.999942 1.000022 6 1.00001 1.000008 0.999997 7 0.999999 8 9

Indirect Methods Sufficient condition Large problems Diagonally dominant Large problems Sparse matrix (many zeros)