Equality of matrices

Two tables of numbers can look completely different in size, in shape, in every entry — and a matrix equation quietly asks you to check all of that at once. "Equality of matrices" sounds like it should mean the obvious thing, but the definition is stricter than most students expect: a matrix of one shape can never equal a matrix of a different shape, no matter what numbers sit inside it, and even two matrices of the same shape need every single entry to match before you can call them equal. That strictness is exactly what makes the idea useful. When an exam question hides unknowns like xx, yy, zz inside a matrix equation, comparing the two matrices position by position turns one matrix equation into a small system of ordinary algebraic equations — the kind you already know how to solve. This article makes that comparison mechanical and shows where students lose marks doing it.

The core insight

Two matrices are equal only if they have the same order and every corresponding entry matches, so a matrix equation with unknown entries splits into one ordinary equation per position.

The core idea

A matrix's order is its shape, written rows times columns: an m×nm \times n matrix has mm rows and nn columns. Equality of matrices demands agreement on two separate fronts — shape first, then content. Two matrices A=[aij]m×nA = [a_{ij}]_{m \times n} and B=[bij]p×qB = [b_{ij}]_{p \times q} are equal, written A=BA = B, exactly when both of the following hold:

A=B  ⟺  (m=p and n=q)  and  (aij=bij  for every i,j)A = B \iff \big(m = p \text{ and } n = q\big) \ \text{ and } \ \big(a_{ij} = b_{ij} \ \text{ for every } i, j\big)

where: aija_{ij} denotes the entry of AA in row ii, column jj (and likewise bijb_{ij} for BB); m×nm \times n and p×qp \times q are the orders of AA and BB; the condition must hold for every valid pair i,ji, j, not just some of them. Order agreement is checked first because it is a yes-or-no gate: if AA is 2×32 \times 3 and BB is 3×23 \times 2, the two are never equal, however similar their entries look. Only once the orders match does entry-by-entry comparison become meaningful. Because comparison happens position by position, an m×nm \times n equality statement is really mnmn separate scalar equalities bundled into one compact line — which is precisely why matrices are convenient for writing systems of equations compactly, and why "unbundling" a matrix equation into scalar equations is a core exam skill.

Figure
Two same-size grids side by side compared cell by cell with matching pairs joined by a line
Equality of matrices: same order, entry by entry Matrix A (2x2) Matrix B (2x2) x+y 2 z w-1 6 2 3 4 Same order (2x2) is checked first, then each matching pair of entries is set equal x+y=6, z=3, w-1=4 give three equations from four entry positions

Order matters even when the numbers look familiar

If two matrices contain exactly the same numbers but arranged into different shapes — say a row matrix and a column matrix holding 1,2,31, 2, 3 — the order condition fails immediately and the matrices are unequal, full stop. Matching numbers are not the same as matching matrices; equality is a statement about a whole object, shape and content together, not just about the values that happen to appear somewhere inside it. Keep this order-first check as your automatic first move on every equality problem.

Derivation ATurning a matrix equation into a system of scalar equations

The goal is to show, in general and not just by example, that an equality statement between two m×nm \times n matrices A=[aij]A = [a_{ij}] and B=[bij]B = [b_{ij}] with the same order is logically identical to a system of exactly mnmn scalar equations aij=bija_{ij} = b_{ij}, one for each row-column position, and that this equivalence is what lets unknown entries in a matrix equation be solved by ordinary algebra rather than by any special matrix technique.

Step 1. Start from the definition. A=BA = B means, by definition, that AA and BB have the same order and that aij=bija_{ij} = b_{ij} for every ii from 11 to mm and every jj from 11 to nn. This is not one condition but a conjunction of mnmn individual equalities plus the order check — the definition is already, in disguise, a system.

Step 2. List the positions. An m×nm \times n matrix has mnmn entry positions: (1,1),(1,2),…,(1,n),(2,1),…,(m,n)(1,1), (1,2), \dots, (1,n), (2,1), \dots, (m,n). Writing aij=bija_{ij} = b_{ij} separately for each of these mnmn positions produces mnmn scalar equations, each an ordinary equation in whatever unknowns appear in that position.

Step 3. Confirm equivalence in both directions. If A=BA = B as matrices, every one of those mnmn scalar equations must hold, by Step 1. Conversely, if all mnmn scalar equations aij=bija_{ij} = b_{ij} hold and the orders already agree, then by definition A=BA = B. So "A=BA = B" and "the full list of mnmn scalar equations holds" are exactly the same statement, just written two different ways.

Step 4. Read off the practical consequence. Solving a matrix equation for unknown entries never needs new matrix machinery: write out the (up to) mnmn scalar equations position by position, then solve that ordinary system with substitution or elimination as usual. Some of the mnmn equations may involve no unknowns at all (both sides already numbers, giving an automatic check), and some may repeat information found elsewhere, so the number of independent equations can be less than mnmn — always count how many genuinely new equations you have before assuming every unknown is pinned down.

Worked example

Find xx, yy, zz, ww given that

[x+y2zw−1]=[6234],with the extra condition x−y=2.\begin{bmatrix} x + y & 2 \\ z & w - 1 \end{bmatrix} = \begin{bmatrix} 6 & 2 \\ 3 & 4 \end{bmatrix}, \qquad \text{with the extra condition } x - y = 2.

Step 1. Check order first. Both matrices are 2×22 \times 2, so the order condition is satisfied and entry-by-entry comparison is valid.

Step 2. Write the four position equations. Position (1,1)(1,1): x+y=6x + y = 6. Position (1,2)(1,2): 2=22 = 2 (automatically true, no new information). Position (2,1)(2,1): z=3z = 3. Position (2,2)(2,2): w−1=4w - 1 = 4.

Step 3. Solve the equations that involve unknowns directly. From position (2,1)(2,1), z=3z = 3. From position (2,2)(2,2), w=4+1=5w = 4 + 1 = 5. These two are settled immediately since each involves only one unknown.

Step 4. Solve the linked pair x+y=6x + y = 6 together with the supplied extra condition x−y=2x - y = 2. Adding the two equations: 2x=82x = 8, so x=4x = 4. Substituting back into x+y=6x + y = 6 gives y=6−4=2y = 6 - 4 = 2.

Step 5. Verify by substitution. x+y=4+2=6x + y = 4 + 2 = 6 ✓, position (1,2)(1,2) is 2=22 = 2 ✓, z=3z = 3 ✓, w−1=5−1=4w - 1 = 5 - 1 = 4 ✓. Answer: x=4x = 4, y=2y = 2, z=3z = 3, w=5w = 5.

Competitive stretch

If instead only x+y=6x + y = 6 were given (no second condition), the system would be under-determined: z=3z = 3 and w=5w = 5 would still be fixed uniquely, but xx and yy could take infinitely many pairs of values satisfying x+y=6x + y = 6 (such as x=1,y=5x=1,y=5 or x=0,y=6x=0,y=6). Recognising when a matrix equation leaves a free parameter — rather than assuming every unknown is always pinned down — is a common higher-order-thinking twist on this topic.

Common traps

  • Comparing entries before checking that the two matrices have the same order — order must match first; if it doesn't, stop, the matrices are unequal regardless of entries.
  • Judging equality by "the same numbers appear somewhere in both" — a row matrix and a column matrix holding identical numbers are never equal, because their orders differ.
  • Skipping an entry position while comparing, which silently drops an equation and can leave an unknown unsolved.
  • Assuming an m×nm \times n matrix equation always yields mnmn independent equations — some positions may already be numerically equal (giving no new equation) or may repeat information from another position, so the equation count can be less than mnmn.

Ask the tutor: Stuck matching entries in a matrix-equality problem with several unknowns, or want to check whether your system of equations is actually solvable? Ask the AI tutor to walk through it with you.

Why do we need to check order before comparing entries?

Because order is a strict yes-or-no gate that entries cannot override. Two matrices of different order describe fundamentally different objects — a 2×32\times3 matrix has six entries arranged one way, a 3×23\times2 matrix has six entries arranged another way, and there is no meaningful position-by-position comparison between them. Checking order first also saves time: if it fails, you can declare the matrices unequal immediately without touching a single entry.

If a matrix equation gives me four unknowns but one equation turns out to be 2 equals 2, have I made a mistake?

No — this happens naturally whenever a known entry in one matrix already matches the corresponding known entry in the other. It simply means that particular position carries no new information about your unknowns, so you are left with fewer independent equations than positions. If that leaves an unknown without enough equations to solve uniquely, the problem usually supplies an extra condition (as in the worked example's x−y=2x - y = 2); without one, that unknown stays undetermined or only its combination with another unknown (like x+yx+y) can be found.

Is equality of matrices the same as two matrices being proportional or similar in size?

No, and mixing these up is a common error. Equality is exact: identical order and identical entries at every position, nothing more and nothing less. "Proportional" (one matrix being a scalar multiple of another) or "same size" (same order, but different entries) are entirely different relationships. A matrix scaled by 2 is generally not equal to the original matrix, even though the two are closely related; equality never allows scaling, rounding, or approximation.

Before this

Where this leads