Skip to content
DoingCamp CS

Make it comfy

Lesson style

Quick mode shows the key picture, a summary and the practice. Good for a refresher.

Theme
Font

Both fonts are designed to be easy to read. Some readers with dyslexia prefer Lexend.

Text size
Spacing
Animations

F08

Linear Algebra

“Arrows that stretch and spin the world”

Lessons

Start the course →0 of 20 lessons done
  1. Vectors: arrows and listsFreeA vector is two things at once, an arrow you can draw and a list of numbers a computer can store. You'll drag arrows around a grid, add them tip to tail, stretch them, and measure them, then use them to work out where a plane really goes when the wind pushes it sideways. · 14 min
  2. Linear combinations and spanFreeEvery color on your screen is made by mixing just three lights. That mixing, "some of this arrow plus some of that one", is a linear combination, and it's the most important move in linear algebra. You'll steer two arrows to reach any target, spray hundreds of random mixes to see what they can cover, and find the one way two arrows can get stuck on a line. · 15 min
  3. The dot productFreeHow can a computer tell that two songs, two documents or two people's tastes are alike? It turns them into vectors and measures the angle between them with one small calculation, the dot product. You'll drag two arrows and watch one cast a shadow on the other, find perpendicular arrows, and build a tiny movie recommender. · 15 min
  4. Matrices as transformations🔒 MembersA matrix is usually shown as a box of numbers, but really it's a way of moving the whole plane, turning it, stretching it or slanting it, while keeping grid lines straight. You'll grab the two basis arrows and drag them, watch the whole grid follow, and discover that the matrix's columns are simply where those two arrows land. · 17 min
  5. Matrix multiplication🔒 MembersDo one transformation, then another. The result is a single new transformation, and its matrix is the product of the two. You'll play two moves back to back, swap their order and see the result change, and learn why multiplying matrices uses that strange rows-times-columns rule. · 16 min
  6. Systems of equations🔒 MembersTwo equations, two unknowns. You can picture them as two lines that cross, or as two arrows that have to mix into a target. You'll tweak equations until their lines meet at a point, run parallel forever, or lie on top of each other, and find out why every system has exactly one, zero or infinitely many solutions, never two. · 15 min
  7. Elimination🔒 MembersCramer's rule gets hopeless beyond a few unknowns. The method every computer uses instead was written down in China about 2,000 years ago. Subtract multiples of one equation from another until the system is a staircase, then solve from the bottom up. You'll do it by hand on a real problem from that ancient book, and watch the lines move while the answer stays put. · 17 min
  8. Inverse matrices🔒 MembersIf a matrix moves the plane, can another matrix move it back? Usually, yes, and that undo-matrix is called the inverse. You'll hunt for the matrix that undoes a transformation, find the one kind of matrix that can never be undone, compute inverses by elimination, and then use them to crack a real 1929 cipher. · 16 min
  9. Determinants🔒 MembersEvery 2×2 matrix stretches or shrinks areas by one fixed factor, and that factor is a single number called the determinant. Negative means the plane got flipped over; zero means it got squashed flat. You'll watch the unit square grow, flip and collapse, discover that determinants multiply, and use them to measure the area of any polygon. · 16 min
  10. Independence, basis and dimension🔒 MembersPrinters use four inks, but colors only need three numbers. One ink is redundant, at least in theory. You'll turn 3D arrows around to see when one of them adds nothing new, pick the smallest set of arrows that still reaches everywhere, and pin down what "dimension" really means. · 16 min
  11. Column space, null space and rank🔒 MembersYour shadow is a flattened copy of you, and from a shadow alone you can't tell how tall someone is. Matrices that flatten things lose information in the same way. You'll find everything a matrix can reach (its column space), everything it crushes to zero (its null space), and the neat rule that ties their sizes together. · 16 min
  12. Orthogonality and projection🔒 MembersA ship's navigator wants to know how close it will pass to a lighthouse. The answer is a projection, the shadow of one arrow on another, and the closest point always sits at a right angle. You'll hunt for the closest point by hand, then see the one-line formula that finds it, the same formula behind fitting lines to data. · 15 min
  13. Least squares🔒 MembersReal data never lies exactly on a line, so the system "line through every point" has no solution. Least squares finds the line that misses by the least, measured as the total area of squares built on the misses. You'll shrink those squares by hand, see the exact answer, drag points to feel how an outlier pulls the line, and fit 60 years of real carbon dioxide measurements. · 17 min
  14. Orthonormal bases and Gram–Schmidt🔒 MembersThe friendliest basis is one where every arrow has length 1 and every pair meets at a right angle. Coordinates then come from simple dot products, and nothing ever gets distorted. You'll straighten a slanted pair of arrows into a perfect one, step by step, and use the same recipe to repair a game object's rotation after rounding errors have bent it out of shape. · 15 min
  15. Change of basis🔒 MembersManhattan's street grid is tilted about 29° from true north, so "walk uptown" and "walk north" are different instructions. The same arrow can be described in different bases, and the same transformation too. You'll translate coordinates between a slanted grid and the usual one, then hunt for the special basis in which a matrix becomes as simple as possible. · 16 min
  16. Eigenvectors and eigenvalues🔒 MembersWhen a matrix moves the plane, almost every arrow gets knocked off its line. But a few special arrows stay on their own line and only stretch. Those are eigenvectors, and their stretch factors are eigenvalues. You'll hunt for them by dragging, discover matrices that have none, and compute them with a short formula. Then you'll find the axis of a spinning globe. · 17 min
  17. Diagonalization and matrix powers🔒 MembersMultiplying by a matrix a hundred times sounds like a lot of work, unless you use its eigenvectors. In the eigenvector basis, every matrix is just a stretch along the axes, and a hundred stretches are one big stretch. You'll watch vectors swing toward the strongest eigenvector, and use this trick to get a formula for the Fibonacci numbers. · 16 min
  18. Power iteration and PageRank🔒 MembersIn 1998 two Stanford students ranked the whole web by finding one eigenvector of an enormous matrix, and the company they started became Google. You'll run their method by hand on a tiny web, change the links to see who wins, and code the algorithm that finds an eigenvector by doing nothing more than multiplying again and again. · 17 min
  19. Symmetric matrices and the SVD🔒 MembersEvery matrix, of any shape, does the same three things. It turns, it stretches along perpendicular directions, and it turns again. That's the singular value decomposition, often called the most useful fact in linear algebra. You'll watch a circle become an ellipse in three moves, meet the symmetric matrices whose eigenvectors are always perpendicular, and find the best one-pattern summary of a table of data. · 18 min
  20. Boss level: SVD image compressor🔒 MembersA grey photo is just a big matrix of brightness numbers, and the SVD splits it into layers from most to least important. Keep the first few layers and you keep most of the picture for a fraction of the numbers. You'll compress a picture (or your own photo) live, see which layers matter, and then build the whole compressor from scratch in Python, using everything from this course. · 25 min

💼 Already know this course?

Placement tests are coming soon. Until then, you can mark it as known so it’s colored in on your map. You can undo this any time.