Numerical Methods.  Forward Elimination of Unknowns: In this step, the unknown is eliminated in each equation starting with the first equation. This.

Slides:



Advertisements
Similar presentations
Numerical Solution of Linear Equations
Advertisements

Chapter 2 Solutions of Systems of Linear Equations / Matrix Inversion
Gauss Elimination.
Chapter: 3c System of Linear Equations
CSCI-455/552 Introduction to High Performance Computing Lecture 25.
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.
Lecture 9: Introduction to Matrix Inversion Gaussian Elimination Sections 2.4, 2.5, 2.6 Sections 2.2.3, 2.3.
Numerical Algorithms Matrix multiplication
Lesson 8 Gauss Jordan Elimination
Part 3 Chapter 9 Gauss Elimination
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/
Special Matrices and Gauss-Siedel
Chapter 2 Section 1 Solving a System of Linear Equations (using Matrices)
MECH300H Introduction to Finite Element Methods Lecture 2 Review.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 17 Solution of Systems of Equations.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 14 Elimination Methods.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 15 Solution of Systems of Equations.
ECIV 520 Structural Analysis II Review of Matrix Algebra.
Mujahed AlDhaifallah (Term 342) Read Chapter 9 of the textbook
Major: All Engineering Majors Author(s): Autar Kaw
Assignment Solving System of Linear Equations Using MPI Phạm Trần Vũ.
Solving Systems of Equations by matrices
Linear Systems Gaussian Elimination CSE 541 Roger Crawfis.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Chapter 11.
Lesson 13-1: Matrices & Systems Objective: Students will: State the dimensions of a matrix Solve systems using matrices.
Yasser F. O. Mohammad Assiut University Egypt. Previously in NM Introduction to NM Solving single equation System of Linear Equations Vectors and Matrices.
ΑΡΙΘΜΗΤΙΚΕΣ ΜΕΘΟΔΟΙ ΜΟΝΤΕΛΟΠΟΙΗΣΗΣ 4. Αριθμητική Επίλυση Συστημάτων Γραμμικών Εξισώσεων Gaussian elimination Gauss - Jordan 1.
Chemical Engineering Majors Author(s): Autar Kaw
Class Opener:. Identifying Matrices Student Check:
Gaussian Elimination Electrical Engineering Majors Author(s): Autar Kaw Transforming Numerical Methods Education for.
10.2 Systems of Linear Equations: Matrices Objectives Objectives 1.Write the Augmented Matrix 2.Write the System from the Augmented matrix 3.Perform Row.
3.6 Solving Systems Using Matrices You can use a matrix to represent and solve a system of equations without writing the variables. A matrix is a rectangular.
ECE 530 – Analysis Techniques for Large-Scale Electrical Systems Prof. Hao Zhu Dept. of Electrical and Computer Engineering University of Illinois at Urbana-Champaign.
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.
Gaussian Elimination Civil Engineering Majors Author(s): Autar Kaw Transforming Numerical Methods Education for STEM.
Unit #1 Linear Systems Fall Dr. Jehad Al Dallal.
4.1 An Introduction to Matrices Katie Montella Mod. 6 5/25/07.
Autar Kaw Benjamin Rigsby Transforming Numerical Methods Education for STEM Undergraduates.
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.
Numerical Methods. Prof. S. M. Lutful Kabir, BRAC University2  One of the most popular techniques for solving simultaneous linear equations is the Gaussian.
Multivariable Linear Systems and Row Operations
Part 3 Chapter 9 Gauss Elimination
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Chapter: 3c System of Linear Equations
Linear Equations Gauss & Cramer’s
ECE 3301 General Electrical Engineering
Spring Dr. Jehad Al Dallal
MATHEMATICS Linear Equations
Gaussian Elimination.
Gauss-Siedel Method.
Chapter 6 Direct Methods for Solving Linear Systems
Multiplying Matrices.
Major: All Engineering Majors Author(s): Autar Kaw
8.1 Matrices and System of Linear Equations
Matrix Solutions to Linear Systems
Review of Matrix Algebra
Numerical Analysis Lecture14.
3.6 Multiply Matrices.
Matrices.
Simultaneous Linear Equations Gaussian Elimination with Partial Pivoting
Chapter 11 Chapter 11.
Linear Systems of Equations: solution and applications
Matrices and Linear Equations
Major: All Engineering Majors Authors: Autar Kaw
Presentation transcript:

Numerical Methods

 Forward Elimination of Unknowns: In this step, the unknown is eliminated in each equation starting with the first equation. This way, the equations are reduced to one equation and one unknown in each equation.  Back Substitution: In this step, starting from the last equation, each of the unknowns is found. Prof. S. M. Lutful Kabir, BRAC University2

 There will be a total of (n-1) steps of forward elimination.  At the end of (n-1) steps of forward elimination, we get a set of equations that look like 3

 Now the equations are solved starting from the last equation as it has only one unknown.  Then the second last equation, that is the (n-1) th equation, has two unknowns: x n and x n+1 and, but x n is already known. This reduces the (n-1) th equation also to one unknown. Back substitution hence can be represented for all equations by the formula for n = n-1, n-2, …2, 1 and 4

 The two methods are the same, except in the beginning of each step of forward elimination, a row switching is done based on the following criterion.  Criteria: If there are n equations, then there are n-1 forward elimination steps. In the k th step of forward elimination, one finds the elements of the kth column below k-1 row |a kk |, |a k+1,k |,……….|a nk |  Then, if the maximum of these values is |a pk | in the p th row, then switch rows p and k.  The other steps of forward elimination are the same as the Gauss elimination method.  The back substitution steps stay exactly the same as the Gauss elimination method. 5

% Defining ‘a’ and ‘b’ matrices of the equation % [a][x]=[b], [x] is the unknown a=[ ; ; 5 1 3]; b=[ ]; % n is the dimension of a matrix n=3; Prof. S. M. Lutful Kabir, BRAC University6

% FORWARD ELIMINATION % start with 1st row as pivot row, next is the second row and similarly % upto (n-1)th row for PivotRow=1:n-1 % finding maximum absolute value of the elements in the column % equal to pivot row and below the pivot row MaxPosition=PivotRow; MaxValue=abs(a(PivotRow,PivotRow)); for kk= PivotRow+1 : n if abs(a(kk,PivotRow))>MaxValue MaxValue=abs(a(kk,PivotRow)); MaxPosition=kk; end Prof. S. M. Lutful Kabir, BRAC University7

% if row other than pivotrow is found to have maximum element % interchange all elements of that row with the corresponding % elements of pivot row if MaxPosition ~= PivotRow a for jj=PivotRow : n temp=a(PivotRow,jj); a(PivotRow,jj)=a(MaxPosition,jj); a(MaxPosition,jj)=temp; end temp=b(PivotRow); b(PivotRow)=b(MaxPosition); b(MaxPosition)=temp; a end Prof. S. M. Lutful Kabir, BRAC University8

% now assign Pivot element as diagonal element of the pivot row PivotElement = a(PivotRow,PivotRow); % in order to eliminate elements below pivot element start with % PivotRow+1 and repeat upto last row for i = PivotRow+1 : n % start with removal element as the element just below % pivot element and then the element below and so on RemovalElement = a(i,PivotRow); for j = PivotRow:n a(i,j) = a(i,j) - a(PivotRow,j) * RemovalElement / PivotElement; end % make corresponding operation of the element of b matrix b(i) = b(i) - b(PivotRow) * RemovalElement / PivotElement; end 9

% BACK SUBSTITUTION % find the value of xn from the last equation x(n)=b(n)/a(n,n); % start finding value of x(n-1), then x(n-2) and so on upto x3, x3 and % x1 using the equations (n-1)th, (n-2)th, upto 2nd, 1st equations % sequentially in backward direction for kk=n-1:-1:1 sumtotal=0; for jj=kk+1:n sumtotal=sumtotal+a(kk,jj)*x(jj); end x(kk)=(b(kk)-sumtotal)/a(kk,kk); end a b x Prof. S. M. Lutful Kabir, BRAC University10

Solve the following simultaneous linear equations using Gaussian elimination method -x 1 +4x 2 +3x 3 = 18….….….(1) 3x 1 +2x 2 -x 3 = -2….….….(2) 2x 1 -3x 2 +7x 3 = 13….….….(3) Prof. S. M. Lutful Kabir, BRAC University11

Thanks Prof. S. M. Lutful Kabir, BRAC University12