Lesson 4 of 7 · 18 min
Multiplying matrices
Decide whether a matrix product is defined and find its order, then multiply matrices by hand, row by column, up to 3 × 3.
What you will be able to do
- Decide whether a product is defined, and state its order.
- Multiply matrices row by column, by hand, for matrices up to 3 × 3, including ones that are not square.
- Explain why and are usually different.
- Use the identity matrix: .
At the school tuckshop you buy 3 pies at $5 each and 2 drinks at $4 each. You find the total by multiplying each quantity by its price and adding:
Matrix multiplication does exactly this. Put the quantities in a row and the prices in a column, and multiply row by column: matching entries multiplied, then added.
Key idea
Row by column
The element in row , column of comes from row of and column of : multiply their matching entries and add the results.
Pick an element of the product to see the row and column that build it. Predict each one first: the top-left element is . Then switch to . Is it the same?
Definition
When is a product defined?
For row-by-column to work, each row of must be as long as each column of . So is defined only when
the number of columns of = the number of rows of .
Write the orders side by side. The inner numbers must match; the outer numbers give the order of the answer:
is a matrix and is a matrix. State the order of .
Multiplying two matrices by hand
Check the product is defined
Write the orders. The inner numbers must match. The outer numbers give the order of the answer, so draw an empty matrix of that size.
Fill the answer one element at a time
For row , column , run along row of the first matrix and down column of the second. Multiply matching entries and add.
Check
Recalculate one element, or use technology to multiply the matrices and compare.
Worked example
Multiply a 2 × 3 matrix by a 3 × 2 matrix
Given
calculate , and state the order of .
Step 1: Check the product is defined
: the inner numbers match, so is defined and has order .
Step 2: Row 1 of A with each column of B
Row 1 × column 1:
Row 1 × column 2:
Step 3: Row 2 of A with each column of B
Row 2 × column 1:
Row 2 × column 2:
Step 4: Write the product
Step 5: The order of BA
is defined too, with order . So and are not even the same size.
Try it yourself first, then check the working one step at a time.
Answer
, and has order .
Method
Write the orders; the inner numbers must match and the outer ones give the answer's order.
For each element , multiply row by column entry by entry and add.
Take care with negative numbers.
Watch out for
Losing the sign in .
Assuming has the same order as .
Calculate .
Key idea
AB and BA are usually different
With ordinary numbers, . With matrices, the order matters:
- can be defined when is not. A matrix times a matrix is defined, but the other way round, , is not.
- Even when both are defined, and usually have different elements, and can even have different orders.
So always multiply in the order the question gives.
is and is . Select all the products that are defined.
Definition
Multiplying by the identity
For any matrix and an identity matrix of the right size,
Try it: has top-left element , and every other element also comes out unchanged.
Common mistake
Not element by element
Adding matrices works element by element, but multiplying does not. is not . Its top-left element is .
Exam tip
In the exam
Write the orders first, like . Then show the working for at least one element in full. If you use technology for the multiplication, still write down the matrices you entered.
Summary
is defined only when the number of columns of equals the number of rows of .
: the outer numbers give the order of the product.
Element of : multiply row of by column of , entry by entry, and add.
In general , and one may be defined when the other is not.
: the identity matrix acts like the number 1.
Finished the lesson?
Try the 3 quick checks above and the lesson completes itself, or mark it complete now.