Properties of Matrices

Download Report

Transcript Properties of Matrices

10TH
EDITION
COLLEGE
ALGEBRA
LIAL
HORNSBY
SCHNEIDER
5.7 - 1
5.7
Properties of Matrices
Basic Definitions
Adding Matrices
Special Matrices
Subtracting Matrices
Multiplying Matrices
Applying Matrix Algebra
5.7 - 2
Basic Definitions
It is customary to use capital letters to name
matrices. Also, subscript notation is often used
to name elements of a matrix, as in the
following matrix A.
a11 a12
a
a22
21

A  a31 a32


am1 am 2
a13
a23
a33
am 3
a1n 

a2 n

a3 n 


amn 
5.7 - 3
Basic Definitions
Certain matrices have special names: an
n x n matrix is a square matrix because
the number of rows is equal to the number
of columns. A matrix with just one row is a
row matrix, and a matrix with just one
column is a column matrix.
5.7 - 4
Basic Definitions
Two matrices are equal if they are the same
size and if corresponding elements,
position by position, are equal. Using this
definition, the matrices
2
3

1

 5
and
1
 5

2

3
are not equal (even though they contain the
same elements and are the same size), since
the corresponding elements differ.
5.7 - 5
Example 1
FINDING VALUES TO MAKE TWO
MATRICES EQUAL
Find the values of the variables for which each
statement is true, if possible.
a. 2 1  x
 p q    1

 
Solution
y

0
From the definition of equality, the only way
that the statement can be true is if
2 = x, 1 = y, p = –1 and q = 0.
5.7 - 6
Example 1
FINDING VALUES TO MAKE TWO
MATRICES EQUAL
Find the values of the variables for which each
statement is true, if possible.
 1
x  

b.
 y   4
 
0 
Solution
This statement can never be true since the two
matrices are different sizes. (One is 2  1 and the
other is 3  1. )
5.7 - 7
Addition of Matrices
To add two matrices of the same
size, add corresponding elements.
Only matrices of the same size can
be added.
5.7 - 8
ADDING MATRICES
Example 2
Find each sum, if possible.
5

a.
8

 6   4


9  8
Solution
5
8

6
 3 
 6   4


9  8
6
 3 
5  ( 4)  6  6 


8

8
9

(

3)


1 0 


16
6


5.7 - 9
Example 2
ADDING MATRICES
Find each sum, if possible.
2  6 
b. 5    3 
   
8  12 
Solution
2  6   4 
5    3    8 
     
8  12  20 
5.7 - 10
Example 2
ADDING MATRICES
Find each sum, if possible.
5
c. A + B, if A = 
6
8
and B =

2
3 9 1 
4 2 5


Solution
5
The matrices A  
6
8
3 9 1 
and B  


2
4
2
5


have different sizes so A and B cannot be
added; the sum does not exist.
5.7 - 11
Special Matrices
A matrix containing only zero elements is called
a zero matrix. A zero matrix can be written with
any size.
1  3 zero matrix
2  3 zero matrix
O  0
0
O
0
0
0
0
0
0
0 
5.7 - 12
Special Matrices
By the additive inverse property, each real
number has an additive inverse: if a is a real
number, then there is a real number such that
a  ( a )  0 and
 a  a  0.
5.7 - 13
Special Matrices
Given matrix A, there is a matrix – A such that
A + (– A) = . The matrix – A has as elements
the additive inverses of the elements of A.
(Remember, each element of A is a real number
and therefore has an additive inverse.) For
example, if
 5 2  1 
A
,

 3 4  6
then
 5 2 1
A
.

 3  4 6 
5.7 - 14
Special Matrices
To check, test that A + (– A) equals the zero
matrix, O
 5 2
A  (  A)  
 3 4
0 0 0 

 O.

0 0 0 
 1  5  2 1 


 6   3  4 6 
Matrix – A is called the additive inverse, or
negative, of matrix A. Every matrix has an
additive inverse.
5.7 - 15
Subtraction of Matrices
If A and B are two matrices of the
same size, then
A – B = A + (–B).
5.7 - 16
Example 3
SUBTRACTING MATRICES
Find each difference, if possible.

5
6

3
2




a.

2


4
5

8

 

Solution
2   5  ( 3) 6  2 
 5 6   3


2



4
5

8
2

5
4

(

8)

 
 

4
 2


 3 12 
5.7 - 17
Example 3
SUBTRACTING MATRICES
Find each difference, if possible.
b. 8
6
 4   3
5
 8
Solution
8
6
 4   3
5
 8   5 1 4 
5.7 - 18
Example 3
SUBTRACTING MATRICES
Find each difference, if possible.
 2 5 
c. A – B, if A = 
and B =

 0 1
3 
5 
 
Solution
The matrices
 2 5 
3 
and
A
B 

 0 1
5 
have different sizes and cannot be subtracted,
so the difference does not exist.
5.7 - 19
MULTIPLYING MATRICES BY
SCALARS
Find each product.
Example 4
2  3 
a. 5 

0
4


Solution
2
5
0
 3  5(2)


4  5(0)
10

 0
5( 3) 

5(4)
Multiply each element
of the matrix by the
scalar 5.
 15 
20 
5.7 - 20
MULTIPLYING MATRICES BY
SCALARS
Find each product.
Example 4
36 
3 20
b. 
4 12  16 
Solution
36  15
3 20



4 12  16   9
27 

 12
5.7 - 21
Properties of Scalar
Multiplication
If A and B are matrices of the same size
and c and d are scalars, then
(c  d )A  cA  dA
c ( A  B )  cA  cB
c ( A)d  cd ( A)
(cd )A  c (dA).
5.7 - 22
Matrix Multiplication
We have seen how to multiply a real number
(scalar) and a matrix. To find the product of two
matrices, such as
 3 4 2 
A

5
0
4


and
4
6
B   2
3 ,


 3  2 
5.7 - 23
Matrix Multiplication
first locate row 1 of A and column 1 of B, shown
shaded below.
 3 4 2 
A

5
0
4


and
4
6
B   2
3 ,


 3  2 
5.7 - 24
Matrix Multiplication
Multiply corresponding elements, and find the
sum of the products.
3( 6)  4(2)  2(3)  32
This result is the element for row 1, column 1 of
the product matrix. Now use row 1 of A and
column 2 of B to determine the element in row 1,
column 2 of the product matrix.
4
6
 3 4 2 

2
3
 5 0 4 



 3  2 
 3( 4)  4(3)  2( 2)  4
5.7 - 25
Matrix Multiplication
Next, use row 2 of A and column 1 of B; this will
give the row 2, column 1 entry of the product
matrix.
4
6
 3 4 2 

2
3
 5 0 4 



 3  2 
5( 6)  0( 2)  4(3)  18
Finally, use row 2 of A and column 2 of B to find the
entry for row 2, column 2 of the product matrix.
4
6
 3 4 2 

2
3
 5 0 4 



 3  2 
5( 4)  0(3)  4( 2)  12
5.7 - 26
Matrix Multiplication
The product matrix can now be written.
4
6
 3 4 2 
 32

2
3

 5 0 4 
 18




 3  2 
 4
12 
5.7 - 27
Matrix Multiplication
To find the ith row, jth column element of
AB, multiply each element in the ith row of
A by the corresponding element in the jth
column of B. (Note the shaded areas in
the matrices below.) The sum of these
products will give the row i, column j
element of AB.
5.7 - 28
Matrix Multiplication
a11 a12
a
a22
21


A
a
a
i
1
i2



am1 am 2
a13
a23
ai 3
am 3
a1n 

a2 n



ain 


amn 
5.7 - 29
Matrix Multiplication
b11

b21

B


bn1
b12
b1 j
b22
b2 j
bn 2
bnj
b1p 

b2 p 


bnp 
5.7 - 30
Matrix Multiplication
The number of columns of an m  n matrix
A is the same as the number of rows of an
n  p matrix B (i.e., both n). The element cij
of the product matrix C = AB is found as
follows:
cij  ai 1b1 j  ai 2b2 j 
 ain bnj .
Matrix AB will be an m  p matrix.
5.7 - 31
DECIDING WHETHER TWO
MATRICES CAN BE MULTIPLIED
Suppose A is a 3  2 matrix, while B is a 2  4 matrix.
Example 5
a. Can the product AB be calculated?
Solution
The following diagram shows that AB can be
calculated, because the number of columns of A
is equal to the number of rows of B. (Both are 2.)
Matrix A
Matrix B
32
24
must match
size of AB
34
5.7 - 32
DECIDING WHETHER TWO
MATRICES CAN BE MULTIPLIED
Suppose A is a 3  2 matrix, while B is a 2  4 matrix.
Example 5
b. If AB can be calculated, what size is it?
Solution
As indicated in the diagram below, the
product AB is a 3 x 4 matrix.
Matrix A
32
Matrix B
24
must match
size of AB
34
5.7 - 33
DECIDING WHETHER TWO
MATRICES CAN BE MULTIPLIED
Suppose A is a 3  2 matrix, while B is a 2  4 matrix.
Example 5
c. Can BA be calculated?
Solution
The diagram below shows that BA cannot be
calculated.
Matrix B
34
Matrix A
34
different
5.7 - 34
DECIDING WHETHER TWO
MATRICES CAN BE MULTIPLIED
Suppose A is a 3  2 matrix, while B is a 2  4 matrix.
Example 5
d. If BA can be calculated, what size is it?
Solution
The product BA cannot be calculated, because B
has 4 columns and A has only 3 rows.
5.7 - 35
Example 6
MULTIPLYING MATRICES
1  3 
Let A  

2
7
1 0  1
and B  
4
3 1
2
.

 1
Find each product, if possible.
a. AB
Solution
First decide whether AB can be found. Since A is
2  2 and B is 2  4, the product can be found
and will be a 2  4 matrix.
5.7 - 36
Example 6
MULTIPLYING MATRICES
1  3  1 0  1
AB  
 3 1
7
2
4


2
.

 1
1(1)  ( 3)3 1(0)  ( 3)1 1( 1)  ( 3)4 1(2)  ( 3)( 1)

7( 1)  2(4) 7(2)  2( 1) 
7(1)  2(3) 7(0)  2(1)
Use the definition of matrix multiplication
 8

13
3
2
 13 5 
Perform the operations.

1 12
5.7 - 37
Example 6
MULTIPLYING MATRICES
1  3 
Let A  

2
7
1 0  1
and B  
4
3 1
2
.

 1
Find each product, if possible.
b. BA
Solution
Since B is a 2  4 matrix, and A is a 2  2 matrix,
the number of columns of B (4) does not equal
the number of rows of A (2). Therefore, the
product BA cannot be found.
5.7 - 38
Example 7
SQUARE
 1 3
 2 7 
and B  
.
Let A  


5
 2
 0 2
Find each product.
a. AB
Solution
 1 3   2 7 
AB  
  0 2

2
5



 1( 2)  3(0) 1(7)  3(2)   2 13 





2(

2)

5(0)

2(7)

5(2)
4

4

 

5.7 - 39
Example 7
SQUARE
 1 3
 2 7 
and B  
.
Let A  


5
 2
 0 2
Find each product.
b. BA
Solution
 2 7   1
BA  
  2
0
2


3
5 
Note that AB ≠ BA.
 ( 2)1  7( 2)  2(3)  7(5)  16 29 




0(1)

2(

2)
0(3)

2(5)

4
10

 

5.7 - 40
In general, if A and B are matrices,
then AB ≠ BA . Matrix multiplication
is not commutative.
5.7 - 41
Properties of Matrix
Multiplication
If A, B, and C are matrices such that all the
following products and sums exist, then
( AB)C  A(BC ),
A(B  C )  AB  AC, (B  C )A  BA  CA.
5.7 - 42
Example 8
USING MATRIX MULTIPLICATION TO
MODEL PLANS FOR A SUBDIVISION
A contractor builds three kinds of houses, models
A, B, and C, with a choice of two styles, colonial
or ranch. Matrix P shows the number of each
kind of house the contractor is planning to build
for a new 100-home subdivision. The amounts
for each of the main materials used depend on
the style of the house. These amounts are shown
in matrix Q, while matrix R gives the cost in
dollars for each kind of material. Concrete is
measured here in cubic yards, lumber in 1000
board feet, brick in 1000s, and shingles in 100
square feet.
5.7 - 43
Example 8
USING MATRIX MULTIPLICATION TO
MODEL PLANS FOR A SUBDIVISION
Colonial
Model A
Model B
Model C
Ranch
 0 30 
10 20   P


20 20 
5.7 - 44
Example 8
USING MATRIX MULTIPLICATION TO
MODEL PLANS FOR A SUBDIVISION
Concrete
Colonial
Ranch
Lumber
Brick
Shingles
0 2
10 2

Q
50 1 20 2 


5.7 - 45
Example 8
USING MATRIX MULTIPLICATION TO
MODEL PLANS FOR A SUBDIVISION
Cost per
Unit
Concrete
Lumber
Brick
Shingles
20 
180 

R
60 
25 


5.7 - 46
Example 8
USING MATRIX MULTIPLICATION TO
MODEL PLANS FOR A SUBDIVISION
a. What is the total cost of materials for all houses
of each model?
Solution
To find the materials cost for each model, first find
matrix PQ, which will show the total amount of each
material needed for all houses of each model.
 0 30 
10 2 0 2 


PQ  10 20 

 50 1 20 2 
20 20 
5.7 - 47
Example 8
USING MATRIX MULTIPLICATION TO
MODEL PLANS FOR A SUBDIVISION
 0 30 
10 2 0 2 


PQ  10 20 

 50 1 20 2 
20 20 
Concrete
1500
 1100

1200
Lumber
30
40
60
Brick
Shingles
600
400
400
60 
60 

80 
Model A
Model B
Model C
5.7 - 48
Example 8
USING MATRIX MULTIPLICATION TO
MODEL PLANS FOR A SUBDIVISION
Multiplying PQ and the cost matrix R gives the
total cost of materials for each model.
1500
(PQ )R  1100

1200
30
40
60
600
400
400
Cost
72,900 
 54,700 


 60,800 
20 
60  

180


60 
 60 
80  

25 
Model A
Model B
Model C
5.7 - 49
Example 8
USING MATRIX MULTIPLICATION TO
MODEL PLANS FOR A SUBDIVISION
b. How much of each of the four kinds of material
must be ordered?
Solution
To find how much of each kind of material to order,
refer to the columns of matrix PQ. The sums of the
elements of the columns will give a matrix whose
elements represent the total amounts of each
material needed for the subdivision. Call this matrix
T, and write it as a row matrix.
T  3800 130 1400
200
5.7 - 50
Example 8
USING MATRIX MULTIPLICATION TO
MODEL PLANS FOR A SUBDIVISION
c. What is the total cost of the materials?
Solution
The total cost of all the materials is given by the
product of matrix T, the total amounts matrix, and
matrix R, the cost matrix. To multiply these and get
a 1  1 matrix, representing the total cost, requires
multiplying a 1  4 matrix and a 4  1 matrix. This is
why in part (b) a row matrix was written rather than
a column matrix. The total materials cost is given by
TR, so
5.7 - 51
Example 8
USING MATRIX MULTIPLICATION TO
MODEL PLANS FOR A SUBDIVISION
T  3800 130 1400
20 
180 
  188,400 .
200  
60 
25 


The total cost of materials is $188,400.
5.7 - 52