Linear Algebra for Machine Learning

Vectors, matrices, projections and eigendecomposition, always attached to the model they show up in.

Module 01.1 · Beginner
Free

12h · 8 lessons · 1 challenge

About this module

A matrix multiply is the entire forward pass of a linear layer, and a shape error is the most common way a training run dies. This module builds linear algebra from vectors up, but every idea arrives attached to the place it appears in a model: projections as embeddings, rank as the bottleneck in a LoRA adapter, eigenvectors as the axes PCA rotates onto.

You will hand-multiply matrices before you are allowed to call NumPy, because the people who can do that are the people who can debug a shape mismatch in thirty seconds instead of an afternoon.

After this module you can

8 lessons

Lesson 1
Vectors, spans and the geometry of data
Kind
Concept
Length
45 min
Lesson 2
Matrix multiplication, three ways to see it
Kind
Concept
Length
50 min
Lesson 3
Shape Golf: fix the broken forward pass
Kind
Interactive
Length
30 min
Lesson 4
Linear transformations, rank and null space
Kind
Concept
Length
55 min
Lesson 5
Eigenvectors, eigenvalues and diagonalization
Kind
Concept
Length
60 min
Lesson 6
Implement PCA from scratch on real data
Kind
Lab
Length
90 min
Lesson 7
Determinants, inverses and when they blow up
Kind
Concept
Length
40 min
Lesson 8
Checkpoint: linear algebra in model shapes
Kind
Checkpoint
Length
25 min

The challenge: Shape Golf

Twenty broken forward passes, each one dimension wrong. Fix every one in as few edits as you can. The leaderboard ranks by edits, not time.

Worth 400 XP.

Start of the track

Calculus & Optimization

Related modules

All modules
Calculus & Optimization
12h · 9 lessons
Probability Foundations
10h · 7 lessons
Statistics & Inference
10h · 8 lessons