7 days · 8 modules · from vectors to attention

Linear Algebra in a Week

Learn to read every matrix as a transformation of space, then use that one picture to understand systems of equations, rank, projections, eigenvectors and the SVD. The course ends inside a transformer, where you trace every matrix product, count its cost and see why decoding is limited by memory bandwidth.

How every module works

  1. Big ideaOne or two sentences that carry the whole module. Read them first and again at the end.
  2. Read and playEvery concept gets a full explanation, a worked example and its own lab to drag and adjust. Predict before you move anything.
  3. Check yourselfEvery concept section ends with a few auto-checked questions, so you test each idea right after you read it. Answers can be numbers, fractions or vectors like 2, -1.
  4. By handA pencil-and-paper problem with a worked solution to check against.
  5. BuildA NumPy project that makes the idea concrete and connects it to inference code.

The seven days

Full-time, the course takes seven days of 6 to 9 hours each: modules 1 and 2 on day 1, then one module a day. Eigenvalues (day 5) and the transformer module (day 7) are the longest, so start those days early. Work through the modules in order, because each one supplies the language the next one uses.

A typical day: about an hour of video, two or three hours on the module page and its labs, an hour on paper with the section exercises and By hand problems, and one or two hours on the Build project. Don't skip the By hand problems or the checklists; they are what make this pace safe. If a checklist item doesn't come easily, give that module an extra half day rather than pushing on.

Part-time instead? Take one module a week, or two for eigenvalues and the transformer module. That is about 10 weeks at 4 to 6 hours a week, with exactly the same content.

  1. Day 11 · VectorsArrows you can stretch and add. The dot product measures how much two arrows agree.3Blue1Brown ch. 1, 2, 9 · MIT 18.06 lecture 1
  2. Day 12 · Matrices as mapsColumns show where the basis lands. Products chain transformations, so order matters.3Blue1Brown ch. 3, 4, 5 · MIT 18.06 lecture 3
  3. Day 23 · Solving Ax = bRow and column pictures, elimination, pivots, A = LU, inverses and determinants of any size.3Blue1Brown ch. 6, 7 · MIT 18.06 lectures 2, 4, 18
  4. Day 34 · The four subspacesRank, column space and null space, and why low rank means compressible.3Blue1Brown ch. 7, 8 · MIT 18.06 lectures 6, 7, 9, 10
  5. Day 45 · OrthogonalityOrthogonal matrices, complex numbers and RoPE, projections, least squares and QR.MIT 18.06 lectures 14, 15, 16, 17
  6. Day 56 · EigenvaluesDirections a matrix only stretches, change of basis, diagonalization, Jordan blocks, symmetric matrices and power iteration.3Blue1Brown ch. 13, 14 · MIT 18.06 lectures 21, 22, 24, 25
  7. Day 67 · SVD and low rankRotate, stretch, rotate. Best low-rank approximations, PCA and compression.MIT 18.06 lectures 29, 31 · MIT 18.065
  8. Day 78 · The math inside a transformerAttention as dot products, gradients of matmuls, floating-point formats and what decoding costs.Karpathy, Let's build GPT · 3Blue1Brown on attention

Before you start

Every module ends with a NumPy project. Any of your machines will do. Make a virtual environment once and reuse it all course:

shell

The videos are free: 3Blue1Brown's Essence of Linear Algebra for intuition, and Gilbert Strang's MIT 18.06 for depth and problem sets. If you want a second text alongside, Immersive Linear Algebra is free and interactive. Full citations for everything the course uses are on the Sources page.

Your progress

0%of section exercises answered and checklist items ticked

A module counts as done once every item in its end-of-module checklist is ticked. Progress lives in this browser, so it won't follow you to another device.