3.2 Matrix Multiplication
Question 1: How do you multiply two matrices?
Question 2: How do you interpret the entries in a product of two matrices?
When you add or subtract two matrices, you add or subtract the entries in two matrices of the same size. You might try to multiply two matrices by following a similar strategy.
However, matrix multiplication is not carried out by multiplying the corresponding entries of two matrices of the same size.
Instead, matrix multiplication is carried out by multiplying the entries in the rows of a matrix by the entries in the columns of the other matrix. This might not seem to be a productive process. However, this process is very useful in many areas of business, economics, and science.
In this section you’ll learn how to carry out this process and apply it to several problems at Ed Magazine.
Question 1: How do you multiply two matrices?
The process of multiplying matrices is different from scalar multiplication or the other matrix operations in the previous section. Instead of multiplying corresponding entries, in matrix multiplication we multiply the rows in one matrix by the columns in the another matrix. This process can be demonstrated by multiplying a row matrix times a column matrix. Suppose we have a 1 x k matrix,
11 12 1n
A a a a
and a k x 1 matrix,
11 21
1 n
b B b
b
In each matrix, the dots help to indicate the arbitrary number of rows or columns in each matrix. Although this number k is arbitrary, the number of columns in A must match the number of rows in B. Otherwise it is not possible to carry out the multiplication process.
To find the product these matrices, we must multiply the entries in the row matrix by the entries in the column matrix and add the resulting products:
11
11
11 11
21 12
1
1
1
1
2 1
2 1
n
n
n n
a b
a b a b
a
b b
B
b
A a
a
Notice that each product comes from corresponding columns and rows. In other words, the first product is formed from the first column in the first matrix and the first row in the second matrix, the second product is formed from the second column in the first matrix and the second column in the second matrix, and so on.
Let’s try the following product:
2 3 1 2 4 9
2 1
To help identify the factors in the products, let’s color code each corresponding factor and carry out the sum:
2 4
2 2 4
2 2
3 3 1 5
1
1 9 2
1 9
The key to carrying out the process is to correspond the factors in each product correctly.
This process is carried out several times when matrices with more than one row or column are multiplied. However, the number of columns in the first matrix must match the number of rows in the second matrix.
How to Multiply Two Matrices
1. Make sure the number of columns in the first matrix matches the number of rows in the second column. If they do not match, the product is not possible.
2. The size of the products is the number of rows in the first matrix by the number of columns in the second matrix.
The product of m x k matrix and a k x n matrix is an m x n matrix. Form a matrix of the proper size with blank spaces for each entry.
3. For each entry in the product, form the corresponding factors and sums. The entry in the ith row and jth column of the product is found by corresponding and multiplying the ith row in the first matrix with the jth column in the second matrix.
Example 1 Multiply Two Matrices
Let
1 1 0
2 1 3
A
and 2 4
B 1 3
Find the products indicated in each part.
a. A B
Solution To be able to compute this product, the number of columns in A must equal the number of rows in B. Since A has 3 columns and B has 2 rows,
2
23 2
A B
,
it is not possible to compute this product.
b. B A
Solution For this product, the number of columns in B is equal to the number of row in A,
2
2 2 3
B A
Not Equal
Equal
This means the product can be computed. The size of the resulting product is determined by the number of rows in B, 2, and the number of columns in A,3:
2
2 2 3
B A
Now that the size of the product is known, we can find the entries in the product.
Start with blank entries in a 2 x 3 matrix:
We can find the value of any entry in the product by corresponding the proper row and column in the factors. For instance, the entry in the second row, first column is computed from the second row of the first matrix and the first column of the second matrix:
3 1 1
2 4 1 0
3 2 1
BA
1 1
3
2 5This entry is placed in the product matrix,
5
The entry in the first row, third column is computed from the first row of the first matrix and the third column of second column:
Product is 2 x 3
1 1
1 3 2 1
2 4 0
BA 3
2 0
4 3
12Adding this entry to the product matrix yields 12 5
We can compute the other four entries in the product matrix similarly.
Example 2 Multiply Two Matrices
The table below gives the number of expiring subscriptions for Ed Magazine.
First Time Subscribers Continuing Subscribers
Quarter Ending 3/31 6000 15000 Quarter Ending 6/30 2000 2600 Quarter Ending 9/30 6500 12000 Quarter Ending 12/31 1500 3600
This information is summarized in the matrix
2 4 1 1 0 10 2 12
1 3 2 1 3 5 4 9
BA
2 1 4 2 10 2
1 4 1 2
1 1 3 1 4
1 0
3 3 96000 15000 2000 2600 6500 12000 1500 3600 E
The different categories of subscribers renew their subscriptions at different rates. Twenty five percent of the first time subscribers renew their subscriptions and fifty percent of the existing subscribers renew their subscriptions.
a. Use matrix multiplication to find a matrix describing the total number of renewed subscribers by quarter.
Solution To see how matrix multiplication can be used to calculate the total number of renewed subscribers, watch the video, let’s look at the quarter ending 3/31. In that quarter, 6000 first time subscribers and 15000 continuing subscribers have their subscriptions expiring. We know that 25% of the first time subscribers will renew and 50% of the continuing subscribers will renew.
The total number of renewed subscriptions in the first quarter is
25% of FirstTime Subscribers 50% of Continuing Subscribers
Total Number of Renewed
0.25 6000 0.50 15000 9000
Subscriptions in First Quarter
We can also calculate the total number of renewed subscriptions in other quarters using this same strategy.
Total Number of Renewed
2000 0.25 2600 0.50 1800 Subscriptions in Second Quarter
Total Number of Renewed
6500 0.25 12000 0.50 7625 Subscriptions in Third Quarter
Total Number of Renewed Subscriptions in Fourth
1500 0.25 3600 0.50 2175
Quarter
Notice that each number is the sum of two products. The product of two matrices creates a new matrix where each entry is a sum of products.
This suggests that we define a matrix
Renewal Rate
First Time Subscribers Continuing Subscribers
0.25 P 0.50
of the renewal rates for the subscribers groups.
The product
can be carried out since E has 2 columns and P has 2 rows.
The resulting product is a 4 x 1 matrix:
Notice that each entry matches the totals found earlier. Using matrices we are able to compute the total number of renewals by quarter
efficiently. Additionally, if more quarters are included in E the process
can still be carried out by adding more rows to E.
9000 1800 7625 2175 EP
6000 0.25 15000 0.50 9000
2000 0.25 2600 0.50 1800
6500 0.25 12000 0.50 7625
1500 0.25 3600 0.50 2175 4 x 2 2 x 1
6000 15000 2000 2600 0.25 6500 12000 0.50 1500 3600
E P
b. A renewing subscriber pays $18 per year for a subscription. Find a matrix R that gives the cash receipts from renewed subscriptions 2 by quarter.
Solution The product EPgives the total number of renewed subscriptions by quarter. To find the cash receipts from these subscriptions, we must multiply each entry in the product by 18.
Multiplying the product EP by the scalar 18 gives
2 18
9000 18 1800
7625 2175 162000
32400 137250
39150 R EP
c. The matrix
1
52000 30000 56000 25000 R
gives the cash receipts from new subscriptions by quarter. Find the matrix R that gives the total cash receipts from new and existing subscriptions.
Solution The total cash receipts R is the sum of cash receipts from new subscriptions R and cash receipts from existing subscriptions 1 R , 2
Replace EP with the product from part a
Multiply each entry by 18
1 2
R R R
Combine R and 1 R to yield 2 52000 162000 30000 32400 56000 137250 25000 39150 214000
62400 193250
64150 R
Add corresponding entries in each matrix Replace R1 and R2 with matrices
Question 2: How do you interpret the entries in a product of two matrices?
Before attempting to compute or interpret what the product tells you, it is instructive to determine the size of the product. As indicated earlier, the product of an m x k matrix and a k x n matrix is an m x n matrix. Once we know the size of the product, we can compute each of the entries in the product. The entries in the product are formed by corresponding the rows and columns in the factors, multiplying the entries, and
summing the results. This operation is often very useful in computing various quantities in business. However, it is often not obvious exactly what the product tells you.
In a typical application, we can use the labels on the number of rows m in the first matrix to label the rows of the product. To label the columns in the product, write out the
calculation for the first entry with the units on each factor. By analyzing the units, we can deduce what that entry tells us. The other entries will have a similar interpretation to the first entry.
Example 3 Interpret the Product of Two Matrices
The number of new subscriptions by quarter is given by the matrix
Service Magazine
Quarter Ending 3/31 Quarter Ending 6/30 Quarter Ending 9/30 Quarter Ending 12/31
2800 2400 4200 4000 5000 8800 8000 8300 N
New subscriptions may come from a subscription service or may come from the magazine’s marketing. The columns of N indicate the number of subscriptions from each source.
Find and interpret the product
2800 2400 4200 4000 1 5000 8800 1 8000 8300
Solution In this product we are multiplying a 4 x 2 matrix times a 2 x 1 matrix. Since the number of columns (2) in the first matrix matches the number of rows in the second matrix (2), we can carry out the matrix multiplication. The resulting product will be a 4 x 1 matrix:
Notice that each entry in the product is simply the sum of the entries on the same row in the first matrix. Since these values are the number of new subscriptions in that quarter, the sum in the product corresponds to the total number of new subscriptions in that quarter.
For instance, in the first quarter a total of 5200 new subscriptions were received from the subscription service and the magazine’s marketing efforts,
2800 subscriptions 1
2400 subscriptions 1
5200 subscriptionsThe numbers in the second matrix have no units. The effect of multiplying by the matrix 1
1
is to add the entries in each row of the matrix N.
2800 1 2400 1 5200
4200 1 4000 1 8200
5000 1 8800 1 13800
8000 1 8300 1 16300
2800 2400 5200
4200 4000 1 8200 5000 8800 1 13800
8000 8300 16300
Example 4 Interpret the Product of Two Matrices
The new subscriptions described by the matrix
Service Magazine
Quarter Ending 3/31 Quarter Ending 6/30 Quarter Ending 9/30 Quarter Ending 12/31
2800 2400 4200 4000 5000 8800 8000 8300 N
contribute different amounts of cash to Ed Magazine. Subscriptions enlisted by the subscription service pay $10 for a subscription, but only
$2 goes to the magazine. Subscriptions developed through the
magazine’s marketing campaigns pay $12 and all of this cash goes to the magazine. We can summarize this information in the matrix
Dollars per subscription
Service Magazine
2 S 12
Find and interpret
2800 2400 4200 4000 2 5000 8800 12 8000 8300 NS
Solution Let’s check the size of each matrix to insure that the matrix multiplication is possible.
The number of columns in N representing the number of new
subscriptions and the number of rows in S representing the cash from subscriptions are both equal to 2 so the multiplication can be carried out to give a 4 x 1 product.
We can form the entries in the product by corresponding the rows in N with the column in S:
The four rows in the product correspond to the four quarters, but what do the entries tell us about those quarters?
To answer this question, let’s look at the first entry in detail:
subscript
2800 ions
subsc doll
rip 2 ars
tion 2400 subscriptions
subs do
cr llar
ip 12 s
tion
Each term has units of dollars and indicates the amount of cash received from the sales of subscriptions to new subscribers of each type (from the subscription service and from the magazine’s
2800 2400 34400
4200 4000 2 56400 5000 8800 12 115600
8000 8300 115600
NS
2800 2 2400 12 34400
4200 2 4000 12 56400
5000 2 8800 12 115600
8000 2 8300 12 115600 2800 2400
4200 4000 2
5000 8800 12 8000 8300
NS
quarters x categories of number of new subscriptions categories of number of new subscriptions x price (4 x 2) (2 x 1)
promotions). So the sum, 34400 dollars, represents the total amount of cash received from both types of subscribers together.
Other entries can be analyzed similarly to show the total cash received from new subscribers in the other three quarters.