Skip to content

Stage 1 · From scratch · MA3

Matrices at work

To teach a model with 175 billion numbers a new job, you can train about 10,000 times fewer of them, because the change it needs is thin.

13 lessons · 126 minSteady

About this chapter

A matrix is more than a table. It stretches, flips, squashes and rewinds space, and a few numbers tell you which. You will drag arrows until a matrix only stretches them, repeat one move a hundred times and watch one direction win, then tilt a cloud of data until its best flat view appears. Every matrix turns out to be turn, stretch, turn, and the big stretches are the only ones worth keeping. That is how a huge model gets fine-tuned by a thin slice of change. No formula is needed to follow any of it.

What you will be able to do

  1. 1

    How much it stretches

    Predict the area of any moved shape from one number, and say what its sign and its zero mean.

    9 min
  2. 2

    Undoing a move

    Rewind a move with its inverse, solve a small system with it, and say when no rewind exists.

    9 min
  3. 3

    Squashed flat

    Count the independent directions a matrix keeps, and say what a squash throws away for good.

    9 min
  4. 4

    Arrows that keep their line

    Find the arrows a matrix only stretches, and read the stretch factor off each one.

    9 min
  5. 5

    Doing it a hundred times

    Say why repeating one matrix lets a single direction win, and why that makes deep nets explode or fade.

    10 min
  6. 6

    Flip it, then look

    Flip a matrix over its diagonal, and say why a table of dot products is its own mirror image.

    10 min
  7. 7

    The shape of a cloud

    Build the table that describes a cloud of data, and read its lean and its spread.

    10 min
  8. 8

    The best flat view

    Find the direction a cloud is widest in, and say why it is an eigenvector of the covariance table.

    10 min
  9. 9

    Rotate, stretch, rotate

    Split any matrix into a turn, a stretch along the axes and another turn, and read its singular values.

    10 min
  10. 10

    Keep the big parts

    Rebuild a table from a few of its layers, and say what rank costs and what it keeps.

    10 min
  11. 11

    A thin slice of change

    Count what a low-rank update trains, and say why a huge model can be tuned through a thin slice.

    10 min
  12. 12

    Tensors and shapes

    Read a tensor's shape, say what two shapes allow, and spot the shape bug that does not crash.

    10 min
  13. 13

    Where each idea lands

    Point at the place in a model where each idea from this chapter does its job.

    10 min

Before you start

All chapters