3.2 Matrix Multiplication Question : 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 : 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 x k matrix, A a a a 2 n and a k x matrix, b b 2 B bn 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: AB a a 2 a n b b 2 bn a b a b a b 2 2 n n 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. 2
Let s try the following product: 3 2 4 2 9 2 To help identify the factors in the products, let s color code each corresponding factor and carry out the sum: 2 9 3 3 5 2 2 4 2 9 22 4 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. 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
3. For each entry in the product, form the corresponding factors and sums. The entry in the i th row and j th column of the product is found by corresponding and multiplying the i th row in the first matrix with the j th column in the second matrix. Example Multiply Two Matrices Let 0 A 2 3 and B 2 4 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, A B, 23 22 Not Equal 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, B A 22 23 Equal 4
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: B A 22 23 Product is 2 x 3 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: 2 4 0 BA 3 2 3 2 3 5 This 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: 5
2 4 0 BA 3 2 3 20 43 2 Adding this entry to the product matrix yields 5 2 We can compute the other four entries in the product matrix similarly. 2 42 0 2 4 2 2 4 0 0 2 2 BA 3 2 3 5 4 9 3 4 0 33 9 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/3 6000 5000 Quarter Ending 6/30 2000 2600 Quarter Ending 9/30 6500 2000 Quarter Ending 2/3 500 3600 This information is summarized in the matrix 6
6000 5000 2000 2600 E 6500 2000 500 3600 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/3. In that quarter, 6000 first time subscribers and 5000 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 Total Number of Renewed 0.256000 0.505000 9000 Subscriptions in First Quarter 25% of FirstTime Subscribers 50% of Continuing Subscribers We can also calculate the total number of renewed subscriptions in other quarters using this same strategy. Total Number of Renewed 20000.2526000.50800 Subscriptions in Second Quarter Total Number of Renewed 65000.2520000.507625 Subscriptions in Third Quarter Total Number of Renewed Subscriptions in Fourth 5000.25 36000.50 275 Quarter 7
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 P 0.25 0.50 First Time Subscribers Continuing Subscribers of the renewal rates for the subscribers groups. The product 6000 5000 2000 2600 0.25 EP 6500 2000 0.50 500 3600 4 x 2 2 x can be carried out since E has 2 columns and P has 2 rows. 9000 800 EP 7625 275 6000 0.25 5000 0.50 9000 2000 0.25 2600 0.50 800 6500 0.25 2000 0.50 7625 500 0.25 3600 0.50 275 The resulting product is a 4 x 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. 8
b. A renewing subscriber pays $8 per year for a subscription. Find a matrix R 2 that gives the cash receipts from renewed subscriptions by quarter. Solution The product EP gives 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 8. Multiplying the product EP by the scalar 8 gives R2 8EP 9000 800 8 7625 275 62000 32400 37250 3950 Replace EP with the product from part a Multiply each entry by 8 c. The matrix 52000 30000 R 56000 25000 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 R 2, 9
R R R2 Combine R and R 2 to yield 52000 62000 30000 32400 R 56000 37250 25000 3950 24000 62400 93250 6450 Replace R and R 2 with matrices Add corresponding entries in each matrix 0
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 2800 2400 4200 4000 N 5000 8800 8000 8300 Quarter Ending 3/3 Quarter Ending 6/30 Quarter Ending 9/30 Quarter Ending 2/3 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 5000 8800 8000 8300
Solution In this product we are multiplying a 4 x 2 matrix times a 2 x 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 matrix: 2800 2400 5200 4200 4000 8200 5000 8800 3800 8000 8300 6300 2800 2400 5200 4200 4000 8200 5000 8800 3800 8000 8300 6300 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 2400 subscriptions 5200 subscriptions The numbers in the second matrix have no units. The effect of multiplying by the matrix matrix N. is to add the entries in each row of the 2
Example 4 Interpret the Product of Two Matrices The new subscriptions described by the matrix Service Magazine 2800 2400 4200 4000 N 5000 8800 8000 8300 Quarter Ending 3/3 Quarter Ending 6/30 Quarter Ending 9/30 Quarter Ending 2/3 contribute different amounts of cash to Ed Magazine. Subscriptions enlisted by the subscription service pay $0 for a subscription, but only $2 goes to the magazine. Subscriptions developed through the magazine s marketing campaigns pay $2 and all of this cash goes to the magazine. We can summarize this information in the matrix Dollars per subscription 2 S 2 Service Magazine Find and interpret 2800 2400 4200 4000 2 NS 5000 8800 2 8000 8300 Solution Let s check the size of each matrix to insure that the matrix multiplication is possible. 3
2800 2400 4200 4000 2 NS 5000 8800 2 8000 8300 quarters x categories of number of new subscriptions categories of number of new subscriptions x price (4 x 2) (2 x ) 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 product. We can form the entries in the product by corresponding the rows in N with the column in S: 2800 2400 34400 4200 4000 2 56400 NS 5000 8800 2 5600 8000 8300 5600 2800 2 2400 2 34400 4200 2 4000 2 56400 5000 2 8800 2 5600 8000 2 8300 2 5600 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: dollars 2800 subscriptions 2 2400 subscriptions 2 subscription Each term has units of dollars and indicates the amount of cash subs received from the sales of subscriptions to new subscribers of each type (from the subscription service and from the magazine s dollars cription 4
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. 5