1 ECE 102 Engineering Computation Chapter 3 Math Review 3: Cramer’s Rule Dr. Herbert G. Mayer, PSU Status 10/11/2015 For use at CCUT Fall 2015.

Slides:



Advertisements
Similar presentations
1 ECE 221 Electric Circuit Analysis I Chapter 9 Mesh-Current Method Herbert G. Mayer, PSU Status 1/22/2015.
Advertisements

1 ECE 221 Electric Circuit Analysis I Chapter 10 Circuit Analysis 4 Ways Herbert G. Mayer, PSU Status 11/23/2014 For use at Changchun University of Technology.
1 CS 162 Introduction to Computer Science Chapter 7 Matrix Manipulation Herbert G. Mayer, PSU Status 9/21/2014.
1 ECE 221 Electric Circuit Analysis I Chapter 5 Branch Currents Herbert G. Mayer, PSU Status 1/5/2015.
Chapter 4 Systems of Linear Equations; Matrices Section 2 Systems of Linear Equations and Augmented Matrics.
1 Copyright © 2015, 2011, 2007 Pearson Education, Inc. Chapter 4-1 Systems of Equations and Inequalities Chapter 4.
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
Refresher: Vector and Matrix Algebra Mike Kirkpatrick Department of Chemical Engineering FAMU-FSU College of Engineering.
Part 3 Chapter 9 Gauss Elimination
Linear Systems of Equations Ax = b Marco Lattuada Swiss Federal Institute of Technology - ETH Institut für Chemie und Bioingenieurwissenschaften ETH Hönggerberg/
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 14 Elimination Methods.
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
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.
Chapter 2 Systems of Linear Equations and Matrices Section 2.4 Multiplication of Matrices.
Recall that a square matrix is one in which there are the same amount of rows as columns. A square matrix must exist in order to evaluate a determinant.
Solving Systems of Equations and Inequalities
EGR 1101 Unit 7 Systems of Linear Equations in Engineering (Chapter 7 of Rattan/Klingbeil text)
Cramer's Rule Gabriel Cramer was a Swiss mathematician ( )
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)
ECON 1150 Matrix Operations Special Matrices
TH EDITION LIAL HORNSBY SCHNEIDER COLLEGE ALGEBRA.
Solving Systems of Equations and Inequalities Section 3.1A-B Two variable linear equations Section 3.1C Matrices Resolution of linear systems Section 3.1D.
Rev.S08 MAC 1140 Module 10 System of Equations and Inequalities II.
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.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
1 ECE 102 Engineering Computation Chapter 20 Source Transformations Dr. Herbert G. Mayer, PSU Status 9/2/2015 For use at CCUT Fall 2015.
4-8 Augmented Matrices and Systems
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.
Matrices Addition & Subtraction Scalar Multiplication & Multiplication Determinants Inverses Solving Systems – 2x2 & 3x3 Cramer’s Rule.
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.
Chapter 9 Matrices and Determinants Copyright © 2014, 2010, 2007 Pearson Education, Inc Determinants and Cramer’s Rule.
The coefficient matrix for a system of linear equations in standard form is the matrix formed by the coefficients for the variables in the equations. For.
Linear algebra: matrix Eigen-value Problems Eng. Hassan S. Migdadi Part 1.
Algebra a Niagara Falls Get ready for a “Small Quiz” to be written on your grade sheet.
ME 142 Engineering Computation I Matrix Operations in Excel.
Copyright © 2011 Pearson Education, Inc. Solving Linear Systems Using Matrices Section 6.1 Matrices and Determinants.
1 ECE 221 Electric Circuit Analysis I Chapter 10 Circuit Analysis 3 Ways Herbert G. Mayer, PSU Status 10/21/2015.
College Algebra Sixth Edition James Stewart Lothar Redlin Saleem Watson.
Systems of Equations and Inequalities Ryan Morris Josh Broughton.
Copyright © Cengage Learning. All rights reserved. 7 Linear Systems and Matrices.
1 ECE 221 Electric Circuit Analysis I Chapter 11 Source Transformations Herbert G. Mayer, PSU Status 11/25/2014 For use at Changchun University of Technology.
Objective 1 You will be able to find the determinant of a 2x2 and a 3x3 matrix.
Copyright © 2007 Pearson Education, Inc. Slide 7-1.
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.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison- Wesley Systems of Equations in Three Variables Identifying Solutions Solving Systems.
Solving Systems of Linear equations with 3 Variables To solve for three variables, we need a system of three independent equations.
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.
Determinants Every n  n matrix A is associated with a real number called the determinant of A, written  A . The determinant of a 2  2 matrix.
Notes Over 4.3 Evaluate Determinants of 2 x 2 Matrices
College Algebra Chapter 6 Matrices and Determinants and Applications
Part 3 Chapter 9 Gauss Elimination
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
ECE 3301 General Electrical Engineering
Algebra 2 Chapter 3 Section 3 Cramer’s Rule
Matrices, Determinants, and Cramer’s Rule
Copyright © Cengage Learning. All rights reserved.
ECON 213 Elements of Mathematics for Economists
MATRICES AND DETERMINANTS
Applying Determinants to solve Systems of Equations 2x2 & 3x3
ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule
Cramer's Rule Gabriel Cramer was a Swiss mathematician ( )
4.3 Determinants and Cramer’s Rule
College Algebra Chapter 6 Matrices and Determinants and Applications
Cramer's Rule Gabriel Cramer was a Swiss mathematician ( )
Using matrices to solve Systems of Equations
Presentation transcript:

1 ECE 102 Engineering Computation Chapter 3 Math Review 3: Cramer’s Rule Dr. Herbert G. Mayer, PSU Status 10/11/2015 For use at CCUT Fall 2015

2 Syllabus Motivation Steps for Cramer’s Rule Cramer’s Rule: ∆ Cramer’s Rule: Numerator N i Cramer’s Rule: Solve for x i Sample Problem

3 Motivation Electrical Engineering Computation often involves solution of multiple (n) linear equations One way to solve is via algebraic substitution Which becomes tedious and highly error-prone, once n is interestingly large Engineering calculators often provide built-in solutions, a method internally using Cramer’s Rule Yet future engineers must understand the method first; then they should use a calculator First learn to use determinants to solve n unknowns x i in a set of n linear equations, with i = 1..n Requirement: n independent equations for n independent unknowns x i

4 Cramer’s Rule Solving Unknowns x i ∆ is the Characteristic Determinant, used in every equation, the denominator of x i N i are the numerators for x i Then for each x i its equation is: x i = N i / ∆ x 1 =N 1 / ∆ x 2 =N 2 / ∆ x 3 =N 3 / ∆

5 Steps for Cramer’s Rule To start, normalize! Order all equations by index i of the unknowns x i to be computed Requires a square matrix! If any unknown x i in equation j is not present, insert it with constant factor c i,j = 0 Compute the characteristic determinant ∆ for the denominator And then, for each unknown x i compute its associated numerator determinant N i Finally solve for all x i x i =N i / ∆

6 Steps for Cramer’s Rule Counting of rows and columns starts at 1; not at 0! Not like the first index of C or C++ arrays! Unknowns x i are to be computed Constants in each row i that multiply each unknown x j in column j are shown as c i,j The right hand side of = forms a separate column vector of result values R i

7 Equations for Cramer’s Rule, With n=3 x 1 * c 1,1 + x 2 * c 1,2 + x 3 * c 1,3 =R 1 x 1 * c 2,1 + x 2 * c 2,2 + x 3 * c 2,3 =R 2 x 1 * c 3,1 + x 2 * c 3,2 + x 3 * c 3,3 =R 3 The 3 unknowns x i to be computed are x 1 x 2 x 3

8 Cramer’s Rule: ∆ Write the characteristic determinant ∆ by listing only and all coefficients c i,j in the n rows and n columns Then write the single column for the vertical Results vector R |c 1,1 c 1,2 c 1,3 || R 1 | ∆ =|c 2,1 c 2,2 c 2,3 |[R]=| R 2 | |c 3,1 c 3,2 c 3,3 || R 3 |

9 Cramer’s Rule: ∆ Pick an arbitrary column, e.g. column 1, then remove one of its elements c i,1 i=1..n at a time, starting with row 1 Generate the next minor matrix, by eliminating the whole row i and column j, initially j = 1; etc. for all rows 1..n Multiply the remaining minor matrix by that constant c i,1 and by its sign; sign = (-1) row+col here = (-1) i+1 ∆ = c1,1|c2,2c2,3| - c2,1|c1,2 c1,3| + c3,1|c1,2 c1,3| |c3,2c3,3| |c3,2 c3,3| |c2,2 c2,3| ∆ =c1,1 *( c2,2 * c3,3 - c3,2 * c2,3 ) -c2,1 * ( c1,2 * c3,3 - c3,2 * c1,3 ) +c3,1 * ( c1,2 * c2,3 - c2,2 * c1,3 )

10 Cramer’s Rule: Numerator N i = N 1 Starting with the Characteristic Determinant ∆ Replace i th column for computing x i, and replace that column by result vector [R]; so for x 1 we generate: |R 1 c 1,2 c 1,3 | N 1 =|R 2 c 2,2 c 2,3 | |R 3 c 3,2 c 3,3 | N 1 = R 1 |c 2,2 c 2,3 | - R 2 |c 1,2 c 1,3 | + R 3 |c 1,2 c 1,3 | |c 3,2 c 3,3 ||c 3,2 c 3,3 ||c 2,2 c 2,3 | N 1 = R 1 *( c 2,2 * c 3,3 - c 3,2 * c 2,3 ) - R 2 *( c 1,2 * c 3,3 - c 3,2 * c 1,3 ) + R 3 *( c 1,2 * c 2,3 – c 2,2 * c 1,3 )

11 Cramer’s Rule: Numerator N 2 |c 1,1 R 1 c 1,3 | N 2 =|c 2,1 R 2 c 2,3 | |c 3,1 R 3 c 3,3 | N 2 = c 1,1 |R 2 c 2,3 | - c 2,1 |R 1 c 1,3 | + c 3,1 | R 1 c 1,3 | |R 3 c 3,3 | |R 3 c 3,3 || R 2 c 2,3 | N 2 = c 1,1 * ( R 2 * c 3,3 - R 3 * c 2,3 ) - c 2,1 * ( R 1 * c 3,3 - R 3 * c 1,3 ) + c 3,1 * ( R 1 * c 2,3 - R 2 * c 1,3 )

12 Cramer’s Rule: Numerator N 3 |c 1,1 c 1,2 R 1 | N 3 =|c 2,1 c 2,2 R 2 | |c 3,1 c 3,2 R 3 | N 3 =c 1,1 | c 2,2 R 2 | - c 2,1 |c 1,2 R 1 | + c 3,1 |c 1,2 R 1 | | c 3,2 R 3 | |c 3,2 R 3 ||c 2,2 R 2 | N 3 =c 1,1 * ( R 3 * c 2,2 - R 2 * c 3,2 ) - c 2,1 * ( R 3 * c 1,2 - R 1 * c 3,2 ) + c 3,1 * ( R 2 * c 1,2 - R 1 * c 2,2 )

13 Cramer’s Rule: Solve for x i For each x i its equation is: x i = N i / ∆ x 1 =N 1 / ∆ x 2 =N 2 / ∆ x 3 =N 3 / ∆

14 Sample Problem, [1] Appendix A -9 * v * v * v 1 = * v * v * v 1 = 3 -8 * v * v * v 2 = 50 Below are 3 sample equations for some fictitious circuit The 3 unknowns v i to be computed are v 1 v 2 v 3

15 Sample Problem, [1] Appendix A 21 * v * v * v 3 = * v * v * v 3 = 3 -8 * v * v * v 3 = 50 All 3 equations normalized, i.e. sorted by index, for unknowns v 1 v 2 v 3

16 Characteristic Determinant ∆ Now write result column and the characteristic determinant ∆ by listing the coefficients c i,j only | || -33| ∆ =| |[R] =| 3| | || 50| ∆ = 21| 6-2| - (-3)|-9-12 | -8|-9-12| |-422||-4 22 || 6 -2| ∆ = 21*(132-8) + 3*( ) - 8*(18+72) ∆ = 2,604 – = 1,146

17 Numerator N 1 Replace column 1 with column vector [R] | | N 1 =| | | | N 1 = -33 |6 -2| - 3|-9 -12| + 50|-9 -12| |-4 22||-4 22|| 6 -2| N 1 =-33*(124) - 3*(-246) + 50*(18+72) N 1 =1,146

18 Numerator N 2 Replace column 2 with column vector [R] | | N 2 =| | | | N 2 = 21 | 3 -2| + 3| | - 8| | |50 22|| || 3 -2 | Students compute N 2 in class!

19 Numerator N 2 Replace column 2 with column vector [R] | | N 2 =| | | | N 2 =21| 3 -2| + 3| |-8| | |5022|| 50 22|| 3 -2| N 2 =21*(166) + 3*(-126) - 8*(102) N 2 =3,486 – 378 – 816 = 2,292

20 Numerator N 3 Replace column 3 with column vector [R] | | N 3 =|-3 6 3| | | N 3 = 21 | 6 3| + 3| | - 8| | |-4 50||-4 50 || 6 3 | Students compute N 3 in class!

21 Numerator N 3 Replace column 3 with column vector [R] | | N 3 =| | | | N 3 = 21 | 6 3| + 3| | - 8|-9 -33| |-4 50||-4 50 || 6 3 | N 3 =21*(312) + 3*(-582) - 8*(171) N 3 =6,552 – 1,746 – 1,368 = 3,438

22 Cramer’s Rule: Solve for v 1, v 2, and v 3 For all v i the results are: v i =N i / ∆ v 1 =N 1 / ∆=1,146 / 1,146 = 1 V v 2 =N 2 / ∆=2,292 / 1,146 = 2 V v 3 =N 3 / ∆=3,438 / 1,146 = 3 V

23 What if? What would the result be, if we had expanded the characteristic determinant ∆ along the 3 rd column? Let’s see: | | ∆ =| | | | ∆ = -12|-3 6| -(-2)|21-9 | + 22| 21-9 | |-8 -4| |-8-4 || -3 6 | ∆ = -12*(12+48) + 2*(-84-72) + 22*(126-27) ∆ = -720 – ,178= 1,146 <- same result!!

24 What if? One of the wonders of Cramer’s Rule: we may expand the characteristic determinant ∆ in whichever way we like, along any column, along any row! Result is consistently the same That is mathematical beauty!