Two matrices can be multiplied if the number of columns in the first matrix is equal to the number of rows in the second.
If matrix $A$A has dimension $m\times n$m×n and matrix $B$B as dimension $a\times b$a×b then the multiplication is defined if $n=a$n=a and the dimension of the result $C=AB$C=AB will be $m\times b$m×b.
As shown in the following diagram:
If the dimensions do not meet this criteria then we say that the matrix multiplication is undefined.
For example consider the following matrices A, B and C where,
, ,
A is a $2\times2$2×2 matrix, B is a $2\times1$2×1 matrix and C is a $1\times2$1×2 matrix.
Unlike matrix addition and subtraction, matrix multiplication is not computed element by element.
Let's look at an example of multiplication before we generalise the result.
If we take the elements in the first row, and multiply them by the elements in the first column, then sum them up then we end up with the a number that belongs in the spot occupying the first row and first column.
So $5\times6+12\times1+56\times7=434$5×6+12×1+56×7=434 goes into the $\left(1,1\right)$(1,1) entry.
The next combination will be the first row and the second column. Take the sum of the elements in the first row multiplied by the elements in second column.
So, $5\times3+12\times2+56\times2=151$5×3+12×2+56×2=151 goes into the $\left(1,2\right)$(1,2) entry.
The next combination will be the second row and the first column. Take the sum of the elements in the second row multiplied by the elements in first column.
So $10\times6+30\times1+75\times7=615$10×6+30×1+75×7=615 goes into the $\left(2,1\right)$(2,1) entry.
The final combination is the second row and the second column. Take the sum of the elements in the second row multiplied by the elements in second column.
So $10\times3+30\times2+75\times2=240$10×3+30×2+75×2=240 goes into the $\left(2,2\right)$(2,2) entry.
In general, to compute the $\left(i,j\right)$(i,j)-element in the matrix $AB$AB, we multiply the elements of the $i$ith row in $A$A with the elements in the $j$jth column of $B$B, and sum all the products. For a pair of $2\times2$2×2 matrices, this looks like:
Consider $A$A$=$= | $-7$−7 | $-3$−3 | $-1$−1 | . | ||
$5$5 | $7$7 | $-6$−6 |
If $A$A is to be multiplied by $B$B, a column matrix, what are the dimensions of $B$B?
$\editable{}$$\times$×$\editable{}$
Consider $A$A$=$= |
|
and $B$B$=$= |
|
. |
Is the product $AB$AB defined?
Yes
No
What are the dimensions of $AB$AB?
$\editable{}$$\times$×$\editable{}$
Determine the matrix $AB$AB.
$AB$AB$=$= |
|
|
$=$= |
|
An organic gardener produces lettuces and tomatoes. The following table indicates the time taken for each of the growing stages.
Stage 1 Germination from seed (days) |
Stage 2 from sprout to seedling (days) |
Stage 3 from seedling to maturity (days) |
|
---|---|---|---|
Lettuce | $5$5 | $12$12 | $56$56 |
Tomato | $10$10 | $30$30 | $75$75 |
The amount of water per day needed for Stage 1 is $60$60 mL, for Stage 2 is $40$40 mL and Stage 3 is $30$30 mL.
Work out the amount of water needed for both the lettuce and tomato.
Think: First, let's construct two matrices.
Let $D$D be the matrix of days needed in each stage:
And let $W$W be the matrix of water needed:
Do: To work out the total amount of water needed we will multiply $D$D by $W$W. It is important to note that we multiply$D$D by $W$W not only because the dimensions match, but also because the headings of the columns of $D$D (stages) match the headings of the rows of $W$W (also stages).
This tells us that $2460$2460 mL is used in raising a lettuce plant ($2.46$2.46 L) and $4050$4050 mL is used for each tomato plant ($4.05$4.05 L).
Frank owns two pizza stores, Panania Pizza and Penrith Pizza, at which he sells small pizzas for $\$7$$7, medium-sized pizzas for $\$15$$15 and large pizzas for $\$28$$28.
The table shows the number of pizzas sold at each store on a particular day.
Small | Medium | Large | |
---|---|---|---|
Panania Pizza | $21$21 | $25$25 | $12$12 |
Penrith Pizza | $26$26 | $11$11 | $22$22 |
Organise the prices into the column matrix in ascending size order.
$A$A$=$= |
|
Organise the number of pizzas sold into the matrix as given in the table.
$B$B$=$= |
|
Calculate Frank's total revenue for each store by finding $BA$BA.
$BA$BA$=$= |
|
|
$=$= |
|
A local bakery was selling three different products yesterday. The tables show the price that each product was sold for and the amount sold.
Price | ||
---|---|---|
Meat pie | Croissant | Bread roll |
$\$5$$5 | $\$3$$3 | $\$4$$4 |
Quantity sold | |
---|---|
Meat pie | $22$22 |
Croissant | $13$13 |
Bread roll | $35$35 |
Organise the prices of each product into the row matrix in the order given in the table.
$A$A$=$= |
|
Organise the quantity sold of each product into the column matrix in the order given in the table.
$B$B$=$= |
|
Calculate the bakery's total revenue for the day by finding $AB$AB.
$AB$AB$=$= |
|
|
$=$= |
|
Let's look at how we can use our calculator to perform multiplication with matrices.
TI Nspire
How to use the TI Nspire to complete the following tasks regarding matrices
If $A$A$=$= | $1$1 | $5$5 | $6$6 | , $B$B$=$= | $3$3 | $0$0 | and $C$C$=$= | $-2$−2 | $2$2 | |||||||||
$3$3 | $4$4 | $5$5 | $-1$−1 | $2$2 | $1$1 | $5$5 |
Find where possible:
$2BA$2BA
$(B+C)A$(B+C)A
$AB$AB