GE 111 – Topic 12

Anton. Section 2.3

1

pp 118-128

GE 111 Engineering Problem Solving

Nov 2014

12. Cramer’s Rule

Learning Outcomes

By the end of this subject the student will be able to:

1. Be able to find the matrix inverse using the Adjoint Method;

2. Solve (e.g. find x, y) a system of linear equations using

Cramer’s Rule.

2

GE 111 Engineering Problem Solving

Nov 2014

Matrix Inversion

How to calculate the matrix inverse?

1

A adj ( A)

A

1

Where adj (A) is the adjoint matrix.

The adjoint matrix of [A], Adj[A] is obtained by taking the transpose of the cofactor matrix of [A].

adj (A) = [cofactor (A)]T

Anton: 123

3

GE 111 Engineering Problem Solving

Nov 2014

Matrix Inversion: Example 1

1. Minor matrix

2 -4

5

-3

5

7

5

3 -8

2 -4

5

-3

5

7

5

3 -8

2 -4

-3

5

5

M11 =

5

7

3 -8

= -61

5(-8) – 7(3) = -61

M12 =

-3

7

5 -8

= -11

5

7

3 -8

M13 =

-3

5

5

3

= -34

Anton: 122-124; Examples 5 thru 7

4

GE 111 Engineering Problem Solving

Nov 2014

Matrix Inversion: Example 1

The resulting matrix of minors is:

-61 -11 -34

[M] =

17 -41

26

-53

-2

29

2. Cofactor matrix, Cij = (-1)i+j Mij

-61

[C] =

11 -34

-17 -41 -26

-53 -29

5

-2

GE 111 Engineering Problem Solving

Nov 2014

Matrix Inversion: Example 1 n 3. Determinant det(A) = |A| =

a1,j C1,j j=1 |A| = 2(-61) + -4(11) + 5(-34)

|A| = -336

4. Adjoint: adj [A] = [C]T

11 -34

-61 -17 -53

[C] = -17 -41 -26

[C]T = adj [A] = 11 -41 -29

-61

-53 -29

6

-2

GE 111 Engineering Problem Solving

-34 -26

-2

Nov 2014

Matrix Inversion: Example 1

5. Inverse using Adjoint method

A-1

A-1

7

=

1

-336

=

1 det(A) adj(A)

-61 -17 -53

0.182 0.051 0.158

11 -41 -29

= -0.033 0.122 0.086

-34 -26

-2

0.101 0.077 0.006

GE 111 Engineering Problem Solving

Nov 2014

Cramer’s Rule

A system of linear equations can be solved using:

Coefficient matrix

Determinant

ax + by = e

a b

cx + dy = f

det (A) =

8

c d a b c d

x

y

e

=

f

= ad - bc

GE 111 Engineering Problem Solving

Nov 2014

Cramer’s Rule for a 2x2 System

Linear Equations

Coefficient Matrix

Determinant

a b

A=

c d

det (A)

ax + by = e cx + dy = f e b x= f d = det (A)

e f a c a a e c c f

=

y= a det (A) c 9

b d b d =

ed – bf ad – bc

e af – ec f = ad – bc b d

GE 111 Engineering Problem Solving

Nov 2014

Example 2: Solve the System

System of linear equations Coefficient

Matrix

8 5

8x + 5y = 2

A =

2x - 4y = -10

2 -4

Determinant det (A) = 8(-4) – 5(2)

= -32 – 10 = -42

2 5

2(-4) – 5(-10)

42

-10

-4

x=

= 8(-4) – 5(2) = -42 = -1

-42

8 2 y = 2 -10 =

-42

10

8(-10) – 2(2) -84

8(-4) – 5(2) = -42 = 2

GE 111 Engineering Problem Solving

Solution: (-1,2)

Nov 2014

Example 3: Find x and y

System of linear equations Coefficient

Matrix

2 1

2x + y = 1

3x - 2y = -23

A =

3 -2

Determinant det (A) = 2(-2) – 1(3)

= -4 – 3 = -7

1 1

1(-2) – 1(-23) 21

-23

-2 x= = 2(-2) – 1 (3) = -7 = -3

-7

2 1 y = 3 -23

-7

11

=

2(-23) – 1(3) -49

2(-2) – 1(3) = -7 = 7

GE 111 Engineering Problem Solving

Solution: (-3,7)

Nov 2014

Key Points

The denominator consists of the determinant of coefficients matrix (x in the first column, and y in the second column).

The numerator is the same as the denominator, with the constants replacing the coefficients of the variable for which you are solving.

12

GE 111 Engineering Problem Solving

Nov 2014

Cramer’s Rule for a 3x3 System

System of linear equations ax + by + cz = j dx + ey + fz = k gx + hy + iz = l

Matrix format a b c x j

A=d e f X= y B= k g h i z l

Determinant a b c det (A) = d e f = aei + bgf + cdh – ceg – bdi - afh g h i

13

GE 111…