Download presentation
Presentation is loading. Please wait.
1
Chp8 Linear Algebraic Eqns-1
Engr/Math/Physics 25 Chp8 Linear Algebraic Eqns-1 Bruce Mayer, PE Registered Electrical & Mechanical Engineer
2
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
3
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
4
Linear Systems - Characteristics
Examine the System of Equations 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, ew) We notice These Characteristics that DEFINE Linear Systems Transcendental Function Functions which cannot be given by any algebraic expression involving only their variables and constants
5
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 (Swap Eqns) Scaling: Multiplying a row by a nonzero constant (Equalize CoEffs) RePlacement: The row can be replaced by the sum of that row and a nonzero multiple of any other row (Add/Subtract Eqns) ERO a.k.a “Pivoted Elimination”
6
ERO Example: Solve for x, y, z
Let’s do some MTH25 Solve on WhiteBoard by ERO’s Fa16: Short on Time; Do on Screen Did not complete lecture from 31Oct; picked up at Wherehouse
7
ERO Example - 1 Let’s Solve The System of Eqns
Next SCALE by using Eqn (1) as the PIVOT To Multiply (2) by 12/6 (3) by 12/[−5] INTERCHANGE, or Swap, positions of Eqns (1) & (2)
8
ERO Example - 2 The Scaling Operation
Note that the 1st 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)
9
ERO Example - 3 The Replacement Operation Yields
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 Or
10
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
11
ERO Example - 5 Perform Replacement by Subtracting (3) – (2)
The Hard Part is DONE Find y & x by BACK SUBSTITUTION From Eqn (2) Now Easily Find the Value of z from Eqn (3)
12
ERO Example - 6 Q.E.F. BackSub into (1) x = 2 y = −3
z = 5 Q.E.F. Thus the Solution Set for Our Linear System
13
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
14
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
15
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
16
A Singular (InConsistent) Sys
Consider 2-Eqns in 2-Unknowns Perform Elimination by Swapping Eqns Mult (2) by 2/1 Subtract (2) – (1)
17
Singular System - Geometry
Plot This System on the XY Plane y The Lines do NOT CROSS to Define a Solution Point Singular Systems Have at least Two “PARALLEL” Eqns
18
ILL-Conditioned Systems
A small deviation in one or more of the CoEfficients causes a LARGE DEVİATİON in the SOLUTİON. 2% change in one of 3 CoEff leads to major change in the solution
19
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 Tilt Region “Tilting” The Equations just a bit Dramatically Shifts the Solution (Crossing Point)
20
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, I1-I4 Sources: 4 mA, 12 V Resistors: 1 & 2 kΩ Notice Mesh Currents I1 & I2 are Defined by SOURCES
21
Matrix Methods for LinSys - 3
Using Techniques from ENGR43 find Recall Matrix Multiplication to Write the Equation system in Matrix Form A & b are KNOWN; need to find x
22
Matrix Methods for LinSys - 3
Thus The (linear) Ckt Can be Described by This Can Be Written in Std Math Notation Where A CoEfficient Matrix m-Rows x n-Colunms b Constraint Vector x Solution Vector X & b have the same no. of cols as A. The no. of rows in A is the number of eqns.
23
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 D2 is Sometimes called the “Basic Minor”
24
Determinants - 2 Calculating Larger-Dimension DETs becomes very-Tedious very-Quickly Consider a 3x3 Det Example
25
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 D3ex >> A = [-4,9,6; 7,13,-2; -3,11,5]; >> D3ex = det(A) D3ex = 87
26
Determinant Indicator - 1
The LARGER the Magnitude of the Determinant relative to the CoEfficients, The LESS-Stiff the System (approx.) If det=0, then the System is SINGULAR
27
Determinant Indicator - 2
Consider this System Check the “Stiffness” Thus The system appears NON-Stiff Find Solution by Elimination as
28
x = A\b MATLAB Left Division Read
MATLAB has a very nice Utility for Solving Well-Conditioned Linear Systems of the Form The Syntax is Quite Simple the hassle is entering the Matrix-A and Vector-b x = A\b Well Conditioned → Square System → No. of Eqns & Unknowns are Equal det 0 Read
29
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
30
Left-Div Example - 2 The MATLAB Command Window Session Or
0.8, , ;... -0.36, , ]; >> w = [0; 9.81*750; 0] >> T = A\w T = 1.0e+003 * 2.6254 3.8157 2.4258 Or TAB = kN TAC = kN TAD = kN
31
Matrix Inverse - 1 Recall The Matrix Formulation for n-Eqns in n-Unknowns Note that the IDENTITY Matrix , I, Has Property In Matrix Land Use A-1 in Matrix Eqn Order of A-1 is critical on both sides as MAT-Mult is NOT commutative To Isolate x, employ the Matrix Inverse A-1 as Defined by
32
Matrix Inverse - 2 Thus the Matrix Shorthand for the Solution
In addition A-1 is, in general, Less Numerically Accurate Than Pivoted Elimination However Determining the Inverse is NOT Trivial (Ask your MTH6 Instructor) is Symbolically Elegant and Will be Useful in that regard
33
Compare MatInv & LeftDiv
% Bruce Mayer, PE % ENGR25 * 21Oct09 * Rev 08Apr13 * Rev 2Nov16 % 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 Time for Live Demo
34
Matrix Inversion by Adjoint
All Done for Today Given A, Find A-1 Matrix Inversion by Adjoint The “Adjoint” of a matrix is the transpose of the matrix made up of the “CoFactors” of the original matrix.
35
Licensed Electrical & Mechanical Engineer BMayer@ChabotCollege.edu
Engr/Math/Physics 25 Appendix Time For Live Demo Bruce Mayer, PE Licensed Electrical & Mechanical Engineer
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.