  a A

advertisement
Math 141 Section 2.5 Matrix Multiplication
Definition: For a 1xn row matrix, A  a1
a2

a3
a n  and an nX1 column matrix,
 b1 
 
b
 2
B   b3  , the product with the row on the left is AB  a1b1  a 2 b2  a 3b3    a n bn .
 
 
 b n 
Later we will see that BA is not the same, and is an nxn matrix.
Example: Compute 2
5
 3 


1  2 .


 7 
 c1 
 
c
 2
Definition: If A is mxn and B is nX1 then AB is and mx1 column C   c 3  where
 
  
 c m 
c i =row i of A times B.
Examples: Compute AB .
3

a) A  5

 9
3

b) A  5

 9
2
6
2
2
6
2
1 

8 ,

 3 
x
 
B  y
 
 z 
1 

8 ,

 3 
 4


B  2


 1 
 5
2
4
 1
3
6
c) A  
9

4
 2 


3


B 
 2


 1 
Definition: If A is mxn and B is nxr then AB  C is mxr and c ij is row i of A times column j of B .
Examples: Compute AB . Compute BA if possible.
 1
a) A  
 2
4
3
 1
b) A  
 2
9
c) A  
2
4
3
5
 1
2

3
 2
3
e) A  
0
0

1
In general  AB
4

B  0

 1
1
6

5
2

B  6

 7
5 

4

 3 
 1

B  3

 1
 3

6 
4
d) A  
6

5
T
2
B 
3
2
B 
0
5
3
2 

2

 1 
2

1

5 
 1

5 
0

4
 B A . Verify this for examples a and b above.
T
T
Meanings of Matrix Products
Example
An upholsterer has an order to cover 4 chairs and 3 sofas. Each chair requires 5 yards of fabric and 10
hours of labor. Each sofa requires 16 yards of fabric and 24 hours of lab or. Fabric costs $18 per yard,
labor costs $20 per hour. Write a matrix product that gives the total cost of the order.
I. Put the information about fabric and labor requirements for chairs and sofas into a 2x2 matrix.
Label the rows and columns so you know what the entries mean. This is also important because we have
two choices for setting up the matrix.
Choice 1
chair
sofa
fabric
5
16
labor
10
24
Choice 2
fabric
labor
chair
5
10
sofa
16
24
The 2nd matrix is the transpose of the first. The problem can be worked with either one so I will use
choice 1 first and choice 2 2nd. Where you put the following matrices and how the product looks
depends on which choice you use.
II. Since we have chosen choice 1, the information about fabric cost per yard and labor cost per hour
must go on the left as a 1x2 row.
fabric
labor
18
20
chair
sofa
fabric
5
16
labor
10
24
Notice how the labels match up.
III. Put the information about the number of chairs and sofas ordered in a 2x1 column on the right.
fabric
labor
18
20
chair
sofa
5
16
fabric
labor
10
24
chair
4
sofa
3
fabric
18
labor
20
Making choice 2 it looks like:
chair
sofa
4
3
fabric
labor
chair
5
10
sofa
16
24
The product is $3464 either way.
Again, observe how the labeling works.
Download