Using Matrices To Model (Represent) Practical Situations
Theory
A matrix is a tidy way to organise data that falls into a grid — like sales by store and product, or scores by student and test. Build a matrix by choosing what rows and columns represent. Read values using
A matrix is a tidy way to organise data that falls naturally into a grid. The three key skills are building a matrix from a context, reading information out of one, and interpreting entries and totals.
A row sum is the total across all entries in a single row — usually the total for one "thing" across all categories. A column sum is the total down a single column — usually the total for one category across all things.
A network (connection) matrix records the number of direct connections between points. For
A transition matrix describes movement between categories. Entry
The first diagram shows a sales matrix with row and column sums interpreted in their real-world contexts. The second shows a network of three towns and its corresponding connection matrix.
There are no calculation formulas here — just templates for the common contexts in which matrices appear.
| Context | Rows represent | Columns represent | Entry |
|---|---|---|---|
| Pricing | drink type | size | price |
| Sales | store or month | product | units sold |
| Test scores | student | test | score |
| Inventory | store | product | quantity in stock |
| Network | start point | end point | number of direct connections |
| Transition | destination category | source category | proportion moving |
How to build a matrix from a context
- Decide what the rows represent — usually the "things" being measured (stores, students, towns).
- Decide what the columns represent — usually the categories (products, tests, destinations).
- Fill in each entry as the value at that row/column intersection.
- State the order as
= rows by columns.
How to read a value from a matrix
- Identify which row corresponds to the "thing" you want.
- Identify which column corresponds to the category you want.
- Read the entry at that intersection. It is
where is the row number and is the column number.
How to build a network matrix
- Label the rows and columns with the same set of names (towns, websites, people).
- For each pair
, count the number of direct connections from to and put that number in the entry. - Set the diagonal entries to 0 unless self-loops are allowed.
- For two-way connections, the matrix is symmetric — entry
equals entry .
Row 1 holds January's figures, row 2 holds February's. Columns are A, B, C.
The matrix has
Answer:
February is row 2, Product B is column 2, so look up the entry
Answer:
Add the four entries in Alice's row.
| Row sum | ||
Answer: Alice's row sum is
Order the rows and columns as
The matrix is symmetric (
Answer: the connection matrix
Common pitfalls
Frequently asked questions
When should I use a matrix to represent data?
Use a matrix any time data falls naturally into a rectangular grid with two categories — for example, students by tests, stores by products, towns by towns. Each cell of the grid becomes one entry of the matrix.
How do I decide what goes in rows and columns?
Often the question specifies it directly: 'rows represent stores, columns represent products'. If not, pick whichever makes the most sense for the data and state your choice clearly. Just be consistent throughout the problem.
What does a row sum tell me?
A row sum is the total across all the categories in that row. For a test-score matrix with students as rows and tests as columns, a row sum gives a student's total across all the tests they sat.
What does a column sum tell me?
A column sum is the total down a single column. In the same test-score example, a column sum gives the total of all students' marks on one particular test.
What is a network or connection matrix?
A network matrix represents direct connections between points (such as roads between towns). Entry (i, j) is the number of direct connections from point i to point j. For two-way connections the matrix is symmetric; for one-way connections it isn't. Diagonal entries are usually zero — no connection from a point to itself.
What is a transition matrix?
A transition matrix describes how a quantity moves between categories over time — for example, customers switching brands. Entry (i, j) is the proportion that moves from category j to category i. Each column sums to one, since every member of category j must move somewhere (including staying).
Video Lessons
Practice Questions
5 questions available.
Practice Questions