Matrices · Lesson 2 of 8
Matrix Types and Equality
“Recognise important matrix patterns and turn equality of matrices into equations.”
• Classify matrices by shape and by the positions of their nonzero entries. • Distinguish diagonal, scalar, identity, and zero matrices and explain their relationships. • Use the two requirements for equality of matrices. • Solve for unknown entries and recognise inconsistent matrix equalities. • Count matrices whose entries are chosen independently from a fixed set.
Names for useful shapes
Matrices with particular shapes or entry patterns occur repeatedly. Naming these patterns helps us state later rules precisely. A name describes a condition that every relevant entry must satisfy; one convenient-looking row is not enough to classify the whole matrix.
A row matrix has exactly one row, so its order is 1 × n. A column matrix has exactly one column, so its order is m × 1. The other dimension may be any positive integer. A matrix with one entry has order 1 × 1 and is both a row matrix and a column matrix.
A matrix is square when it has the same number of rows and columns. If its order is n × n, we may call it a square matrix of order n. It contains n² entries.
In a square matrix, the entries a₁₁, a₂₂, …, aₙₙ form its main diagonal, running from the top left to the bottom right. Their two indices are equal. All remaining entries are off the main diagonal and have i ≠ j. Unless another diagonal is explicitly mentioned, “the diagonal” in this chapter means this main diagonal.
From diagonal to scalar to identity
We now place restrictions on entries of square matrices. Each additional restriction creates a more specialised family. This is why a matrix can correctly have several names at the same time.
A diagonal matrix is a square matrix in which every off-diagonal entry is zero: aᵢⱼ = 0 whenever i ≠ j. Its diagonal entries need not be equal and may themselves be zero.
A scalar matrix is a diagonal matrix whose diagonal entries are all equal to one constant k. Thus aᵢⱼ = 0 for i ≠ j and aᵢᵢ = k for every i.
The word scalar refers to an ordinary number used to scale quantities. The matrix [3,0; 0,3] is a scalar matrix with k = 3. The matrix [3,0; 0,5] is diagonal but not scalar because the diagonal values are different. Equal diagonal entries alone are not sufficient: [3,1; 0,3] is not scalar, since its off-diagonal entry 1 is nonzero.
The identity matrix Iₙ is a square matrix of order n whose diagonal entries are all 1 and whose off-diagonal entries are all 0. When the order is clear, we write I.
An identity matrix is a scalar matrix with k = 1. Every scalar matrix is diagonal, and every diagonal matrix is square. The reverse statements fail: a square matrix may have nonzero off-diagonal entries, a diagonal matrix may have unequal diagonal entries, and a scalar matrix may have k different from 1. These distinctions will matter when we use I in matrix products.
Zero matrices and overlapping classifications
A zero matrix is defined by its values rather than by a particular shape. All its entries are zero. Remembering this prevents the common mistake of treating every zero matrix as square.
A zero matrix, denoted O, has every entry equal to zero. It may be rectangular or square; its order must be supplied or understood from context.
For instance, [0,0,0; 0,0,0] is a zero matrix of order 2 × 3. It is not diagonal, because diagonal matrices are square. In contrast, [0,0; 0,0] is simultaneously zero, square, diagonal, and scalar, with scalar value k = 0. It is not the identity matrix because its diagonal entries are not 1.
| Matrix | All applicable classifications from this lesson |
|---|---|
| [1] | Row, column, square, diagonal, scalar, identity |
| [−4, 0; 0, −4] | Square, diagonal, scalar |
| [2, 0; 0, 0] | Square, diagonal |
| [0, 0, 0] | Row, zero |
| [0, 0; 0, 0] | Square, diagonal, scalar, zero |
A square matrix with equal diagonal entries need not be scalar, and a matrix with zeros somewhere need not be a zero matrix. Apply every part of the definition, including the shape requirement.
When are two matrices equal?
Matrix equality compares the whole arrangement. We first check that the two arrays have matching dimensions, and then compare entries at corresponding addresses. Equal totals or equal collections of numbers are not enough.
Matrices A and B are equal exactly when they have the same order and aᵢⱼ = bᵢⱼ at every corresponding position. We write A = B.
The matrices [2,3; 0,1] and [3,2; 0,1] have the same shape and the same four values, yet they are unequal because their top-left entries differ. Likewise, a row [1,2] and a column [1;2] are unequal because their orders are different. Checking equality is therefore a complete position-by-position test.
Problem
Suppose [x+3, z+4, 2y−7; −6, a−1, 0; b−3, −21, 0] = [0, 6, 3y−2; −6, −3, 2c+2; 2b+4, −21, 0]. Find a, b, c, x, y, z.
- 1.Both arrays have order 3 × 3, so compare entries at the same addresses. The first row gives x+3 = 0, z+4 = 6, and 2y−7 = 3y−2.
- 2.These give x = −3, z = 2, and y = −5. The last equation follows by subtracting 2y, then adding 2: −5 = y.
- 3.The middle row gives a−1 = −3 and 0 = 2c+2, hence a = −2 and c = −1. The equality −6 = −6 imposes no new condition.
- 4.The bottom-left entries give b−3 = 2b+4, so b = −7. The other bottom-row entries already match.
- 5.Substituting a = −2, b = −7, c = −1, x = −3, y = −5, z = 2 checks every position. Do not stop after matching only one row.
Problem
Find a, b, c, d if [2a+b, a−2b; 5c−d, 4c+3d] = [4, −3; 11, 24].
- 1.The first row gives 2a+b = 4 and a−2b = −3. Multiply the second equation by 2 to obtain 2a−4b = −6.
- 2.Subtract this from 2a+b = 4. The result is 5b = 10, so b = 2 and then a = 1.
- 3.The second row gives 5c−d = 11 and 4c+3d = 24. Multiply the first equation by 3: 15c−3d = 33.
- 4.Add the equations to get 19c = 57, so c = 3. Then 15−d = 11 gives d = 4.
- 5.Check the complete matrix: [2(1)+2, 1−2(2); 5(3)−4, 4(3)+3(4)] = [4,−3;11,24].
Problem
Can [3x+7, 5; y+1, 2−3x] equal [0, y−2; 8, 4]?
- 1.The top-right equality gives 5 = y−2, hence y = 7. The bottom-left equality y+1 = 8 agrees with this value.
- 2.The top-left equality gives 3x+7 = 0, hence x = −7/3. But the bottom-right equality gives 2−3x = 4, hence x = −2/3.
- 3.One x cannot take both values. There is no pair (x,y) making the matrices equal, even though the two conditions on y are consistent.
- 4.A matrix equality requires all corresponding equations to hold at once. Satisfying selected entries does not establish equality.
Counting possible matrices
A fixed order fixes the positions but not the values stored there. If each position can be filled independently from a set of allowed values, count the choices one position at a time. This connects the entry count to a useful pattern.
Problem
How many different 3 × 3 matrices have every entry equal to either 0 or 1?
- 1.There are 3 × 3 = 9 separate positions. Each position has two choices, independently of the other positions.
- 2.The multiplication principle gives 2×2×2×2×2×2×2×2×2 = 2⁹ = 512 matrices.
- 3.These need not be diagonal or symmetric. Adding either restriction would link some positions or force particular values, changing the count.
- 4.More generally, r independent choices at each of mn positions produce r^(mn) matrices of order m × n. Here r = 2 and mn = 9.
Quiz
Which condition defines a diagonal matrix?
Which matrix is scalar but is not an identity matrix?
A zero matrix of order 2 × 3 is necessarily which type?
What must be checked before comparing corresponding entries of two matrices?
If [2x+1, y; 0, 3] = [7, −2; 0, 3], what are x and y?
How many 2 × 2 matrices can be formed if each entry is independently 0 or 1?
Practice Problems
- Find x, y, z where relevant in each equality: (a) [4,3; x,5] = [y,z;1,5]; (b) [x+y,2;5+z,xy] = [6,2;5,8]; (c) [x+y+z;x+z;y+z] = [9;5;7]. Check every resulting equality.
- Solve [a−b, 2a+c; 2a−b, 3c+d] = [−1,5;0,13] for a, b, c, d.
- Explain why an m × n matrix is square exactly when m = n. Classify [1], [0,0], [2,0;0,2], [2,0;0,3], and [0,0;0,0] using every applicable name.
- Recheck the impossible equality [3x+7,5;y+1,2−3x] = [0,y−2;8,4] by substituting x = −7/3 and y = 7. Identify the single entry that still fails.
- Count the 3 × 3 matrices with entries 0 or 1. Then count only those that are diagonal. Explain which choices are removed by the diagonal condition.
- Give a square matrix that is not diagonal, a diagonal matrix that is not scalar, and a scalar matrix that is not identity. Explain each example from the definitions.
Key Takeaways
• Row and column matrices have one row and one column respectively; square matrices have equal row and column counts. • Identity matrices are scalar, scalar matrices are diagonal, and diagonal matrices are square. • A zero matrix can have any order; only a square zero matrix belongs to the diagonal and scalar families. • Matrix equality requires both matching orders and equality at every corresponding position. • Unknown entries give simultaneous equations; inconsistent conditions mean that no such equality is possible. • Independent entry choices are counted across all mn positions.