← All Guides

Matrices and Determinants Explained

A matrix is nothing more than a rectangular grid of numbers, but that simple idea turns out to be one of the most powerful tools in mathematics — it can hold an entire system of equations, a rotation in 3D space, or the layout of a spreadsheet, all using the same handful of operations.

What a Matrix Is

A matrix is described by its dimensions: rows first, then columns. A 2×3 matrix has 2 rows and 3 columns. Individual entries are referenced by position, so a2,1 means the entry in row 2, column 1. Matrices are used to store anything organized in a grid: pixel brightness values in an image, coefficients from a system of equations, or transformation instructions for rotating and scaling shapes in computer graphics.

Adding and Scaling Matrices

Two matrices can be added only if they have identical dimensions, and addition is done entry by entry: the entry in row 1, column 1 of the sum is the sum of the row-1-column-1 entries of each original matrix, and so on for every position. Scalar multiplication is just as direct — multiplying a matrix by 3 multiplies every single entry by 3. Both operations behave exactly the way ordinary arithmetic intuition suggests, which is part of why matrices are approachable once the notation clicks.

Matrix Multiplication Is Different

Multiplying two matrices is not entry-by-entry. To multiply matrix A (m×n) by matrix B (n×p), the number of columns in A must equal the number of rows in B. Each entry of the result is found by taking a row from A, a column from B, multiplying corresponding entries, and summing: entry (1,1) of the product is (row 1 of A) · (column 1 of B). This "row times column" rule is why matrix multiplication is generally not commutative — AB usually does not equal BA, unlike ordinary number multiplication.

The Determinant of a 2×2 Matrix

For a 2×2 matrix with entries a, b (top row) and c, d (bottom row), the determinant is ad − bc. For the matrix with rows [4, 3] and [2, 5], the determinant is (4 × 5) − (3 × 2) = 20 − 6 = 14. The determinant is a single number that captures important information about the matrix: how it scales area (a 2×2 matrix used as a transformation scales area by exactly the absolute value of its determinant), and whether the matrix can be inverted at all.

Determinants and Systems of Equations

A determinant of zero is a warning sign. If the coefficient matrix of a system of linear equations has a determinant of zero, the system does not have exactly one solution — it either has none or infinitely many, corresponding to lines (or planes, in higher dimensions) that are parallel or that coincide. This connects directly to the intersecting-lines picture used to explain systems of linear equations: a non-zero determinant guarantees the lines cross at exactly one point, while a zero determinant means they don't cross uniquely.

3×3 Determinants by Cofactor Expansion

Larger determinants are found by cofactor expansion along a row or column, breaking the problem into smaller 2×2 determinants multiplied by alternating signs. While the arithmetic gets longer, the underlying idea is unchanged: the determinant still measures whether the matrix's rows (or columns) are independent of one another, or whether one can be built from a combination of the others.

Why Any of This Matters

Matrices power the linear algebra behind computer graphics rendering, search engine ranking algorithms, structural load calculations in civil engineering, and the training of machine learning models, where data sets with millions of rows and thousands of columns are manipulated using exactly the same row-and-column operations covered here at a small scale.

Summary

A matrix is a grid of numbers that can be added, scaled, and multiplied according to specific rules, with matrix multiplication following a "row times column" pattern that is not commutative. The determinant, easiest to compute for a 2×2 matrix as ad − bc, indicates whether a matrix can be inverted and whether an associated system of equations has a unique solution. These ideas extend the reasoning used for systems of linear equations into a form flexible enough to handle problems with far more than two variables.