Matrix, Order and the aija_{ij} Addressing Scheme

What a matrix is

A matrix is a rectangular array of numbers (or functions), arranged in rows and columns and enclosed in brackets. The entries are its elements. Matrices compress bookkeeping: the numbers of men and women in three families, the marks of a class in four subjects, the coefficients of a system of equations — each becomes a single object that can be computed with.

Order and addressing

Matrix addressing scheme with highlighted row, column, entry; six type cards

A matrix with mm rows and nn columns has order m×nm \times n (read "mm by nn" — rows first, always) and mnmn elements. We write A=[aij]m×nA = [a_{ij}]_{m \times n} where aija_{ij} is the entry sitting in row ii, column jj. So a23a_{23} lives in the second row, third column — the first subscript never means column.

Counting possible orders. A matrix with 8 elements can have any order m×nm \times n with mn=8mn = 8: namely 1×8, 2×4, 4×2, 8×11 \times 8, \ 2 \times 4, \ 4 \times 2, \ 8 \times 1 — one order per ordered factor pair. A matrix with a prime number of elements (say 13) has only the two extreme orders 1×131 \times 13 and 13×113 \times 1.

Building a matrix from a rule

Exam staple: construct the matrix whose entries obey a formula.

Worked construction. Build the 3×23 \times 2 matrix with aij=12∣i−3j∣a_{ij} = \frac{1}{2}\vert i - 3j \vert.

Step 1 — list the addresses: rows i=1,2,3i = 1, 2, 3 and columns j=1,2j = 1, 2.

Step 2 — evaluate each: a11=12∣1−3∣=1,a12=12∣1−6∣=52,a21=12∣2−3∣=12a_{11} = \tfrac{1}{2}\vert 1 - 3\vert = 1, \quad a_{12} = \tfrac{1}{2}\vert 1 - 6\vert = \tfrac{5}{2}, \quad a_{21} = \tfrac{1}{2}\vert 2 - 3 \vert = \tfrac{1}{2} a22=12∣2−6∣=2,a31=12∣3−3∣=0,a32=12∣3−6∣=32a_{22} = \tfrac{1}{2}\vert 2 - 6\vert = 2, \quad a_{31} = \tfrac{1}{2}\vert 3 - 3 \vert = 0, \quad a_{32} = \tfrac{1}{2}\vert 3 - 6\vert = \tfrac{3}{2}

Step 3 — assemble (rows across, columns down): first row 1,521, \frac{5}{2}; second row 12,2\frac{1}{2}, 2; third row 0,320, \frac{3}{2}.

The only real danger is swapping ii and jj — always evaluate with the address order (row, column).

Types of Matrices and Equality

The type gallery

Column matrix — one column, order m×1m \times 1. Row matrix — one row, order 1×n1 \times n.

Square matrix — rows == columns, called "of order nn". Its entries a11,a22,…,anna_{11}, a_{22}, \ldots, a_{nn} form the diagonal.

Diagonal matrix — square with every off-diagonal entry zero: bij=0b_{ij} = 0 for i≠ji \neq j. (Diagonal entries may be anything, including zero.)

Scalar matrix — a diagonal matrix whose diagonal entries are all equal to some constant kk.

Identity matrix InI_n — the scalar matrix with k=1k = 1: ones on the diagonal, zeros elsewhere. Every identity matrix is scalar; a scalar matrix is an identity matrix only when k=1k = 1.

Zero (null) matrix OO — all entries zero, of any order (not necessarily square).

The chain worth remembering: identity⊂scalar⊂diagonal⊂square\text{identity} \subset \text{scalar} \subset \text{diagonal} \subset \text{square}

Equality of matrices

Definition. A=[aij]A = [a_{ij}] and B=[bij]B = [b_{ij}] are equal exactly when (i) they have the same order, and (ii) aij=bija_{ij} = b_{ij} for every address (i,j)(i, j).

Equality is entry-by-entry, so a single matrix equation unpacks into a system of scalar equations — the chapter's standard "find the values" problem.

Worked unpacking. Find a,b,c,da, b, c, d if (a−b2a+c2a−b3c+d)=(−15013)\begin{pmatrix} a - b & 2a + c \\ 2a - b & 3c + d \end{pmatrix} = \begin{pmatrix} -1 & 5 \\ 0 & 13 \end{pmatrix}

Step 1 — equate corresponding entries: a−b=−1a - b = -1,  2a+c=5\ 2a + c = 5,  2a−b=0\ 2a - b = 0,  3c+d=13\ 3c + d = 13.

Step 2 — solve in a smart order: subtracting the first from the third: a=1a = 1; then b=2b = 2, c=5−2=3c = 5 - 2 = 3, d=13−9=4d = 13 - 9 = 4.

Answer: a=1, b=2, c=3, d=4a = 1, \ b = 2, \ c = 3, \ d = 4.

Consistency matters. If the system unpacked from a matrix equation is inconsistent, the matrices simply cannot be equal for any values — "not possible to find" is then the correct answer, and one such question is famous enough to appear in the exercises.

Common mistakes to avoid

Mistake 1 — reading aija_{ij} as (column, row). The first index is the row. a12a_{12} and a21a_{21} are different entries.

Mistake 2 — order written backwards. A matrix with 3 rows and 4 columns is 3×43 \times 4, never 4×34 \times 3.

Mistake 3 — comparing matrices of different orders. A 2×32 \times 3 matrix is never equal to a 3×23 \times 2 matrix, however similar the entries look.

Mistake 4 — 'diagonal' in a non-square matrix. The diagonal, and hence diagonal/scalar/identity types, exist only for square matrices; the zero matrix is the one special type of arbitrary shape.

Mistake 5 — solving only some of the unpacked equations. Every entry gives an equation; a candidate solution must satisfy all of them (else the correct verdict may be "not possible").

Solved Examples

Example 1 — Reading off order and entries

For A=(2519−735−2521231−517)A = \begin{pmatrix} 2 & 5 & 19 & -7 \\ 35 & -2 & \frac{5}{2} & 12 \\ \sqrt 3 & 1 & -5 & 17 \end{pmatrix}, find (i) the order, (ii) the number of elements, (iii) the entries a13,a21,a33,a24,a23a_{13}, a_{21}, a_{33}, a_{24}, a_{23}.

Step 1 — order: 3 rows, 4 columns: 3×43 \times 4.

Step 2 — count: 3×4=123 \times 4 = 12 elements.

Step 3 — address each entry (row first): a13=19,a21=35,a33=−5,a24=12,a23=52a_{13} = 19, \quad a_{21} = 35, \quad a_{33} = -5, \quad a_{24} = 12, \quad a_{23} = \frac{5}{2}

Answer: order 3×43 \times 4; 12 elements; values as above.

Example 2 — Counting possible orders

If a matrix has 8 elements, what are its possible orders? What if it has 5 elements?

Step 1 — factor pairs of 8: (1,8),(2,4),(4,2),(8,1)(1, 8), (2, 4), (4, 2), (8, 1) — four possible orders.

Step 2 — 5 is prime: only (1,5)(1, 5) and (5,1)(5, 1) — two orders.

Answer: 8 elements allow 1×8,2×4,4×2,8×11 \times 8, 2 \times 4, 4 \times 2, 8 \times 1; 5 elements allow only 1×51 \times 5 and 5×15 \times 1. (Ordered pairs: 2×42 \times 4 and 4×24 \times 2 are different orders.)

Example 3 — Construction from a rule

Construct the 2×22 \times 2 matrix A=[aij]A = [a_{ij}] with aij=(i+j)22a_{ij} = \dfrac{(i + j)^2}{2}.

Step 1 — evaluate all four addresses: a11=42=2,a12=92,a21=92,a22=162=8a_{11} = \frac{4}{2} = 2, \qquad a_{12} = \frac{9}{2}, \qquad a_{21} = \frac{9}{2}, \qquad a_{22} = \frac{16}{2} = 8

Step 2 — assemble: A=(292928)A = \begin{pmatrix} 2 & \frac{9}{2} \\ \frac{9}{2} & 8 \end{pmatrix}

Answer: as above — note the symmetry, inevitable since the rule depends only on i+ji + j.

Example 4 — A data matrix

A shop stocks 15 red pens, 20 blue pens in its first branch and 12 red, 28 blue in its second. Record the stock as a matrix and state what a21a_{21} represents.

Step 1 — choose the convention: rows = branches, columns = colours (red, blue): A=(15201228)A = \begin{pmatrix} 15 & 20 \\ 12 & 28 \end{pmatrix}

Step 2 — interpret: a21=12a_{21} = 12 is the entry in row 2 (second branch), column 1 (red pens).

Answer: a21a_{21} = red pens in the second branch. A matrix is only meaningful together with its row/column convention — state it.

Example 5 — Classify the types

Classify: A=[7]A = [7],  B=(2003)\ B = \begin{pmatrix} 2 & 0 \\ 0 & 3 \end{pmatrix},  C=(4004)\ C = \begin{pmatrix} 4 & 0 \\ 0 & 4 \end{pmatrix},  D=(1001)\ D = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix},  E=(0000)\ E = \begin{pmatrix} 0 & 0 \\ 0 & 0 \end{pmatrix}.

Step 1 — work down the chain: all five are square. BB: off-diagonal zeros, unequal diagonal → diagonal (not scalar). CC: diagonal with equal entries 4 → scalar (not identity). DD: scalar with k=1k = 1 → identity. EE: all zeros → zero matrix (also diagonal and scalar with k=0k = 0). AA: a 1×11 \times 1 matrix is simultaneously diagonal and scalar.

Answer: BB diagonal, CC scalar, DD identity, EE zero — the gallery in action, with the inclusions identity ⊂\subset scalar ⊂\subset diagonal visible.

Example 6 — Equality: solving the system

Find x,y,zx, y, z if (x+y25+zxy)=(6258)\begin{pmatrix} x + y & 2 \\ 5 + z & xy \end{pmatrix} = \begin{pmatrix} 6 & 2 \\ 5 & 8 \end{pmatrix}.

Step 1 — unpack: x+y=6x + y = 6,  5+z=5\ 5 + z = 5,  xy=8\ xy = 8 (and 2=22 = 2 is automatic).

Step 2 — solve: z=0z = 0; and x+y=6x + y = 6, xy=8xy = 8 make x,yx, y the roots of t2−6t+8=0t^2 - 6t + 8 = 0:  t=2,4\ t = 2, 4.

Answer: z=0z = 0 and {x,y}={2,4}\{x, y\} = \{2, 4\} (either assignment) — matrix equality routinely produces small nonlinear systems like this.

Example 7 — Equality: the inconsistent case

Can values of xx and yy make (3x+75y+12−3x)\begin{pmatrix} 3x + 7 & 5 \\ y + 1 & 2 - 3x \end{pmatrix} and (0y−284)\begin{pmatrix} 0 & y - 2 \\ 8 & 4 \end{pmatrix} equal?

Step 1 — unpack all four equations: 3x+7=03x + 7 = 0,  5=y−2\ 5 = y - 2,  y+1=8\ y + 1 = 8,  2−3x=4\ 2 - 3x = 4.

Step 2 — test consistency: the first gives x=−73x = -\frac{7}{3}; the fourth gives x=−23x = -\frac{2}{3} — contradiction (the two yy-equations agree on y=7y = 7, but xx cannot satisfy both of its equations).

Answer: not possible — no values of xx and yy make the matrices equal. Checking every equation is the entire point of this classic.