- Practice
- About 16 min
- 5 practice questions
Matrices: order, elements and types of matrices
Read the order and the (i, j)th element of a matrix, build a matrix from a rule for aᵢⱼ, name the special types of matrices and decide when two matrices are equal.
If something looks wrong, please tell us.
By the end of this lesson you can
- Say what a matrix is and find its order m × n.
- Locate the (i, j)th element aᵢⱼ and construct a matrix from a formula for aᵢⱼ.
- Recognise row, column, zero, square, diagonal, scalar, unit and triangular matrices.
- Use the definition of equal matrices to find unknown entries.
Matrices grew out of the search for a compact way to handle systems of linear equations, and the Tamil Nadu textbook traces the word matrix to James Joseph Sylvester (1850) and the algebra of matrices to Arthur Cayley. Today matrices store marks, prices, network data and the coefficients of equations. This lesson sets up the language; the next lessons do arithmetic with it.
What a matrix is
A matrix is a rectangular arrangement of entries (also called elements) in rows and columns, enclosed in a square bracket [ ]. The horizontal lines of entries are rows and the vertical lines are columns. Matrices are named with capital letters A, B, C. In this chapter the entries are real numbers or real-valued functions of a real variable.
If A has m rows and n columns, its order (size) is m × n, read m by n. The entry in the ith row and jth column is written aᵢⱼ and called the (i, j)th element, so A = [aᵢⱼ]ₘₓₙ with 1 ≤ i ≤ m and 1 ≤ j ≤ n. The first index always names the row and the second the column. In these lessons we write a matrix on one line with its rows separated by semicolons: A = [2 −1 5; 0 3 7] means first row 2, −1, 5 and second row 0, 3, 7, so A is 2 × 3 and a₂₃ = 7.
Worked example 1: a table as a matrix
A stall sells tea, coffee and milk. Made-up sales for Monday are 40, 25, 10 cups and for Tuesday 35, 30, 15 cups. Writing one row per day and one column per drink gives S = [40 25 10; 35 30 15], a 2 × 3 matrix. The entry s₂₁ = 35 sits in row 2 (Tuesday) and column 1 (tea): 35 cups of tea were sold on Tuesday.
Worked example 2: possible orders
A matrix has 18 elements. What orders can it have? Working: the number of elements is (rows) × (columns), so we need ordered pairs of natural numbers with product 18: 1 × 18, 18 × 1, 2 × 9, 9 × 2, 3 × 6 and 6 × 3, six orders in all. If a matrix had 13 elements, 13 being prime, the only orders would be 1 × 13 and 13 × 1.
Worked example 3: constructing a matrix from a rule
Construct the 2 × 3 matrix with aᵢⱼ = |i − 3j| / 2. Working: row 1 (i = 1): a₁₁ = |1 − 3|/2 = 1, a₁₂ = |1 − 6|/2 = 5/2, a₁₃ = |1 − 9|/2 = 4. Row 2 (i = 2): a₂₁ = |2 − 3|/2 = 1/2, a₂₂ = |2 − 6|/2 = 2, a₂₃ = |2 − 9|/2 = 7/2. So A = [1 5/2 4; 1/2 2 7/2].
Types of matrices
| Name | Condition | Example |
|---|---|---|
| Row matrix | only one row, order 1 × n | [3 0 −1 2] |
| Column matrix | only one column, order m × 1 | [4; −2; 7] |
| Zero (null) matrix O | every aᵢⱼ = 0 | [0 0 0; 0 0 0] |
| Square matrix | m = n (order n) | [1 2; 3 4] |
| Diagonal matrix | square, aᵢⱼ = 0 whenever i ≠ j | [5 0 0; 0 −1 0; 0 0 2] |
| Scalar matrix | diagonal with all diagonal entries equal to one number c | [3 0; 0 3] |
| Unit (identity) matrix Iₙ | diagonal entries 1, all others 0 | I₂ = [1 0; 0 1] |
| Upper triangular | square, aᵢⱼ = 0 for all i > j | [2 7 1; 0 4 3; 0 0 6] |
| Lower triangular | square, aᵢⱼ = 0 for all i < j | [2 0 0; 5 4 0; 1 3 6] |
In a square matrix of order n, the entries a₁₁, a₂₂, ..., aₙₙ form the principal (leading, main) diagonal. A matrix that is upper or lower triangular is called triangular. A few relations are worth noticing: every unit matrix is a scalar matrix (with c = 1); every scalar matrix is a diagonal matrix; a square zero matrix is a scalar matrix with c = 0; and a matrix that is both upper and lower triangular is a diagonal matrix. A matrix with at least one non-zero entry is a non-zero matrix.
Square matrices, from general to special
-
Triangular
Zeros on one side of the diagonal.
- Upper: zeros below the diagonal
- Lower: zeros above the diagonal
-
Diagonal
Both upper and lower triangular.
- Scalar: all diagonal entries equal
- Unit Iₙ: all diagonal entries 1
- Square zero matrix: scalar with c = 0
Equality of matrices
Two matrices A = [aᵢⱼ] and B = [bᵢⱼ] are equal, A = B, if and only if (i) they have the same order and (ii) aᵢⱼ = bᵢⱼ for every i and j. If either condition fails the matrices are unequal. So [1 2] ≠ [1; 2], because the orders 1 × 2 and 2 × 1 differ, even though the numbers are the same.
Worked example 4: finding unknowns
Find x, y, a, b if [x + y 2x − y; a + b a − b] = [7 2; 8 2]. Working: both are 2 × 2, so we compare entries. From x + y = 7 and 2x − y = 2, adding gives 3x = 9, so x = 3 and y = 4. From a + b = 8 and a − b = 2, adding gives 2a = 10, so a = 5 and b = 3. Check: 3 + 4 = 7, 6 − 4 = 2, 5 + 3 = 8, 5 − 3 = 2.
Order m × n = rows × columns. aᵢⱼ: row i first, column j second. Equal matrices: same order and every corresponding entry equal.
Key takeaways: a matrix is a rectangular array with order m × n; aᵢⱼ is in row i and column j; unit ⊂ scalar ⊂ diagonal ⊂ triangular among square matrices; and equality needs the same order and equal corresponding entries.
Check your understanding
-
1. A matrix has 10 elements. Which of these cannot be its order?
- 2 × 5
- 10 × 1
- 3 × 4
- 5 × 2
Show answer
Answer: C. The order m × n must satisfy m × n = 10. 2 × 5, 10 × 1 and 5 × 2 all give 10, but 3 × 4 gives 12 elements, so it is impossible.
-
2. For the 2 × 3 matrix with aᵢⱼ = 2i − j, what is the second row?
- [1 0 −1]
- [3 2 1]
- [2 1 0]
- [4 3 2]
Show answer
Answer: B. For i = 2: a₂₁ = 4 − 1 = 3, a₂₂ = 4 − 2 = 2, a₂₃ = 4 − 3 = 1. The second row is [3 2 1]. The first row would be [1 0 −1].
-
3. Which statement is true?
- Every diagonal matrix is a unit matrix
- Every scalar matrix is a unit matrix
- Every unit matrix is a scalar matrix
- A row matrix is always square
Show answer
Answer: C. A unit matrix is a diagonal matrix whose diagonal entries are all equal (to 1), so it is a scalar matrix. The reverse fails: [3 0; 0 3] is scalar but not a unit matrix, and [1 0; 0 2] is diagonal but neither.
-
4. The matrix [4 0 0; 9 1 0; 2 6 3] is
- upper triangular
- lower triangular
- a diagonal matrix
- a scalar matrix
Show answer
Answer: B. All entries above the main diagonal (a₁₂, a₁₃, a₂₃) are 0, while entries below it are not all zero. That is the condition aᵢⱼ = 0 for i < j, so the matrix is lower triangular.
-
5. If [x − y 4; 3 x + y] = [2 4; 3 8], what are x and y?
- x = 3, y = 5
- x = 6, y = 2
- x = 4, y = 4
- x = 5, y = 3
Show answer
Answer: D. Comparing entries: x − y = 2 and x + y = 8. Adding gives 2x = 10, so x = 5, and then y = 3. Check: 5 − 3 = 2 and 5 + 3 = 8.
Sign in to keep track of the lessons you finish.