ENGR-25_Linear_Equations-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Engr/Math/Physics 25 Chp8.

Slides:



Advertisements
Similar presentations
Linear Algebra Applications in Matlab ME 303. Special Characters and Matlab Functions.
Advertisements

Matrix Algebra Matrix algebra is a means of expressing large numbers of calculations made upon ordered sets of numbers. Often referred to as Linear Algebra.
Matrices: Inverse Matrix
MATH 685/ CSI 700/ OR 682 Lecture Notes
Lecture 9: Introduction to Matrix Inversion Gaussian Elimination Sections 2.4, 2.5, 2.6 Sections 2.2.3, 2.3.
Chapter 2 Matrices Finite Mathematics & Its Applications, 11/e by Goldstein/Schneider/Siegel Copyright © 2014 Pearson Education, Inc.
Refresher: Vector and Matrix Algebra Mike Kirkpatrick Department of Chemical Engineering FAMU-FSU College of Engineering.
12.1 Systems of Linear Equations: Substitution and Elimination.
Solution of linear system of equations
Chapter 9 Gauss Elimination The Islamic University of Gaza
Chapter 2 Basic Linear Algebra
Goldstein/Schnieder/Lay: Finite Math & Its Applications, 9e 1 of 86 Chapter 2 Matrices.
Chapter 2 Section 1 Solving a System of Linear Equations (using Matrices)
Matrices and Systems of Equations
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
Finite Mathematics & Its Applications, 10/e by Goldstein/Schneider/SiegelCopyright © 2010 Pearson Education, Inc. 1 of 86 Chapter 2 Matrices.
Matrix Mathematics in MATLAB and Excel
1 Chapter 3 Matrix Algebra with MATLAB Basic matrix definitions and operations were covered in Chapter 2. We will now consider how these operations are.
1 Chapter 2 Matrices Matrices provide an orderly way of arranging values or functions to enhance the analysis of systems in a systematic manner. Their.
5  Systems of Linear Equations: ✦ An Introduction ✦ Unique Solutions ✦ Underdetermined and Overdetermined Systems  Matrices  Multiplication of Matrices.
Precalculus – MAT 129 Instructor: Rachel Graham Location: BETTS Rm. 107 Time: 8 – 11:20 a.m. MWF.
1 1.1 © 2012 Pearson Education, Inc. Linear Equations in Linear Algebra SYSTEMS OF LINEAR EQUATIONS.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
MTH55_Lec-13_sec_3-3a_3Var_Lin_Sys.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical & Mechanical.
ENGR-25_Linear_Equations-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical.
Chapter 10 Review: Matrix Algebra
Introduction to MATLAB for Engineers, Third Edition William J. Palm III Chapter 8 Linear Algebraic Equations PowerPoint to accompany Copyright © 2010.
MATRICES AND DETERMINANTS
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
Systems and Matrices (Chapter5)
ENGR-25_Arrays-2.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical.
ECON 1150 Matrix Operations Special Matrices
 Row and Reduced Row Echelon  Elementary Matrices.
Rev.S08 MAC 1140 Module 10 System of Equations and Inequalities II.
Systems of Linear Equation and Matrices
Presentation by: H. Sarper
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
MTH55_Lec-10_sec_3-1_2Var_LinSys_ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical & Mechanical.
Chapter 4.1 Solving Systems of Linear Equations in two variables.
MTH55_Lec-14_sec_3-3a_3Var_Sys_Apps.ppt 1 Bruce Mayer, PE Chabot College Mathematics Bruce Mayer, PE Licensed Electrical & Mechanical.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Fin500J Mathematical Foundations in Finance Topic 1: Matrix Algebra Philip H. Dybvig Reference: Mathematics for Economists, Carl Simon and Lawrence Blume,
CMPS 1371 Introduction to Computing for Engineers MATRICES.
Matrices Addition & Subtraction Scalar Multiplication & Multiplication Determinants Inverses Solving Systems – 2x2 & 3x3 Cramer’s Rule.
Lecture 28: Mathematical Insight and Engineering.
1 MAC 2103 Module 3 Determinants. 2 Rev.F09 Learning Objectives Upon completing this module, you should be able to: 1. Determine the minor, cofactor,
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.
ENGR-44_Lec-03-1a_Nodal_Analysis.ppt 1 Bruce Mayer, PE Engineering-43: Engineering Circuit Analysis Bruce Mayer, PE Licensed Electrical.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
Chapter 9 Gauss Elimination The Islamic University of Gaza
Introduction to MATLAB 7
ENGR-25_Lec-21_Integ_Diff.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical.
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,
Linear Algebra Engineering Mathematics-I. Linear Systems in Two Unknowns Engineering Mathematics-I.
Matrices, Vectors, Determinants.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 8 Linear Algebraic Equations and Matrices.
1 SYSTEM OF LINEAR EQUATIONS BASE OF VECTOR SPACE.
10.4 Matrix Algebra. 1. Matrix Notation A matrix is an array of numbers. Definition Definition: The Dimension of a matrix is m x n “m by n” where m =
Slide INTRODUCTION TO DETERMINANTS Determinants 3.1.
Pitfalls of Gauss Elimination ● Division by zero (avoid by pivoting) ● Round-off errors – Important with >100 eqns – Substitute answer into original eqn.
Matrices Introduction.
Chp8 Linear Algebraic Eqns-1
MAT 322: LINEAR ALGEBRA.
Linear Algebra Review.
5 Systems of Linear Equations and Matrices
Chapter 10: Solving Linear Systems of Equations
Chapter 2 Determinants Basil Hamed
Presentation transcript:

ENGR-25_Linear_Equations-1.ppt 1 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Engr/Math/Physics 25 Chp8 Linear Algebraic Eqns-1 Bruce Mayer, PE Registered Electrical & Mechanical Engineer

ENGR-25_Linear_Equations-1.ppt 2 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Learning Goals  Define Linear Algebraic Equations  Solve Systems of Linear Equations by Hand using Gaussian Elimination (Elem. Row Ops) Cramer’s Method  Distinguish between Equation System Conditions: Exactly Determined, OverDetermined, UnderDetermined  Use MATLAB to Solve Systems of Eqns

ENGR-25_Linear_Equations-1.ppt 3 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Linear Equations  Example  In Many Engineering Analyses (e.g. ENGR36 & ENGR43) The Engineer Must Solve Several Equations in Several Unknowns; e.g.:  Contains 3 Unknowns (x,y,z) in the 3 Equations

ENGR-25_Linear_Equations-1.ppt 4 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Linear Systems - Characteristics  Examine the System of Equations  We notice These Characteristics that DEFINE Linear Systems  ALL the Variables are Raised EXACTLY to the Power of ONE (1)  COEFFICIENTS of the Variables are all REAL Numbers  The Eqns Contain No Transcendental Functions (e.g. ln, cos, e w )

ENGR-25_Linear_Equations-1.ppt 5 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Gaussian Elimination – ERO’s  A “Well Conditioned” System of Eqns can be Solved by Elementary Row Operations (ERO): Interchanges: The vertical position of two rows can be changed Scaling: Multiplying a row by a nonzero constant Replacement: The row can be replaced by the sum of that row and a nonzero multiple of any other row

ENGR-25_Linear_Equations-1.ppt 6 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods ERO Example - 1  Let’s Solve The System of Eqns  INTERCHANGE, or Swap, positions of Eqns (1) & (2)  Next SCALE by using Eqn (1) as the PIVOT To Multiply (2) by 12/6 (3) by 12/[−5]

ENGR-25_Linear_Equations-1.ppt 7 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods ERO Example - 2  The Scaling Operation  Note that the 1 st Coeffiecient in the Pivot Eqn is Called the Pivot Value The Pivot is used to SCALE the Eqns Below it  Next Apply REPLACEMENT by Subtracting Eqs (2) – (1) (3) – (1)

ENGR-25_Linear_Equations-1.ppt 8 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods ERO Example - 3  The Replacement Operation Yields Or  Note that the x-variable has been ELIMINATED below the Pivot Row Next Eliminate in the “y” Column  We can use for the y-Pivot either of −11 or −9.8 For the best numerical accuracy choose the LARGEST pivot

ENGR-25_Linear_Equations-1.ppt 9 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods ERO Example - 4  Our Reduced Sys  Since |−11| > |−9.8| we do NOT need to interchange (2)↔(3)  Scale by Pivot against Eqn-(3) Or

ENGR-25_Linear_Equations-1.ppt 10 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods ERO Example - 5  Perform Replacement by Subtracting (3) – (2)  Now Easily Find the Value of z from Eqn (3)  The Hard Part is DONE  Find y & x by BACK SUBSTITUTION  From Eqn (2)

ENGR-25_Linear_Equations-1.ppt 11 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods ERO Example - 6  BackSub into (1)  Thus the Solution Set for Our Linear System  x = 2  y = −3  z = 5

ENGR-25_Linear_Equations-1.ppt 12 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Importance of Pivoting  Computers use finite-precision arithmetic  A small error is introduced in each arithmetic operation, AND… error propagates  When the pivot element is very small, then the multipliers will be even smaller  Adding numbers of widely differing magnitude can lead to a loss of significance.  To reduce error, row interchanges are made to maximize the magnitude of the pivot element

ENGR-25_Linear_Equations-1.ppt 13 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Gaussian Elimination Summary  INTERCHANGE Eqns Such that the PIVOT Value has the Greatest Magnitude  SCALE the Eqns below the Pivot Eqn using the Pivot Value ratio’ed against the Corresponding Value below  REPLACE Eqns Below the Pivot by Subtraction to leave ZERO Coefficients Below the Pivot Value

ENGR-25_Linear_Equations-1.ppt 14 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Poorly Conditioned Systems  For Certain Systems Guassian Elimination Can Fail by NO Solution → Singular System Numerically Inaccurate Results → ILL-Conditioned System  In a SINGULAR SYSTEM Two or More Eqns are Scalar Multiples of each other  In ILL-Conditioned Systems 2+ Eqns are NEARLY Scalar Multiples of each other

ENGR-25_Linear_Equations-1.ppt 15 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods A Singular (Inconsistent) Sys  Consider 2-Eqns in 2-Unknowns  Perform Elimination by Swapping Eqns Mult (2) by 2/1 Subtract (2) – (1)

ENGR-25_Linear_Equations-1.ppt 16 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Singular System - Geometry  Plot This System on the XY Plane  The Lines do NOT CROSS to Define a A Solution Point  Singular Systems Have at least Two “PARALLEL” Eqns y

ENGR-25_Linear_Equations-1.ppt 17 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods ILL-Conditioned Systems  A small deviation in one or more of the CoEfficients causes a LARGE DEVİATİON in the SOLUTİON.

ENGR-25_Linear_Equations-1.ppt 18 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods ILL-Conditioned Systems - 2  Systems in Which a Small Change in a CoEfficient Produces Large Changes in the Solution are said to be STIFF Essentially the Lines Have very nearly Equal SLOPES “Tilting” The Equations just a bit Dramatically Shifts the Solution (Crossing Point) Tilt Region

ENGR-25_Linear_Equations-1.ppt 19 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Matrix Methods for LinSys - 1  Consider the Electrical Ckt Shown at Right  The Operation of this Ckt May be Described in Terms of the Mesh Currents, I 1 -I 4 Sources: 4 mA, 12 V Resistors: 1 & 2 kΩ  Notice Mesh Currents I 1 & I 2 are Defined by SOURCES

ENGR-25_Linear_Equations-1.ppt 20 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Matrix Methods for LinSys - 3  Using Techniques from ENGR43 find  Recall Matrix Multiplication to Write the Equation system in Matrix Form

ENGR-25_Linear_Equations-1.ppt 21 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Matrix Methods for LinSys - 3  Thus The (linear) Ckt Can be Described by  Where A  Coefficient Matrix –m-Rows x n-Colunms b  Constraint Vector x  Solution Vector  This Can Be Written in Std Math Notation

ENGR-25_Linear_Equations-1.ppt 22 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Determinants - 1  If we Solve a LinSys by Elimination we may do a Lot of work Before Discovering that the system is Singular or Very-Stiff  Determinants Can Alert us ahead of time to these Difficulties  Determinants are Defined only for SQUARE Arrays  The 2x2 Definition  D 2 is Sometimes called the “Basic Minor”

ENGR-25_Linear_Equations-1.ppt 23 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Determinants - 2  Calculating Larger-Dimension DETs becomes very-Tedious very-Quickly Consider a 3x3 Det Example

ENGR-25_Linear_Equations-1.ppt 24 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Determinants - 3  A Determinant, no matter what its size, Returns a SINGLE Value  Matrix vs. Determinant For Square Matrix A the Notation  MATLAB vs det The det Calc is quite Painful, but MATLAB’s “det” Fcn Makes it Easy  For the D 3ex >> A = [-4,9,6; 7,13,-2; -3,11,5]; >> D3ex = det(A) D3ex = 87 

ENGR-25_Linear_Equations-1.ppt 25 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Determinant Indicator - 1  The LARGER the Magnitude of the Determinant relative to the Coefficients, The LESS-Stiff the System  If det=0, then the System is SINGULAR

ENGR-25_Linear_Equations-1.ppt 26 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Determinant Indicator - 2  Consider this System  Check the “Stiffness”  Thus The system appears NON-Stiff  Find Solution by Elimination as

ENGR-25_Linear_Equations-1.ppt 27 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods MATLAB Left Division  MATLAB has a very nice Utility for Solving Well- Conditioned Linear Systems of the Form  Well Conditioned → Square System → No. of Eqns & Unknwns are Equal det  0  The Syntax is Quite Simple the hassle is entering the Matrix-A and Vector-b  x = A\b

ENGR-25_Linear_Equations-1.ppt 28 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Left-Div Example - 1  Consider a 750 kg Crate suspended by 3 Ropes or Cables  Using Force Mechanics from ENGR36 Find 3 Eqns in 3 Unknowns

ENGR-25_Linear_Equations-1.ppt 29 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Left-Div Example - 2  The MATLAB Command Window Session  Or T AB = kN T AC = kN T AD = kN >> A = [-0.48, 0, ; , , ; , , ]; >> w = [0; 9.81*750; 0] >> T = A\w T = 1.0e+003 *

ENGR-25_Linear_Equations-1.ppt 30 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Matrix Inverse - 1  Recall The Matrix Formulation for n- Eqns in n-Unknowns  In Matrix Land  To Isolate x, employ the Matrix Inverse A -1 as Defined by  Use A -1 in Matrix Eqn  Note that the IDENTITY Matrix, I, Has Property

ENGR-25_Linear_Equations-1.ppt 31 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Matrix Inverse - 2  Thus the Matrix Shorthand for the Solution  Determining the Inverse is NOT Trivial (Ask your MTH6 Instructor)  In addition A -1 is, in general, Less Numerically Accurate Than Pivoted Elimination  However is Symbolically Elegant and Will be Useful in that regard

ENGR-25_Linear_Equations-1.ppt 32 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Compare MatInv & LeftDiv % Bruce Mayer, PE % ENGR25 * 21Oct09 % file = Compare_MatInv_LeftDiv_0910 % A = [3 -7 8; ; ] b = [13; -29; 37] Ainv = inv(A) xinv = Ainv*b xleft = A\b % % CHECK Both by b = A*x CHKinv = A*xinv CHKleft = A*xleft

ENGR-25_Linear_Equations-1.ppt 33 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods All Done for Today Matrix Inversion by Adjoint The “Adjoint” of a matrix is the transpose of the matrix made up of the “CoFactors” of the original matrix.  Given A, Find A -1

ENGR-25_Linear_Equations-1.ppt 34 Bruce Mayer, PE Engineering/Math/Physics 25: Computational Methods Bruce Mayer, PE Licensed Electrical & Mechanical Engineer Engr/Math/Physics 25 Appendix