Linear Algebra for Machine Learning

Vectors, systems, matrices, transformations and eigenvectors, each one arriving before the thing that needs it.

Module 01.2 · Beginner
Free

12h · 15 lessons · 1 challenge

Before this: Array Programming & Vectorization

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 so that nothing is used before it has been taught: vectors, then the systems they solve, then matrices, then what matrices do to space, then the determinant, then eigenvectors, then PCA.

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

15 lessons

Kind
Concept
Length
40 min
Kind
Concept
Length
40 min
Kind
Concept
Length
50 min
Lesson 5
5Matrices and the matrix-vector product
Kind
Concept
Length
45 min
Lesson 6
6Matrix multiplication, three ways to see it
Kind
Concept
Length
50 min
Lesson 7
7Shape Golf: fix the broken forward pass
Kind
Interactive
Length
30 min
Lesson 8
8Linear transformations: matrices as maps
Kind
Concept
Length
50 min
Lesson 9
9Basis, column space and null space
Kind
Concept
Length
50 min
Lesson 10
10Determinants, inverses and when they blow up
Kind
Concept
Length
45 min
Lesson 11
11Change of basis
Kind
Concept
Length
40 min
Lesson 12
12Eigenvalues and eigenvectors
Kind
Concept
Length
50 min
Lesson 13
13Diagonalization, and why PCA needs it
Kind
Concept
Length
45 min
Lesson 14
14Implement PCA from scratch on real data
Kind
Lab
Length
90 min
Lesson 15
15Checkpoint: 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.

Related modules

All modules
Calculus & Optimization
9h · 11 lessons
Probability
8h · 12 lessons
Statistics & Inference
9h · 12 lessons