A block of numbers in rows and columns
A matrix is a rectangular block of numbers written inside brackets. The numbers are set out in rows, which run across the page, and columns, which run down it. Each number in the block is called an entry.
The matrix A below has the entries 3, 1, 4 in its first row and 2, 7, 5 in its second. So it has 2 rows, and reading down, it has 3 columns: 3 above 2, 1 above 7, and 4 above 5.
The size of a matrix is called its order, and it is always given as the number of rows, then the number of columns. A has 2 rows and 3 columns, so its order is 2 × 3, read “2 by 3”.
Row 2 of A is 2, 7, 5, read across. A has 2 rows, so its order begins with 2.
Column 3 of A is 4 above 5, read down. A has 3 columns, so its order is 2 × 3.
The order and the number of entries
The order gives the two side lengths of the block, not the number of entries. A matrix of order 2 × 3 holds 2 × 3 = 6 entries, but so does a matrix of order 3 × 2, and they are different shapes.
Set the same six numbers out in 3 rows of 2 and the result is a 3 × 2 matrix. Its rows are 3, 2 and 1, 7 and 4, 5, so it is not the matrix A: the order of a matrix is part of what the matrix is.
A 2 × 3 matrix and a 3 × 2 matrix built from the same six numbers. They hold the numbers in different places, so they are different matrices.
Naming an entry
An entry is named by its row, then its column, in the same order as the order of the matrix. To find the entry in row 2, column 3 of A, go down to row 2 first, then across to column 3: it holds 5.
The entry of A in row i and column j is written , with the row number first. So , and .
Reading the two numbers the wrong way round finds a different place, or none at all. Row 3, column 2 does not exist in A, because A has only 2 rows.
is the entry in row 1, column 3, and it holds 4.
Square, row and column matrices
A matrix with as many rows as columns is a square matrix, such as a 2 × 2 or a 3 × 3. A matrix with a single row, such as a 1 × 3, is a row matrix, and a matrix with a single column, such as a 3 × 1, is a column matrix. A column vector is a column matrix.
A square matrix of order 2 × 2, a row matrix of order 1 × 3, and a column matrix of order 3 × 1.
Why the order is stated first
The order decides what can be done with a matrix. Two matrices can be added only when they have the same order, so that every entry has a partner in the same place. Two matrices can be multiplied only when the first has as many columns as the second has rows. Both rules are read straight off the orders.
The usual mistakes
Naming the columns first. A has 3 columns and 2 rows, but its order is 2 × 3, not 3 × 2: the rows always come first.
Giving the number of entries as the order. A holds 6 entries, but its order is 2 × 3, the number of rows and the number of columns.
Reading an address column first. Row 1, column 3 of A holds 4, while row 3, column 1 does not exist.
Sales written as a matrix
A matrix can hold a table of figures. In the application below, a bakery’s weekly sales at two branches go into a matrix with one row for each branch and one column for each item. Then the same figures are written with one row for each item, which changes the order and moves every entry to a new address.
Worked example: A Bakery's Weekly Sales at Two Branches Written as a Matrix
Question A bakery has two branches, North and South. In one week North sells 40 loaves, 25 cakes and 12 pies, and South sells 35 loaves, 30 cakes and 18 pies. The sales are written as a matrix S with one row for each branch and one column for each item. (a) Write down S and state its order. What does the entry in row 2, column 3 mean? (b) The owner rewrites the same figures with one row for each item and one column for each branch. State the order of the new matrix, and give the row and the column in which the number 18 now appears.
1.Put North's sales in row 1 and South's in row 2, with loaves, cakes and pies in columns 1, 2 and 3: S = 402512353018.
One row for each branch and one column for each item: S = 402512353018. 2.The order is the number of rows by the number of columns. S has 2 rows and 3 columns, so its order is 2 × 3, and it holds 2 × 3 = 6 numbers.
The order is rows by columns: S has 2 rows and 3 columns, so it is 2 × 3 and holds 6 numbers. 3.(a) The entry in row 2, column 3 is 18. Row 2 is South and column 3 is pies, so it means that the South branch sold 18 pies that week.
(a) Row 2 is South and column 3 is pies: the entry 18 means South sold 18 pies that week. 4.In the new matrix each item is a row and each branch is a column: 403525301218. It has 3 rows and 2 columns, so its order is 3 × 2.
With one row for each item: 403525301218, which has 3 rows and 2 columns, so its order is 3 × 2. 5.(b) The 18 still counts the pies sold at South. Pies are now row 3 and South is column 2, so the 18 is in row 3, column 2. Check: both matrices hold the same 6 numbers, arranged in the different orders 2 × 3 and 3 × 2.
(b) Pies are now row 3 and South is column 2, so the 18 is in row 3, column 2.
Answer: (a) S = 402512353018, of order 2 × 3; the entry 18 means that South sold 18 pies; (b) order 3 × 2, with the 18 in row 3, column 2
Common mistakes
- Giving the order of S as 3 × 2 because there are three items. The order is always rows first and then columns, and S has two rows, one for each branch.
- Finding the entry in row 2, column 3 by counting 2 columns across and 3 rows down. The first number always names the row, and S has no third row.