Skip to lesson content

Lesson 2 of 8

Matrices · Lesson 2 of 8

Matrix Types and Equality

“Recognise important matrix patterns and turn equality of matrices into equations.”

Learning Objectives

• 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.

Definition
Square 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.

Row, column, and square examplesLaTeX
R has order 1 × 4, C has order 4 × 1, and S has order 2 × 2. “Square of order 2” means 2 × 2, not two 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.

Definition
Diagonal matrix

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.

Diagonal matricesLaTeX
D is diagonal despite having a zero diagonal entry. Every 1 × 1 matrix is diagonal because it has no off-diagonal positions.
Definition
Scalar matrix

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.

Definition
Identity matrix

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.

The identity entry ruleLaTeX
The subscript n records the size of the identity. I₂ and I₃ have the same entry pattern but different orders.

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.

Each inner family satisfies every outer conditionSquare: n rows and n columnsDiagonal: off-diagonal entries are zeroScalar: equal diagonal entriesIdentity: diagonal entries are 1A rectangular zero matrix lies outside these square families.
Relationships between special square matrices— Read from the innermost box outward: identity matrices also satisfy the scalar, diagonal, and square conditions.

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.

Definition
Zero or null matrix

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.

MatrixAll 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
Do not classify from just one feature

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.

Definition
Equality of matrices

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.

Example — Matching six unknowns

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. 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. 2.These give x = −3, z = 2, and y = −5. The last equation follows by subtracting 2y, then adding 2: −5 = y.
  3. 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. 4.The bottom-left entries give b−3 = 2b+4, so b = −7. The other bottom-row entries already match.
  5. 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.
Example — Two simultaneous systems inside one equality

Problem
Find a, b, c, d if [2a+b, a−2b; 5c−d, 4c+3d] = [4, −3; 11, 24].

  1. 1.The first row gives 2a+b = 4 and a−2b = −3. Multiply the second equation by 2 to obtain 2a−4b = −6.
  2. 2.Subtract this from 2a+b = 4. The result is 5b = 10, so b = 2 and then a = 1.
  3. 3.The second row gives 5c−d = 11 and 4c+3d = 24. Multiply the first equation by 3: 15c−3d = 33.
  4. 4.Add the equations to get 19c = 57, so c = 3. Then 15−d = 11 gives d = 4.
  5. 5.Check the complete matrix: [2(1)+2, 1−2(2); 5(3)−4, 4(3)+3(4)] = [4,−3;11,24].
Example — Recognising an impossible equality

Problem
Can [3x+7, 5; y+1, 2−3x] equal [0, y−2; 8, 4]?

  1. 1.The top-right equality gives 5 = y−2, hence y = 7. The bottom-left equality y+1 = 8 agrees with this value.
  2. 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. 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. 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.

Example — Matrices made from zero and one

Problem
How many different 3 × 3 matrices have every entry equal to either 0 or 1?

  1. 1.There are 3 × 3 = 9 separate positions. Each position has two choices, independently of the other positions.
  2. 2.The multiplication principle gives 2×2×2×2×2×2×2×2×2 = 2⁹ = 512 matrices.
  3. 3.These need not be diagonal or symmetric. Adding either restriction would link some positions or force particular values, changing the count.
  4. 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

Quick check

Which condition defines a diagonal matrix?

Quick check

Which matrix is scalar but is not an identity matrix?

Quick check

A zero matrix of order 2 × 3 is necessarily which type?

Quick check

What must be checked before comparing corresponding entries of two matrices?

Quick check

If [2x+1, y; 0, 3] = [7, −2; 0, 3], what are x and y?

Quick check

How many 2 × 2 matrices can be formed if each entry is independently 0 or 1?

Practice Problems

Practice Problems
  1. 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.
  2. Solve [a−b, 2a+c; 2a−b, 3c+d] = [−1,5;0,13] for a, b, c, d.
  3. 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.
  4. 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.
  5. 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.
  6. 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

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.