MathSEMINAR2 - Mercer University

advertisement
MATHEMATICAL SKILLS SEMINARS
ESSENTIAL ENGINEERING
MATHEMATICAL SKILLS
by
Clayton R. Paul
Professor, ECE Department
School of Engineering
Mercer University
Seminar #2
Solution of simultaneous, linear, algebraic
equations
(1) Linear, algebraic equations; how to identify
them
(2) Where do they arise, meaning of a solution
(3) Cramer’s rule and symbolic solutions
(4) Gauss elimination
(5) Matrix algebra
(6) Exercises
II-2
Linear, algebraic equations; how to identify
them
(1) What do they look like?
(a) Two equations in two unknowns:
a11x1  a12x 2  b1
a 21x1  a 22x 2  b2
aij  equation i unknown x j
a ij and bi are known (given)
(b) Three equations in three unknowns:
a11x1  a12x 2  a13x 3  b1
a 21x1  a 22x 2  a 23x 3  b2
a 31x1  a 32x 2  a 33x 3  b3
(2) How do we identify them?
Algebraic Contains no derivatives:
Differential Equation: dx(t)  ax(t)  b(t)
dt
Linear unknown NOT raised to a power >1:
Nonlinear Equation: a11x2  a12x3  b1
1
2
II-3
My General Rules
I will never solve more than three equations
in three unknowns by hand.
I will reluctantly solve three equations in
three unknowns by hand.
I will always solve two equations in two
unknowns by hand.
Methods of Solution
(1) Cramers Rule (best for hand solution)
(2) Gauss Elimination (this is the method
computers use to solve and is less suitable for
hand calculation)
(3) Matrix Inverse (Matrix Algebra) (other
two are better methods)
II-4
What Do We Mean By A Solution?
Two equations in two unknowns:
a11x1  a12x 2  b1
a 21x1  a 22x 2  b2
These represent two straight lines in twodimensional space:
x2
a11x1  a12x 2  b1
a 21x1  a 22x 2  b2
X2
b1
X1
a 11
x1
b2
a 21
Other possibilities:
x2
x2
x1
No Solution
x1
Infinite Number of Solutions
The solution of three equations in three unknowns
represents the intersection of three planes in threedimensional space.
II-5
Cramer’s Rule
Determinants:
2  2:
a
a
11 12  a a  a a
11 22 12 21
a
a
21 22
3 3:
a11 a12 a13
a
a 21 a 22 a 23  a11 22
a
32
a 31 a 32 a 33
a
a
a
23  a
21
23
12 a
a
a
33
31
33
 a13
a
a
21
31
a
a
22
32
checkerboard sign pattern:
  
  
  
II-6
Cramer’s Rule:
a11x1  a12x 2  b1
a 21x1  a 22x 2  b2
b1
b2
x1  a
11
a 21
a12
b a b a
a 22
1 22 2 12
a12 = a a  a a
11 22 12 21
a 22
a11 b1
b a b a
a 21 b2
2 11 1 21
x2  a
=
11 a12 a a  a a
11 22 12 21
a 21 a 22
Example:
2x  3y  4
x  5y  6
4 3
4   5   3  6
6 5
2 2
x



2 3 2   5   1   3 13 13
1 5
2 4
2  6   1  4
1 6
16
16
y



2 3 2   5   1   3 13
13
1 5
“Sanity check it”
II-7
a11x1  a12x 2  a13x 3  b1
a 21x1  a 22x 2  a 23x 3  b2
a 31x1  a 32x 2  a 33x 3  b3
a11 b1 a13
a 21 b2 a 23
a 31 b3 a 33
x2 
a11 a12 a13
a 21 a 22 a 23
a 31 a 32 a 33
Example:
x  3y  z  4
2x  4y  2z  3
3x  y  z  2
1
3
4
2 4 3
z
1
4 3
3
2 3
4
2 4
3 1 2
1 2 3 2 3 1 60
15

 
1 3 1
4 2 2 2 2 4 8
2
1
3
1
2 4 2
1 1 3 1 3 1
3 1 1
II-8
Cramer’s Rule is Very Useful For Symbolic
Equation Solution
Example: (Laplace Transform)
2s  4I1s  4I2s  1s
4I1s   3s  5I 2 s  0
1
s
0
4
3s  5

I1 s 
2s  4 4
4
3s  5
1
  3s  5
s

2s  4  3s  5   4   4
3s  5





s 6s 2  22s  4
II-9
Gauss Elimination
Gauss Elimination seeks to reduce the equations to
Upper Triangular Form using elementary row
operations:
(a) you can multiply an equation by any nonzero
number
(b) you can add or subtract any two equations
and replace one with that result.
These two operations do not change the solution.
a11x1  a12x 2  a13x 3  b1
c11x1  c12x 2  c13x 3  d1
a 21x1  a 22x 2  a 23x 3  b2 
0  c22x 2  c23x 3  d2
0  0  c33x 3  d3
a 31x1  a 32x 2  a 33x 3  b3
Once triangular form is achieved, back substitute
to get solution:
d
x3  3
c33
d
c
x 2  2  23 x 3
c22 c22
d
c
c
x1  1  12 x 2  13 x 3
c11 c11
c11
II-10
Example:
x  3y  z  4
2x  4y  2z  3
3x  y  z  2
multiply row 1 by -2, and add result to row 2 and
replace row 2 with result:
x  3y  z  4
0  10y  4z  5
3x  y  z  2
multiply row 1 by -3, and add result to row 3 and
replace row 3 with result:
x  3y  z  4
0  10y  4z  5
0  8y  4z  10
multiply row 2 by -8/10, and add result to row 3 and
replace row 3 with result:
x  3y  z  4
0  10y  4z  5
4
0  0  z  6
5
Now solve by back substitution:
z  6   15
4
2
5
10y  4  15   5 or y   5
2
2
x  3  5     15   4 or x  4
2
2
II-11
Matrix Algebra
A matrix is an ordered array of elements:
a12 
a
11


A
a
a 22 
 21
A
a

 11 


a12 


a

 13 
a
A   11
a
 21
a12 a13 

a 22 a 23 
A matrix with n rows and m columns is said to be
nm.
Special types of matrices:
(a) Square matrix nn:
a
 11
A  a 21

a
 31
a12 a13 
a 22 a 23 

a 32 a 33 
(b) Symmetric matrix a ij  a ji (must be square):
a
 11
A  a12

a
 13
a12 a13 
a 22 a 23 

a 23 a 33 
(c) Identity matrix (must be square):
1

13  0

0
0 0
1 0
II-12

0 1
Matrix algebra
(1) Addition (add corresponding elements):
a
A   11
a
 21
b
B   11
b21
a12 a13 

a 22 a 23 
  a

  11  b11
AB  
 b21
 a
 21
 a

 12  b12 
 a

 22  b22 
b12 b13 
b22 b23 
 a
 
 13  b13  

 a
 

b
 23
23 
Note:
(a) In order to add two matrices, their numbers of
rows must be the same and their numbers of
columns must be the same.
(b) Resulting matrix is of dimension of either,
nm+ nm= nm.
(2) Subtraction (subtract corresponding elements)
  a

  11  b11
AB  
 b21
 a
 21
 a

 12  b12 
 a

 22  b22 
II-13
 a
 
 13  b13 

 a
 

b
 23
23 
(3) Multiplication

 
A  B      


  

B

A
a
A   11
a
 21
a12 a13 

a 22 a 23 
b 
 11 
B  b12 


b 
 13 
a11b11  a12b12  a13b13 
a21b11  a22b12  a23b13

A  B  


Note:
(a) In order to multiply A and B in the order AB,
number of columns of A must equal number of
rows of B.
(b) The resulting matrix is of dimension
number rows of Anumber of columns of B:
(np)(pm) = nm
Example:
 4

A   2

2
1
3 

5 
3
B   
1
   
 
 
 
4  3  1  1   13 

 


 
A  B   2  3  3  1    3 

 

 2  3  5  1  11


 
II-14
(4) “Division”, Matrix Inverse
Scalar inverse: a  a 1  a 1  a  1 .
Matrix Inverse: (A is nn)
A  A1  A1  A  1n
How Calculate?
Let A 1 be nn and have n columns:
A1  C  C1 C2  Cn 
Solve for these using Cramer’s rule:
A  A 1  A  C  1n
1
 
 
0
A  C1   

 
0
 
, A  C2
0
 
 
1
  

 
0
 
II-15
1


0
 


0

0  0
1  0

  

0  1
, ..... , A  Cn
0
 
 
0
  

 
1
 
For Example:
C2
c

 21 
c

 22 


  


c

 2n 
a11 0  a1n
a 21 1  a 2n

 

a
c22  a n1
11
a 21
0  a nn
a12  a1n
a 22  a 2n




a n1 a n2  a nn
Writing Linear, Algebraic Equations in Matrix
Form:
a11x1  a12x 2  a13x 3  b1
a 21x1  a 22x 2  a 23x 3  b2
a 31x1  a 32x 2  a 33x 3  b3
AX  B
where
a
 11
A  a 21

a
 31
Solution:
a12 a13 
a 22 a 23 

a 32 a 33 
x 
 1
X  x 2 


x 
 3
X  A 1B
II-16
b 
 1
B  b2 


b 
 3
Finding A-1 : 33 Matrices
a
 11
A  a 21

a
 31
a12 a13 
a 22 a 23 

a 32 a 33 
II-17
x  3y  z  4
2x  4y  2z  3
3x  y  z  2
Example:
AX  B
1

A  2

3
1
3
A  2 4
3
1
A1 

1
2  1
1
6


4

14
x 
 
X  y
 
 z
2 
4
1
1
A
1
3
1 
4 2
1
4
4
8
1
 3
2 
2 2
3 1
 3 4

 
4     1 2
 
10  7 4
B
  1 
12
A 1
 4 



   5 2 


 15 2
II-18
2 4
3
1
1 4
 1 2 1 2
1
1 2 1 4 4
x   3 4

 
 y    1 2  1 2 1 2   3
  
  

  
 
z   7 4 1 5 4 2


 
X
4
 
 
3
 
2
B

5 4
 8
Important Special Case: 22 Matrices
a
A   11
a
 21
a12 

a 22 
The inverse is:
c12 
c
11

1


A 
c
c 22 
 21

1


0

0

1

a11 1 
a12
a 22
a12
a12 0 

a11 0 
a 22
a12

1 

A
Therefore
a12 
 a
22
1

1


A  
A a 21 a11 
Note that the inverse of a 2  2 matrix is
obtained by
(1) swapping the main-diagonal terms
(2) negating the off-diagonal terms, and
(3) dividing all terms by the determinant of A
II-19
Example:
a11x1  a12x 2  b1
a 21x1  a 22x 2  b2
These are, in matrix form,
a12   x1   b 
a
11


   1
a


a 22  x 2  b 
 21
2


  
A
X
B
X  A 1B


1  a 22 a12  b1 
A a 21 a11  b 2 


a
b1  a12b 2 
1
22




a11a 22  a12a 21 a 21b1  a11b 2 
x 
 1 
x 
 2
giving the solutions as
a 22b1  a12b 2
x1 
a11a 22  a12a 21

x2 
a 21b1  a11b 2

a11a 22  a12a 21
II-20
Example:
2x  3y  4
x  5y  6
or
2
3 x  4

  

  y  
6
1
5  

A
x 
 
 y
 
1 5 3 4
A  1 2 6
X
B
 5  4  3  6

1



 2  5  1  3  
       1  4  2  6 

1 2
13 16 
 2


  13 
 16
13


II-21
EXERCISES
Exercise 1:
Find X, such that
3x 1x  x  4
1
2 3
 4x  2x  2x  3
1
2
3
3x  x  x  2
1 2 3
II-22
Download