Matrices
Studying this course? Keep your progress in one place.
Key facts
- A matrix is a rectangle of entries; its order is rows columns.
- Add or subtract only matrices of the same order, entry by entry.
- exists only if columns of = rows of ; use row times column. usually.
- An adjacency matrix records direct routes in a network; counts -route journeys.
Matrices and order
A matrix is a rectangular array of entries; its order is rows first, then columns.
A matrix is a rectangular array of numbers called entries, written in brackets.
Its order is : rows, then columns. A matrix with the same number of rows and columns is square.
Two matrices are equal only if they have the same order and equal entries.
- Orderrows × columns
Worked example
State the order of and of .
- 1
The first has 2 rows and 3 columns, so its order is .
- 2
The second has 3 rows and 1 column, so its order is .
What is the order of ?
Adding and scaling matrices
Combine matching entries of matrices of the same order; a scalar multiplies every entry.
You can only add or subtract matrices of the same order. Do it entry by entry.
To multiply by a number (a scalar), multiply every entry. Adding is commutative: .
- Add or subtractsame order, entry by entry
- Scalarmultiply every entry
Worked example
With and , find .
- 1
.
- 2
.
Find for the matrices above.
Multiplying matrices
Each entry of the product is a row of the first matrix times a column of the second.
The product exists only if the number of columns of equals the number of rows of . If is and is , then is .
Multiply matching entries and add. Matrix multiplication is not commutative: for the matrices above but .
- Order of AB
Worked example
is and is . Find .
- 1
The orders have matching inner numbers, so is .
- 2
Row 1, column 1: . Row 1, column 2: .
- 3
Row 2, column 1: . Row 2, column 2: .
is and is . What is the order of ?
Matrices in real situations
Matrix multiplication organises totals, such as takings from sales and prices.
If shows items sold (rows: shops, columns: products) and is a column of prices, then gives the takings of each shop.
A matrix scaled by models a rise in every entry. Always say what the rows and columns mean, and what assumptions the model makes.
Worked example
and . Find .
- 1
Shop 1: .
- 2
Shop 2: .
A matrix of prices is multiplied by 1.2. What does this model?
Adjacency matrices
It records the number of direct routes between each pair of vertices in a network.
A network is made of points (vertices) joined by lines (edges).
Its adjacency matrix has one row and column for each vertex. The entry is the number of direct routes between the two vertices: 1 if joined and 0 if not. For a two-way network the matrix is symmetrical.
Reading in the order gives .
Why is the adjacency matrix of a two-way network symmetrical?
Counting paths
The entries of give the number of journeys that use exactly routes.
For , each entry is a row of times a column of . For three routes, work out .
Check a count by listing the journeys. It should match the entry.
- Entries of Mⁿjourneys using exactly n routes
Reading the answer
Use to count two-route journeys from to and from to .
- 1
The entry from to is : the only two-route journey is .
- 2
The entry from to is : , and .
Using M², how many two-route journeys go from X to Z?
Try an exam question
and . Find and .
[4 marks]
- [1].
- [1] row 1: and .
- [1] row 2: and .
- [1].
That's the notes covered.
Carry on to the next subtopic.
Try a question
Find .
1 mark, marked against the mark scheme
Find .
1 mark, marked against the mark scheme