Linear Systems of Equations Ax = b Marco Lattuada Swiss Federal Institute of Technology - ETH Institut für Chemie und Bioingenieurwissenschaften ETH Hönggerberg/

Slides:



Advertisements
Similar presentations
Elementary Linear Algebra Anton & Rorres, 9th Edition
Advertisements

Chapter 2 Solutions of Systems of Linear Equations / Matrix Inversion
Algebraic, transcendental (i.e., involving trigonometric and exponential functions), ordinary differential equations, or partial differential equations...
Lecture 7 Intersection of Hyperplanes and Matrix Inverse Shang-Hua Teng.
1 Copyright © 2015, 2011, 2007 Pearson Education, Inc. Chapter 4-1 Systems of Equations and Inequalities Chapter 4.
Systems of 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.
Lecture 9: Introduction to Matrix Inversion Gaussian Elimination Sections 2.4, 2.5, 2.6 Sections 2.2.3, 2.3.
Lecture 15 Recursive and Iterative Formula for Determinants Shang-Hua Teng.
Solving systems using matrices
Chapter 2 Matrices Definition of a matrix.
ECIV 520 Structural Analysis II Review of Matrix Algebra.
Non Linear Regression Y i = f(  x i ) +  i Marco Lattuada Swiss Federal Institute of Technology - ETH Institut für Chemie und Bioingenieurwissenschaften.
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
Math for CSLecture 21 Solution of Linear Systems of Equations Consistency Rank Geometric Interpretation Gaussian Elimination Lecture 2. Contents.
Linear Regression Y i =  0 +  1 x i +  i Marco Lattuada Swiss Federal Institute of Technology - ETH Institut für Chemie und Bioingenieurwissenschaften.
Matrices and Determinants
Chapter 5 Determinants.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
Copyright © Cengage Learning. All rights reserved. 7.6 The Inverse of a Square Matrix.
Systems of Equations and Inequalities
Spring 2013 Solving a System of Linear Equations Matrix inverse Simultaneous equations Cramer’s rule Second-order Conditions Lecture 7.
MATRICES AND DETERMINANTS
Systems and Matrices (Chapter5)
1 資訊科學數學 14 : Determinants & Inverses 陳光琦助理教授 (Kuang-Chi Chen)
ECON 1150 Matrix Operations Special Matrices
TH EDITION LIAL HORNSBY SCHNEIDER COLLEGE ALGEBRA.
 Row and Reduced Row Echelon  Elementary Matrices.
Rev.S08 MAC 1140 Module 10 System of Equations and Inequalities II.
Matrix Inversion.
Copyright © 2011 Pearson, Inc. 7.3 Multivariate Linear Systems and Row Operations.
Slide Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley.
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.
CHAPTER 2 MATRIX. CHAPTER OUTLINE 2.1 Introduction 2.2 Types of Matrices 2.3 Determinants 2.4 The Inverse of a Square Matrix 2.5 Types of Solutions to.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
1 © 2010 Pearson Education, Inc. All rights reserved © 2010 Pearson Education, Inc. All rights reserved Chapter 9 Matrices and Determinants.
WEEK 8 SYSTEMS OF EQUATIONS DETERMINANTS AND CRAMER’S RULE.
8.1 Matrices & Systems of Equations
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
1 Ch. 4 Linear Models & Matrix Algebra Matrix algebra can be used: a. To express the system of equations in a compact manner. b. To find out whether solution.
Lecture 8 Matrix Inverse and LU Decomposition
Linear algebra: matrix Eigen-value Problems Eng. Hassan S. Migdadi Part 1.
Elementary Linear Algebra Anton & Rorres, 9 th Edition Lecture Set – 02 Chapter 2: Determinants.
Chapter 5 MATRIX ALGEBRA: DETEMINANT, REVERSE, EIGENVALUES.
Chapter 3 Determinants Linear Algebra. Ch03_2 3.1 Introduction to Determinants Definition The determinant of a 2  2 matrix A is denoted |A| and is given.
ME 142 Engineering Computation I Matrix Operations in Excel.
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
Copyright © 2007 Pearson Education, Inc. Slide 7-1.
Chapter 2 Determinants. With each square matrix it is possible to associate a real number called the determinant of the matrix. The value of this number.
Linear Systems of Equations Iterative and Relaxation Methods Ax = b Marco Lattuada Swiss Federal Institute of Technology - ETH Institut für Chemie und.
2.5 – Determinants and Multiplicative Inverses of Matrices.
LEARNING OUTCOMES At the end of this topic, student should be able to :  D efination of matrix  Identify the different types of matrices such as rectangular,
1 ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule Herbert G. Mayer, PSU Status 11/14/2014 For use at Changchun University of Technology CCUT.
Section 2.1 Determinants by Cofactor Expansion. THE DETERMINANT Recall from algebra, that the function f (x) = x 2 is a function from the real numbers.
Linear Algebra Review Tuesday, September 7, 2010.
Matrices, Vectors, Determinants.
1 SYSTEM OF LINEAR EQUATIONS BASE OF VECTOR SPACE.
CHAPTER 7 Determinant s. Outline - Permutation - Definition of the Determinant - Properties of Determinants - Evaluation of Determinants by Elementary.
Downhill product – Uphill product.
ECE 3301 General Electrical Engineering
The Inverse of a Square Matrix
Chapter 2 Determinants by Cofactor Expansion
Zero of a Nonlinear System of Algebraic Equations f(x) = 0
Use Inverse Matrices to Solve 2 Variable Linear Systems
Numerical Analysis Lecture14.
Linear Systems Numerical Methods.
Chapter 7: Matrices and Systems of Equations and Inequalities
Lecture 8 Matrix Inverse and LU Decomposition
Solving Linear Systems of Equations - Inverse Matrix
Presentation transcript:

Linear Systems of Equations Ax = b Marco Lattuada Swiss Federal Institute of Technology - ETH Institut für Chemie und Bioingenieurwissenschaften ETH Hönggerberg/ HCI F135 – Zürich (Switzerland) Marco Lattuada Swiss Federal Institute of Technology - ETH Institut für Chemie und Bioingenieurwissenschaften ETH Hönggerberg/ HCI F135 – Zürich (Switzerland)

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 2 Definition of the Problem We want to solve: where x is the vector of the unknowns, while A and b are given. Hypotheses: 1.The number of equations is equal to the number of unknowns (that is, A is a square matrix) 1.The coefficients of A, b and x are real 2.The solution of the system exists and it is unique We want to solve: where x is the vector of the unknowns, while A and b are given. Hypotheses: 1.The number of equations is equal to the number of unknowns (that is, A is a square matrix) 1.The coefficients of A, b and x are real 2.The solution of the system exists and it is unique A -1 exists A is not singular A's columns are linearly independent A's lines are linearly independent det(A) is non-zero rank(A) is equal to n Ax = 0 only if x is a null vector

Analytical Approach Cramer’s rule (1750): The solution of a system of equations: Is given by: where A i is defined as follows: Cramer’s rule (1750): The solution of a system of equations: Is given by: where A i is defined as follows: Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 3 b replaces the i th column

Calculation of the determinant How to compute the determinant of a square matrix? Laplace formula (1772): where C i,j is the cofactor of element a i,j. The cofactor C i,j is the determinant of the submatrix obtained by removing the i th row and the j th column of the matrix, multiplied by (-1) i+j : How to compute the determinant of a square matrix? Laplace formula (1772): where C i,j is the cofactor of element a i,j. The cofactor C i,j is the determinant of the submatrix obtained by removing the i th row and the j th column of the matrix, multiplied by (-1) i+j : Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 4 No i th row No j th column

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 5 Numerical approach: Gauss Elimination Method Let us consider the system: Let us consider the following operations: 1.I multiply one line by a constant 2.I substitute one line with a linear combination of the others 3.I operate a permutation of the lines The result does not change Let us consider the system: Let us consider the following operations: 1.I multiply one line by a constant 2.I substitute one line with a linear combination of the others 3.I operate a permutation of the lines The result does not change

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 6 Gauss Elimination Method Numerical Example Multiply by -3Multiply by -3 Sum it to 1st lineSum it to 1st line Multiply by -3Multiply by -3 Sum it to 1st lineSum it to 1st line Multiply by -4Multiply by -4 Sum it to 2nd lineSum it to 2nd line Triangular System

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 7 Gauss Elimination Method General Case I want to replace a 21 with a zero I define the multiplier l 21 : Note that:

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 8 Gauss Elimination Method Gauss Transformation Matrix where: Solution:

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 9 Gauss Elimination Method Numerical Example n(n-1) operations (flops) (n-1)(n-2) operations (flops) Total number of operations required

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 10 Gauss Transformation Method Let us change our point of view! can be used to transform A Gauss Elimination Method 1.Changes the matrix A 2.Needs the coefficient vector b 3.Must re-run the method if b is changed

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 11 Gauss Transformation Method Properties The final matrix A is a right triangular matrix The matrix M is a left triangular matrix The inverse of M is also a left triangular matrix The matrix L = M -1 has the simple form: Properties The final matrix A is a right triangular matrix The matrix M is a left triangular matrix The inverse of M is also a left triangular matrix The matrix L = M -1 has the simple form:

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 12 Consider the following expression: Let us multiply by L = M -1 both sides: Consider the following expression: Let us multiply by L = M -1 both sides: LR (LU) Factorization Right triangular

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 13 Starting matrix A is transformed (factorized) as: Let us solve a linear system with a generic vector b: Starting matrix A is transformed (factorized) as: Let us solve a linear system with a generic vector b: LR Factorization 1.For every vector b, two simple triangular systems must be solved without factorizing again 2.The matrices LR can be stored using the elements of A 3.If A is modified, it is often possible to modify L and R accordingly without factorizing

Marco Lattuada – Statistical and Numerical Methods for Chemical Engineers Solution of Linear Systems of Equations – Page # 14 Starting matrix: Consider the following system: Consider the following similar system: Starting matrix: Consider the following system: Consider the following similar system: Problems of Gaussian Elimination and LR Pivot value must be ≠ 0 a 11 = 0  I switch the lines  x 1 = 1 and x 2 = 1 Manual LR Factorization without pivoting