ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule

Slides:



Advertisements
Similar presentations
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.
Advertisements

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.
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/
Chapter 5 Determinants.
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.
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.
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.
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.
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.
Mathematics.
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.
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.
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.
Solving Systems of Linear equations with 3 Variables To solve for three variables, we need a system of three independent equations.
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.
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
1 ECE 221 Electric Circuit Analysis I Chapter 11 Source Transformations Herbert G. Mayer, PSU Status 10/28/2015.
Matrices Introduction.
Chapter 7: Systems of Equations and Inequalities; Matrices
Part 3 Chapter 9 Gauss Elimination
Chapter 4 Systems of Linear Equations; Matrices
Copyright © 2014, 2010, 2007 Pearson Education, Inc.
Section 4.1 Systems With Two Variables.
Linear Equations Gauss & Cramer’s
LINEAR ALGEBRA.
ECE 3301 General Electrical Engineering
MATHEMATICS Linear Equations
Algebra 2 Chapter 3 Section 3 Cramer’s Rule
Matrices, Determinants, and Cramer’s Rule
ECE 221 Electric Circuit Analysis I Chapter 9 Mesh-Current Method
Copyright © Cengage Learning. All rights reserved.
We will be looking for a solution to the system of linear differential equations with constant coefficients.
ECON 213 Elements of Mathematics for Economists
Instruction of Chapter 8 on
Chapter 10: Solving Linear Systems of Equations
MATRICES AND DETERMINANTS
System of Linear Equation (SLE)
Part 3 - Chapter 9.
Applying Determinants to solve Systems of Equations 2x2 & 3x3
Systems of Linear Equations in Engineering
Review of Matrix Algebra
Matrices.
Linear Systems Numerical Methods.
Chapter 7: Matrices and Systems of Equations and Inequalities
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 ( )
Variables.
Presentation transcript:

ECE 221 Electric Circuit Analysis I Chapter 6 Cramer’s Rule Herbert G. Mayer, PSU Status 10/4/2015

Syllabus Motivation Steps for Cramer’s Rule Cramer’s Rule: ∆ Cramer’s Rule: Numerator Ni Cramer’s Rule: Solve for xi Sample Problem

Motivation Circuit analysis 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 use a calculator  First learn to use determinants to solve n unknowns xi in a set of n linear equations, with i = 1..n Requirement: n independent equations for n independent unknowns xi

Cramer’s Rule Solving Unknowns xi Δ is Characteristic Determinant, used in every equation, computing the denominator of xi Ni are the numerators for xi Then for each xi its equation is: xi = Ni / Δ x1 = N1 / Δ x2 = N2 / Δ x3 = N3 / Δ

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

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 xi are to be computed Constants in each row i that multiply each unknown xj in column j are shown as ci,j The right hand side of = forms a separate column vector of result values Ri

Equations for Cramer’s Rule, With n=3 The 3 unknowns xi to be computed are x1 x2 x3 x1 * c1,1 + x2 * c1,2 + x3 * c1,3 = R1 x1 * c2,1 + x2 * c2,2 + x3 * c2,3 = R2 x1 * c3,1 + x2 * c3,2 + x3 * c3,3 = R3

Cramer’s Rule: ∆ Write the characteristic determinant ∆ by listing only and all coefficients ci,j in the n rows and n columns Then write the single column for the vertical Results vector R |c1,1 c1,2 c1,3| | R1| ∆ = |c2,1 c2,2 c2,3| [R] = | R2| |c3,1 c3,2 c3,3| | R3|  

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

Cramer’s Rule: Numerator Ni = N1 Starting with the Characteristic Determinant ∆ Replace ith column for computing xi, and replace that column by result vector [R]; so for x1 we generate: |R1 c1,2 c1,3| N1 = |R2 c2,2 c2,3| |R3 c3,2 c3,3|  N1 = R1 |c2,2 c2,3| - R2 |c1,2 c1,3| + R3 |c1,2 c1,3| |c3,2 c3,3| |c3,2 c3,3| |c2,2 c2,3| N1 = R1* ( c2,2 * c3,3 - c3,2* c2,3 ) - R2* ( c1,2 * c3,3 - c3,2* c1,3 ) + R3* ( c1,2 * c2,3 - c2,2* c1,3 )

Cramer’s Rule: Numerator N2 |c1,1 R1 c1,3| N2 = |c2,1 R2 c2,3| |c3,1 R3 c3,3| N2 = c1,1 |R2 c2,3| - c2,1 |R1 c1,3| + c3,1 |R1 c1,3| |R3 c3,3| |R3 c3,3| |R2 c2,3| N2 = c1,1 * ( R2 * c3,3 - R3* c2,3 ) - c2,1 * ( R1 * c3,3 - R3* c1,3 ) + c3,1 * ( R1 * c2,3 - R2* c1,3 )

Cramer’s Rule: Numerator N3 |c1,1 c1,2 R1| N3 = |c2,1 c2,2 R2| |c3,1 c3,2 R3| N3 = c1,1 | c2,2 R2 | - c2,1 |c1,2 R1 | + c3,1 |c1,2 R1 | | c3,2 R3 | |c3,2 R3| |c2,2 R2 | N3 = c1,1* ( R3 * c2,2 - R2* c3,2 ) - c2,1* ( R3 * c1,2 - R1* c3,2 ) + c3,1* ( R2 * c1,2 - R1* c2,2 )

Cramer’s Rule: Solve for xi For each xi its equation is: xi = N i / ∆ x1 = N1 / ∆ x2 = N2 / ∆ x3 = N3 / ∆

Sample Problem, [1] Appendix A Below are 3 sample equations for some fictitious circuit The 3 unknowns vi to be computed are v1 v2 v3 -9 * v2 - 12 * v3 + 21 * v1 = -33 -2 * v3 + 6 * v2 - 3 * v1 = 3 -8 * v1 + 22 * v3 - 4 * v2 = 50

Sample Problem, [1] Appendix A All 3 equations normalized, i.e. sorted by index, for unknowns v1 v2 v3 21 * v1 - 9 * v2 - 12 * v3 = -33 -3 * v1 + 6 * v2 - 2 * v3 = 3 -8 * v1 - 4 * v2 + 22 * v3 = 50

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

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

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

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

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

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

Cramer’s Rule: Solve for v1, v2, and v3 For all vi the results are: vi = N i / ∆ v1 = N1 / ∆ = 1,146 / 1,146 = 1 V v2 = N2 / ∆ = 2,292 / 1,146 = 2 V v3 = N3 / ∆ = 3,438 / 1,146 = 3 V

What if? What would the result be, if we had expanded the characteristic determinant ∆ along the 3rd column? Let’s see: |21 -9 -12| ∆ = |-3 6 -2| |-8 -4 22| ∆ = -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 – 312 + 2,178 = 1,146 <- same result!!

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!