§1Matrix anatomy
A matrix of order m × n has m rows and n columns; the element aij lives in row i, column j — row first, always.
Special citizens: a square matrix has m = n; a diagonal matrix is square with zeros off the main diagonal; the identity I is diagonal with ones, and multiplies like the number 1; a column vector is n × 1 — the natural container for a point’s coordinates or a system’s unknowns. This page works one running example throughout:
§2Addition, subtraction and scalar multiples
Same-order matrices add element by element; a scalar multiplies every element. Nothing subtler is going on.
Addition is commutative and associative, exactly like ordinary numbers — the surprises are saved for multiplication. Matrices of different orders simply cannot be added; a dimension check is the first line of every matrix calculation worth trusting.
Contents§3Matrix multiplication
The product element is a row of the first matrix dotted with a column of the second: multiply pairwise, add up. Orders must chain — (m × n)(n × p) gives m × p.
123456 × 789101112 = 27303361687595106117
Top-left entry: (1)(7) + (2)(10) = 27 — row one, column one. The inner dimensions (2 and 2) matched, so the product exists and is 3 × 3.
In general AB ≠ BA — reversing the factors above gives a 2 × 2, a different object entirely. Matrix products encode sequences of operations, and sequences care about order: rotate-then-translate is not translate-then-rotate.
§4Transpose
The transpose Aᵀ flips a matrix across its main diagonal: rows become columns.
A matrix equal to its own transpose is symmetric — the shape stiffness and inertia matrices take in structural work, which is why the transpose rule for products (note the reversal) appears constantly in mechanics derivations.
Contents§5Determinants
The determinant condenses a square matrix to one number that answers the big question: does the system it represents have a unique solution? Zero means no.
Expand det A along the first row, each entry times the 2 × 2 determinant left after deleting its row and column, signs alternating + − +:
det A = 1(5·8 − 3·0) − 2(2·8 − 3·1) + 3(2·0 − 5·1) = 40 − 26 − 15 = −1.
| Operation on the matrix | Effect on det |
|---|---|
| Swap two rows (or columns) | changes sign |
| Multiply a row by k | multiplies det by k |
| Add a multiple of one row to another | no change — the elimination workhorse |
| Two equal rows / a zero row | det = 0 |
| Product | det(AB) = det A · det B |
| Transpose | det Aᵀ = det A |
§6Minors, cofactors and the adjoint
Delete row i and column j and take the determinant of what remains: that is the minor Mij. Sign it by position and it becomes the cofactor; assemble and transpose the cofactors and the adjoint appears.
Computing all nine cofactors of A (the chequerboard of signs applied to each 2 × 2 minor) gives the cofactor matrix, then its transpose:
adj A = 40−16−9−1353−521
Spot-check one entry: C₂₁ = −det2308 = −16 — row 2, column 1 of the cofactor grid, landing at row 1, column 2 of the adjoint after the transpose. ✓
§7Rank and singularity
The rank counts how many genuinely independent rows a matrix carries. A square matrix whose rank falls short of its size is singular — determinant zero, no inverse, and any system built on it lacks a unique answer.
Singularity in practice means the equations repeat information: two force balances that say the same thing, two measurements of the same combination. The cure is never numerical — it is a genuinely independent extra equation.
Contents§8The inverse
The inverse undoes: A⁻¹A = I. It exists exactly when det A ≠ 0, and the adjoint delivers it directly.
det A = −1, so A⁻¹ is the adjoint with every sign flipped:
A⁻¹ = −4016913−5−35−2−1
Check by multiplying: row 1 of A times column 1 of A⁻¹ = (1)(−40) + (2)(13) + (3)(5) = 1; every other diagonal entry lands on 1 and every off-diagonal on 0 — A·A⁻¹ = I. ✓
The adjoint route is transparent and exact for 2 × 2 and 3 × 3 work. From 4 × 4 upward its cost explodes; systematic row-elimination (Gauss–Jordan) is the practical method, and for solving a single system even the inverse itself is a detour — eliminate straight to the answer.
§9Solving simultaneous equations
Three unknowns, three equations, one matrix statement: A x = b. The running example solves the system below three ways and gets one answer.
Replace each column of A by b in turn and take determinants: det A₁ = −1, det A₂ = −2, det A₃ = −3. Then
x = −1/−1 = 1, y = −2/−1 = 2, z = −3/−1 = 3.
x = A⁻¹b: row 1 gives (−40)(14) + (16)(21) + (9)(25) = −560 + 336 + 225 = 1; rows 2 and 3 give 2 and 3. Same (1, 2, 3) — as elimination also confirms in three row-operations. Cramer suits a one-off 3 × 3 by hand; the inverse pays when many right-hand sides b share one A; elimination wins everything larger.
§10Rotation matrices
Rotating coordinates is a matrix product — the cleanest bridge between this page and the machine.
Hole 1 of the 7-hole Ø96 pattern (Solution of Triangles, §3) sits at (0, 48). Rotating by −360°/7 = −51.4286°: x′ = 0 × 0.6235 + 48 × 0.7818 = 37.528, y′ = 29.928 — exactly hole 7 of the ordinate table. One matrix, applied six times, generates the whole pattern; this is precisely what a CNC coordinate-rotation cycle executes.
Rotation matrices are orthogonal: the inverse is simply the transpose (rotate back = flip the sign of θ), and the determinant is +1 — a rotation changes no lengths and no areas, and the algebra says so.
Contents§11Quick reference
The working core of the page on one card rack.
Product
(AB)ᵢⱼ = Σ aᵢₖbₖⱼ
(m×n)(n×p) → m×p; AB ≠ BA
Determinant 2×2
ad − bc
det = 0 ⇒ singular
Inverse
A⁻¹ = adj A / det A
A⁻¹A = I
Cramer
xᵢ = det Aᵢ / det A
Aᵢ: column i replaced by b
Transpose
(AB)ᵀ = BᵀAᵀ
Rotation
[cosθ −sinθ; sinθ cosθ]
inverse = transpose
