1320_Lec_04_adjoint-cramer_noauto

advertisement
Fundamentals of Engineering Analysis
EGR 1302 - Adjoint Matrix and Inverse Solutions, Cramer’s Rule
Slide 1
© 2005 Baylor University
The Adjoint Matrix and the Inverse Matrix
Recall the Rules for the Inverse of a 2x2:
1. Swap Main Diagonal
2. Change sign of a12, a21
3. Divide by determinant
 a22  a12 
1
A 
*

 a21 a11  det A
 a22
Cf A  
 a12
1
 a22  a12 
Cf A  


a
a
11 
 21
T
 a11
A
a 21
 a22  a12 
adjA  


a
a
11 
 21
And we see that the Inverse is defined as
© 2005 Baylor University
 a21 
a11 
If the Cofactor Matrix is “transposed”,
we get the same matrix as the Inverse
And we define the “Adjoint” as the
“Transposed Matrix of Cofactors”.
Slide 2
a12 
a 22 
A
1
adjA

det A
Calculating the Adjoint Matrix and A-1
2 0 1 
A  2  2 2
0 4 1 
2

 4
 0
Cf A  
 4
 0
2

2
2 2
1
1
0 1
2 1
1
1
2
0 1
2 1
2 2
2 2

0 4 
2 0 

0 4 
2 0 
2  2 
 10  2 8 
  4
2  8 
 2
 2  4
2
 10 4
  2 2  2
adjA =


 8
 8  4
1
A 
det
-12A
detA
Slide 3
© 2005 Baylor University
Problem 7.13 in the Text
Complexity of Large Matrices
Consider the 5x5 matrix, S
1
 3

S 0

 2
 1
0
2
4
1
1
1
1 
1
2  2
0
1
3

7 2 1 
3 0
2 
2
To find the Adjoint of S (in order to find the inverse), would require
• Finding the determinants of 25 4x4s, which means
• Finding the determinants of 25*16 = 400 3x3s, which means
• Finding the determinants of 400*9 = 3600 2x2s. (Wow!)
Which is why we use computers
(and explains why so many problems could not be
solved before the advent of computers).
Slide 4
© 2005 Baylor University
Class Exercise: Find the Adjoint of A
1 2 3
A  4 5 6
7 8 9
adjA  ?
Work this out yourself before going to the solution on the next slide
Slide 5
© 2005 Baylor University
Class Exercise: Solution
 3
 3 6
adjA   6  12 6 
 3 6
 3
Notice that: detA = 0, therefore matrix A is singular.
This means that the Inverse
A
1
adjA

det A
does not exist.
However, even though the Determinant is zero, the Adjoint still exists.
Slide 6
© 2005 Baylor University
Cramer’s Rule
In many instances of complex problems, we may only need a partial solution.
As we have seen, calculating an inverse takes a lot of computing power.
However, calculating the determinant is much more manageable.
Before the days of electronic computers, mathematician Gabriel Cramer devise
a shortcut to the solution of linear systems. It also gives an explicit expression
for the solution of the system
Gabriel Cramer (1704-1752).
Slide 7
© 2005 Baylor University
Solving Systems of Linear Equations
A* x  d
given a
system
 a11
a
 21
 a 31
a12
a 22
a32
x  A1 * d
a13   x1   d 1 
a 23  *  x 2   d 2 
a 33   x3   d 3 
solved
 x1 
 d1 
as  x 2   adjA * d 2 
det A
 x3 
 d 3 
adjA* d
becomes
1
* (C11d1  C21d 2  C31d 3 )
det A
1
x2 
* (C12 d1  C 22 d 2  C32 d 3 )
det A
1
x3 
* (C13 d1  C 23 d 2  C33 d 3 )
det A
x1 
 x1 
 C11 d1  C 21 d 2  C 31 d 3 
 x   1 * C d  C d  C d 
22 2
32 3 
 2  det A  12 1
 x3 
C13 d1  C 23 d 2  C 33 d 3 
by row expansion
=
det A  (C11a11  C21a21  C31a31 )  a11
C11d1  C21d 2  C31d 3  d1
© 2005 Baylor University
a22
a23
a32
a33
a22
a23
a32
a33
 ... etc.
for x1 , replace d1 in Col 1.
which is the same form as:
Slide 8
where
C11 C 21 C 31 
adjA  C12 C 22 C 32 
C13 C 23 C 33 
 d2
a12
a13
a32
a33
 d3
a12
a13
a22
a23
d1
a12
a13
 d2
d3
a22
a32
a23
a33
Solution by Cramer’s Rule
1
* (C11d1  C21d 2  C31d 3 )
det A
1
x2 
* (C12 d1  C 22 d 2  C32 d 3 )
det A
1
x3 
* (C13 d1  C 23 d 2  C33 d 3 )
det A
x1 
Cramer’s Rule: Replace d in the column # of the unknown variable
you wish to find and solve for the “Ratio of Determinants”.
x1 
d1
a12
a13
a11
d1
a13
a11
a12
d1
d2
a22
a23
a21
d2
a23
a21
a22
d2
d 3 a32
a11 a12
a33
a13
a21
a22
a23
a21
a22
a23
a21
a22
a23
a31
a32
a33
a31
a32
a33
a31
a32
a33
Replace Col. 1 for x1
x2 
a31 d 3 a33
a11 a12 a13
Replace Col. 2 for x2
a31 a32 d 3
x3 
a11 a12 a13
Replace Col. 3 for x3
Cramer’s Rule is only valid for Unique Solutions.
If detA = 0, Cramer’s Rule fails!
Slide 9
© 2005 Baylor University
Solve a System of Equations with Cramer’s Rule
x1  2x2  x3  7
the system
2x  3x2  x3  2
of equations 1
x1  x2  2x3  5
x1 
in matrix
form is -
1 2  1   x1  7 
 2 3  1  *  x    2

  2  
1 1  2  x3  5
7 2
1
1 7
1
1 2 7
2 3
1
2 2
1
2 3 2
5 1  2  24

 12
1 2 1
2
2 3 1
1 1 2
 x1   12
x   x2    7 
 x3    5 
Slide 10
© 2005 Baylor University
x2 
1 5  2 14

7
1 2 1
2
2 3 1
1 1 2
x3 
1 1 5
 10

 5
1 2 1
2
2 3 1
1 1 2
Remember: “ratio of determinants”
Questions?
Slide 11
© 2005 Baylor University
Download