Linear Algebra for ML

The math every model is actually made of. Vectors, matrices as transformations, tensors, eigenvectors and SVD, each one built back to the line of model code that uses it.

FreeUpdated 12 Aug 20264 minEasy

Linear Algebra for ML

Most people meet linear algebra as a list of rules for pushing grids of numbers around. Then they meet machine learning, where those same grids turn out to be the whole substance of a model, and none of the rules feel connected to anything.

This course runs the other way. Every idea starts from something a model does, and the math arrives as the explanation.

Where this course is right now

All fourteen lessons are live, taking you from what a vector is up to the singular value decomposition. The course is complete.

The full arc runs through vectors and span, matrices as transformations, the tensor shapes that real forward passes use, rank and least squares, and finishes on eigenvectors, PCA and SVD.

Course mapHover any lesson to see why it matters

Prerequisites

No prerequisites

No math background, no install. A browser and about fifteen minutes

Lessons

01Beginner

What a vector actually is

One object, four ways to see it: a list, an arrow, a point, a row of data

02Beginner

Adding, scaling, span

Combine a few vectors, and see exactly which points you can reach

03Beginner

Length, distance, normalization

What "nearest" actually means, and why two honest answers can disagree

04Beginner

Dot product, angle, projection

One number, two ways to compute it, and the operation the rest of deep learning is built on

05Beginner

A matrix is a function

Not a grid of numbers. A rule that moves the whole plane, written in two columns

06Beginner

Matrix–vector multiplication

One row, one neuron, one number: the operation every forward pass runs

07Beginner

Matrix multiplication and the transpose

Two transformations become one matrix, and XYᵀ is every pairwise dot product at once

08Beginner

Rank, collapse and the matrix inverse

Rank counts what survives a transformation, and the inverse exists only when nothing was lost

09Beginner

Tensors, axes and broadcasting

What each axis means, and the rule that decides when mismatched shapes combine — or silently give the wrong answer

10Beginner

Least squares and the normal equation

The fitted values are the projection of y onto the column space of X, and the residual leaves it at a right angle

11Beginner

Change of basis

One vector, two coordinate systems, and the matrix that translates between them

12Beginner

Eigenvectors and eigenvalues

The directions a matrix stretches without turning, and the numbers that say by how much

13Beginner

The covariance matrix and eigendecomposition

The matrix of all pairwise covariances, and why its top eigenvector points along the data

14Beginner

Singular value decomposition and low-rank approximation

Every matrix factors as rotate, stretch, rotate — and keeping the strongest few is the best compression of its size

Unlocks

Foundations of Regression

The first full course. Recommended alongside this one, not after it

Start here

What a vector actually is takes about fifteen minutes and assumes nothing at all.

Test your understanding

Prof is ready

Prof will ask you questions about what the Linear Algebra for ML course covers and who it is for — not explain it. You'll be surprised what you don't know until you have to say it.

Finished this lesson?

Read through the lesson first (0/20s).