A rectangular array of numbers

The data structure that runs the world

Every neural network, every search ranking, every image on your screen is, underneath, a matrix being multiplied. This site teaches you how that machinery works.

Start with the operations →

What is a matrix?

A matrix is a rectangular grid of numbers arranged in rows and columns. A matrix with \(m\) rows and \(n\) columns is called an \(m \times n\) matrix:

$$A = \begin{bmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \end{bmatrix} \quad \text{is a } 2 \times 3 \text{ matrix}$$

That definition sounds bureaucratic until you see what matrices do. A matrix is a machine for transforming space. Multiply a vector by a matrix and the vector rotates, stretches, shears, or projects. The animation above is a single 2×2 matrix continuously transforming a grid — that is what every layer of a neural network does to its input, millions of dimensions at a time.

The four chapters

A + B, AB, Aᵀ

Basic Operations

Addition, scalar and matrix multiplication, transpose, identity, inverse, and determinant — with a live calculator.

Ax = b

Linear Equations

Turn a system of equations into a single matrix equation and solve it with Gaussian elimination.

Av = λv

Eigenvalues & Eigenvectors

The special directions a matrix only stretches, never rotates — and why they reveal a matrix's true character.

y = Wx + b

Matrices in AI

Why modern artificial intelligence is, at its core, matrix multiplication performed at staggering scale.

Why this matters now

Linear algebra spent two centuries as a quiet tool of physicists and statisticians. Then deep learning arrived, and matrix multiplication became the single most executed mathematical operation on Earth. GPUs — the chips driving the AI boom — are fundamentally machines optimized for one job: multiplying enormous matrices in parallel.

If you understand matrices, you understand the substrate of modern AI. Start with the operations, or jump straight to how AI uses them.