Download solve mat

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Eigenvalues and eigenvectors wikipedia , lookup

Jordan normal form wikipedia , lookup

Determinant wikipedia , lookup

Singular-value decomposition wikipedia , lookup

Matrix (mathematics) wikipedia , lookup

System of linear equations wikipedia , lookup

Non-negative matrix factorization wikipedia , lookup

Perron–Frobenius theorem wikipedia , lookup

Orthogonal matrix wikipedia , lookup

Matrix calculus wikipedia , lookup

Cayley–Hamilton theorem wikipedia , lookup

Matrix multiplication wikipedia , lookup

Transcript
5
Systems and
Matrices
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
1
5.8
Matrix Inverses
• Identity Matrices
• Multiplicative Inverses
• Solving Systems Using Inverse Matrices
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
2
Identity Matrices
By the identity property for real numbers,
a 1 a
and 1 a  a
for any real number a. If there is to be a
multiplicative identity matrix I, such that
AI  A
and IA  A,
for any matrix A, then A and I must be square
matrices of the same dimension.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
3
2  2 Identity Matrix
If I2 represents the 2 x 2 identity
matrix, then
1 0 
I2  
.

0 1
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
4
Identity Matrices
To verify that I2 is the 2  2 identity matrix, we must
show that AI = A and IA = A for any matrix A. Let
x y 
A
.

z w 
Then
 x y  1 0   x 1  y 0
AI  




 z w  0 1  z 1  w 0
x y 

 A,

z w 
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
x 0  y 1
z 0  w 1
5
Identity Matrices
and
1 0   x y  1 x  0 z 1 y  0 w 
IA  





0 1  z w  0 x  1 z 0 y  1 w 
x y 

 A.

z w 
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
6
n  n Identity Matrix
The n x n identity matrix is In, where
The element aij = 1 when i = j (the diagonal
elements) and aij = 0 otherwise.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
7
Example 1
VERIFYING THE IDENTITY
PROPERTYOF I3
0
 2 4
9 .
Let A   3 5


 0 8  6 
Give the 3  3 identity matrix I3 and show that AI3 = A.
Solution
The 3  3 identity matrix is
1 0 0 
I3   0 1 0  .


0 0 1
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
8
Example 1
VERIFYING THE IDENTITY
PROPERTYOF I3
By the definition of matrix multiplication,
0  1 0 0 
 2 4
AI3   3 5
9  0 1 0 



 0 8  6  0 0 1
 2
 3

 0
0
5 9   A.

8  6 
4
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
9
Multiplicative Inverses
For every nonzero real number a, there is a
multiplicative inverse 1 that satisfies both of the
a
following.
1
a
 1 and
a
1
1
a  1.
a
(Recall: is also written a– 1.) In a similar way,
a
if A is an n  n matrix, then its multiplicative
inverse, written A–1, must satisfy both of the
following.
1
AA  In
and
1
A A  In .
This means that only a square matrix can
have a multiplicative inverse.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
10
a-1
1
a
Caution Although
= for any
nonzero real number a, if A is a matrix,
then
1
1
A  .
A
We do not use the symbol
number and A is a matrix.
1
A
, since 1 is a
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
11
Multiplicative Inverses
To find the matrix A–1 we use row transformations,
introduced earlier in this chapter. As an example,
we find the inverse of
2 4 
A
.

1  1
Let the unknown inverse matrix be symbolized
as follows.
x
A 
z
1
y
.

w
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
12
Multiplicative Inverses
By the definition of matrix inverse, AA–1 = I2.
2 4   x y  1 0 
AA  

.




1  1  z w  0 1
1
Use matrix multiplication for the product above.
 2 x  4z
 xz

2y  4w  1 0


y  w  0 1
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
13
Multiplicative Inverses
Set the corresponding elements equal to
obtain a system of equations
2 x  4z  1
(1)
2y  4w  0
(2)
xz 0
(3)
y w 1
(4)
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
14
Multiplicative Inverses
Since equations (1) and (3) involve only x and z,
while equations (2) and (4) involve only y and w,
these four equations lead to two systems of
equations.
2 x  4z  1
xz 0
and
2y  4w  0
y w 1
Write the two systems as augmented matrices.
4 1
2
1  1 0 


and
4 0
2
1  1 1  .


Copyright © 2013, 2009, 2005 Pearson Education, Inc.
15
Multiplicative Inverses
Each of these systems can be solved by the
Gauss-Jordan method. However, since the
elements to the left of the vertical bar are
identical, the two systems can be combined into
one matrix.
4 1
2
1  1 0 


and
yields
4 0
2
1  1 1 


4 1 0
2
1  1 0 1 .


Copyright © 2013, 2009, 2005 Pearson Education, Inc.
16
Multiplicative Inverses
We can solve simultaneously using matrix row
transformations. We need to change the numbers on
the left of the vertical bar to the 2 x 2 identity matrix.
1
2

1 0 1 
4 1 0 
Interchange R1 and R2 to
get 1 in the upper left-hand
corner.
1
0

1 0
1
6 1  2
–2R1 + R2
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
17
Multiplicative Inverses
1

0


1


0

1 0
1
1
6
1
1
 
3
1
2
0
6
3

1
1
1

6
3
1
R2
6
R2 + R1
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
18
Multiplicative Inverses
The numbers in the first column to the right of the
vertical bar in the final matrix give the values of x
and z. The second column gives the values of y
and w. That is,

1
0
1 0 x y  
0 1 z w   

 0 1

1
6
1
6
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
2
3

1

3
19
Multiplicative Inverses
so that
1
x y  6
1
A 


z w   1
6
2
3
.
1

3
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
20
Multiplicative Inverses
To check, multiply A by A–1. The result should be I2.
1
2 4   6
1
AA  


1  1  1
6
1 2

3 3

1
1
 
6 6
2
3

1

3
4 4
 
1 0 
3 3
 I2
 

2 1
0 1


3 3
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
21
Multiplicative Inverses
Thus,
1
6
1
A 
1
6
2
3
.
1

3
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
22
Finding an Inverse Matrix
To obtain A–1 for any n  n matrix A for which
A–1 exists, follow these steps.
Step 1 Form the augmented matrix [A  In]
where In is the n  n identity matrix.
Step 2 Perform row transformations on [A  In] to
obtain a matrix of the form [In  B].
Step 3 Matrix B is A–1.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
23
Note
To confirm that two n  n
matrices A and B are inverses of each
other, it is sufficient to show that AB = In.
It is not necessary to show also that BA = In.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
24
FINDING THE INVERSE OF A 3  3
MATRIX
Example 2
1
Find A–1 if A   2

3
Solution
0
2
0
1
 1 .

0 
Use row transformations as follows.
Step 1 Write the augmented matrix [A  I3].
1
2

3
0
2
0
0

1 0 1 0

0 0 0 1
1 1 0
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
25
Example 2
FINDING THE INVERSE OF A 3  3
MATRIX
Step 2 Since 1 is already in the upper left-hand
corner as desired, begin by using the row
transformation that will result in 0 for the
first element in the second row. Multiply
the elements of the first row by –2 and add
the result to the second row.
1
0

3
0
1
2
0
3
0
0

2 1 0

0 0 1
1 0
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
–2R1 + R2
26
Example 2
FINDING THE INVERSE OF A 3  3
MATRIX
To get 0 for the first element in the third row,
multiply the elements of the first row by –3 and
add to the third row.
1
0

0
0
2
0
0
3 2 1 0

 3  3 0 1 
1
1
0
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
–3R1 + R3
27
Example 2
FINDING THE INVERSE OF A 3  3
MATRIX
To get 1 for the second element in the second row,
multiply the elements of the second row by –½.
1

0

0
0
1
0
1
1 0 0

3
1
1 
0
2
2

 3  3 0 1 
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
–½ R2
28
FINDING THE INVERSE OF A 3  3
MATRIX
Example 2
To get 1 for the third element in the third row,
multiply the elements of the third row by –⅓ .

1

0


0

0
1
0
1
3
2
1
1
1
1

0
0

1

0
2

1
0  
3
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
–⅓ R2
29
FINDING THE INVERSE OF A 3  3
MATRIX
Example 2
To get 0 for the third element in the first row,
multiply the elements of the third row by –1 and
add to the first row

1

0


0

0
0
1
3
2
0
1
1
0
0
3

1
1 
0 
2

1
1
0  
3
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
–1R3 + R1
30
FINDING THE INVERSE OF A 3  3
MATRIX
Example 2
To get 0 for the third element in the second row,
multiply the elements of the third row by –3/2 and
add to the second row.

1


0


0

0
0
0
1
0
1

2
0
1
1
1
0
3

1
1

2
2
1
0  
3
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
–3/2 R3 + R2
31
Example 2
FINDING THE INVERSE OF A 3  3
MATRIX
Step 3 The last transformation shows that the
inverse is

0


1
1

A  
 2

 1

1
0
3

1
1

.
2
2
1
0  
3
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
32
Example 3
INDENTIFYING A MATRIX WITH
NO INVERSE
2

Find A–1, if possible, given that A  
1
Solution
 4
.

 2
Using row transformations to change the first
column of the augmented matrix
2
1

 4 1 0
 2 0 1
results in the following matrices.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
33
Example 3

1


1
2
2
INDENTIFYING A MATRIX WITH
NO INVERSE
1

0
2

0 1
and
1


1

2
0


2

.
0 0  1 1 


2
1
2
(We multiplied the elements in row one by
in the first step, and in the second step we
added the negative of row one to row two.) At
this point, the matrix should be changed so
that the second row, second element will be 1.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
34
Example 3

1


1
2
2
INDENTIFYING A MATRIX WITH
NO INVERSE
1

0
2

0 1
and
1


1

2
0


2

.
0 0  1 1 


2
Since that element is now 0, there is no way to
complete the desired transformation, so A–1 does
not exist for this matrix A. Just as there is no
multiplicative inverse for the real number 0, not
every matrix has a multiplicative inverse. Matrix A is
an example of such a matrix.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
35
Solving Systems Using Inverse
Matrices
Matrix inverses can be used to solve square
linear systems of equations. (A square system
has the same number of equations as
variables.) For example, consider the following
linear system of three equations with three
variables.
a11x  a12 y  a13z  b1
a21x  a22 y  a23z  b2
a31x  a32 y  a33z  b3
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
36
Solving Systems Using Inverse
Matrices
The definition of matrix multiplication can be
used to rewrite the system using matrices
a11
a
 21
a31
a12
a22
a32
a13 

a23

a33 
 x  b1 
 y   b 
   2
 z  b3 
(1)
(To see this, multiply the matrices on the left.)
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
37
Solving Systems Using Inverse
Matrices
a11

If A  a21

a31
a12
a22
a32
a13 

a23 ,

a33 
b1 
x 




X  y , B  b2 ,
 
 
b3 
 z 
then the system given in (1) becomes AX = B.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
38
Solving Systems Using Inverse
Matrices
If A–1 exists, then both sides of AX = B can be
multiplied on the left as shown.
A1( AX )  A1B
1
1
( A A)( X )  A B
I3 X  A1B
1
X A B
Associative property
Inverse property
Identity property
Matrix A–1B gives the solution of the system.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
39
Solution of the Matrix
Equation AX = B
If A is an n  n matrix with inverse A–1, X is
an n  1 matrix of variables, and B is an
n  1 matrix, then the matrix equation
AX  B
has the solution
X  A1B.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
40
SOLVING SYSTEMS OF EQUATIONS
USING MATRIX INVERSES
Example 4
Use the inverse of the coefficient matrix to solve
each system.
(a) 2 x  3 y  4
x  5y  2
Solution
The system can be written in matrix form as
2
1

 3  x   4
  ,



5   y  2
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
41
Example 4
SOLVING SYSTEMS OF EQUATIONS
USING MATRIX INVERSES
where
2
A
1
 3
,

5
x 
4
X    , and B    .
y 
2 
An equivalent matrix equation is AX = B with
solution X = A–1B. Use the methods described in
this section to determine that
3 
 5
 13 13 
1
A 
.
2
 1
 13 13 
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
42
Example 4
SOLVING SYSTEMS OF EQUATIONS
USING MATRIX INVERSES
Now, find A–1B.
3
 5
 13 13   4  2
1
A B
   
2   2  0 
 1
 13 13 
Since X = A–1B
 x   2
X      .
 y  0 
The final matrix shows that the solution set of
the system is {(2, 0)}.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
43
Example 4
SOLVING SYSTEMS OF EQUATIONS
USING MATRIX INVERSES
Use the inverse of the coefficient matrix to solve
each system.
x  z  1
2 x  2y  z  5
3x  6
Solution
(b)
The coefficient matrix A for this system is
0
1
1
A  2  2  1 ,


0
0
3
and its inverse A–1 was found in Example 2.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
44
Example 4
SOLVING SYSTEMS OF EQUATIONS
USING MATRIX INVERSES
x 
Let X   y 
 
 z 
and
 1 
B   5 .
 
 6 
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
45
SOLVING SYSTEMS OF EQUATIONS
USING MATRIX INVERSES
Example 4
Since we have X = A–1B, we have

0

x  
 y    1
   2
 z  
 1

A–1
0
1

2
0
1
3  1
 
2

1 
5   1.
2 
 
6 



 3 
1
 
3
from Example 2
The solution set is
{(2,1, –3)}.
Copyright © 2013, 2009, 2005 Pearson Education, Inc.
46