A matrix is a rectangular array of numbers. This compact notation encodes systems of equations, linear transformations, data tables, and geometric operations. Everything you do in applied linear algebra involves matrices.
The operations — addition, multiplication, transposition, and inversion — are not arbitrary rules. Each arises from the task of representing and composing linear transformations. Once you understand the motivation, the rules become natural.
This chapter lays the algebraic groundwork for solving systems (Chapter 3), understanding vector spaces (Chapter 4), and computing eigenvalues (Chapter 5).
Matrix notation and basic operations
An matrix has rows and columns. The entry in row , column is . A square matrix has .
Matrix addition: . Both matrices must have the same dimensions; you cannot add a to a .
Scalar multiplication: — every entry is scaled by .
The transpose is obtained by swapping rows and columns: . If is , then is . Key properties: (order reverses), , .
A matrix is symmetric if . Symmetric matrices appear ubiquitously in statistics (covariance matrices), physics (inertia tensors), and optimisation (Hessians). They are always square, and their eigenvalues are always real.
The trace of a square matrix is the sum of its diagonal entries: . It equals the sum of the eigenvalues of and satisfies even when .
💡Explain it simply
A matrix is a spreadsheet of numbers. Adding two matrices is adding two spreadsheets cell by cell — they must have the same shape. Multiplying by a scalar scales every cell. Transposing rotates the spreadsheet so rows become columns.
Addition and transpose
- ,.
- .
- .
- . Note became .
- Is symmetric? , so no.
Matrix multiplication
If is and is , the product is . The inner dimensions must match: columns of must equal rows of .
Each entry is a dot product: — row of dotted with column of .
Why this definition? It encodes composition of linear transformations. If and , then the composed map is represented by . The rule forces this definition.
Matrix multiplication is not commutative: in general, even when both products exist and have the same size. It is associative: , and distributive: .
The identity matrix (ones on the diagonal, zeros elsewhere) satisfies . It is the matrix analogue of the number .
Column picture: , a linear combination of the columns of with coefficients from . This column view is the key to understanding column spaces and linear independence.
💡Explain it simply
Matrix multiplication is like following two sets of instructions in sequence. maps inputs to an intermediate space; maps that to the final output. The product gives you the combined effect. Because the order of instructions matters, in general.
2×2 matrix multiplication
- ,.
- : row of · col of : .
- : row · col : .
- : row · col : .
- : row · col : .
- .
Determinants
The determinant is a scalar assigned to every square matrix that captures whether it is invertible, how it scales area/volume, and whether it preserves orientation.
For : . The main-diagonal product minus the anti-diagonal product.
Geometric meaning: is the factor by which the transformation multiplies area () or volume (). means areas are doubled; means the transformation collapses space to a lower dimension.
Sign of the determinant: means orientation is preserved (no reflection). means orientation is reversed.
The invertibility theorem: is invertible . A singular matrix (det ) squashes space and cannot be undone — its inverse does not exist. For and larger matrices, cofactor expansion is covered in Chapter 6.
💡Explain it simply
The determinant measures how much a matrix stretches or squishes space. A value of means it triples all areas. A value of means it reflects without changing size. A value of means it flattens everything — you lose a whole dimension and can never get it back.
Matrix inverse
The inverse of a square matrix satisfies . It exists if and only if . A matrix without an inverse is called singular.
For : . Swap the main-diagonal entries, negate the off-diagonal entries, and divide by the determinant.
For larger matrices, use Gauss-Jordan elimination: row-reduce the augmented matrix . When the left block reaches , the right block is .
The inverse solves immediately: . However, computing explicitly is costly. Gaussian elimination solves systems more efficiently without forming the inverse.
Key properties: (order reverses), , , .
Orthogonal matrices satisfy , so . For these matrices (rotations and reflections), the inverse is free — just transpose.
💡Explain it simply
The inverse undoes what the matrix does. Rotate : the inverse rotates . Double all lengths: the inverse halves them. A singular matrix flattens space — information is permanently lost and no inverse can recover it.
Inverse of a 2×2 matrix with verification
- Find for .
- . Inverse exists.
- .
- Verify: ✓.
Special matrices
Symmetric matrices: . By the Spectral Theorem (Chapter 8), all eigenvalues are real and there exists an orthonormal eigenvector basis. These arise in covariance matrices, Hessians, and physics.
Orthogonal matrices: . Columns are orthonormal. . They represent rotations () and reflections (). The inverse is simply the transpose: .
Diagonal matrices: nonzero entries only on the main diagonal. Trivial to invert (), multiply (), and exponentiate. Diagonalisation is the act of finding a basis in which a matrix looks diagonal.
Upper/lower triangular: all entries below/above the diagonal are zero. The determinant equals the product of diagonal entries. Systems (lower) are solved by forward substitution; (upper) by back substitution. The LU decomposition writes any invertible matrix as .
Idempotent matrices: . Projection matrices are idempotent — projecting twice gives the same result. They have eigenvalues and only.
💡Explain it simply
Symmetric matrices are perfectly balanced across their diagonal. Orthogonal matrices are rigid rotations — nothing stretches or shrinks. Diagonal matrices are the simplest: each axis is just scaled independently, with no mixing. These are the building blocks everything else reduces to.
Common Mistakes to Avoid
- Assuming . Matrix multiplication is almost never commutative. Even matrices fail this.
- Multiplying matrices with incompatible dimensions. An matrix can only right-multiply an matrix.
- Computing the inverse when . Singular matrices have no inverse. The formula gives division by zero.
- Confusing the transpose with the inverse. unless is orthogonal.
- Forgetting that and — both reverse the order.