Back to index
OtherA semester, 36 lectures with problem sets and a final project·Free

MIT 18.065: Matrix Methods in Data Analysis, Signal Processing and Machine Learning

4.7

Strang teaching the linear algebra that matters for machine learning, which is a different and better selection of topics than a standard linear algebra course offers. One of the most valuable free resources in this entire catalogue.

What We Liked

  • Strang is among the finest mathematics teachers ever recorded, and it shows in every lecture
  • Topic selection is aimed squarely at what machine learning actually needs
  • The treatment of SVD as the central object is the right organising choice
  • Complete OCW package with videos, notes, problem sets and instructor commentary, all free

What Could Be Better

  • Assumes you have already done a first linear algebra course such as 18.06
  • The 2018 recording predates the transformer era, so no attention mechanism content
  • Lecture-driven with no coding component, so you build the maths and not the implementation
  • Some later lectures on deep learning are the weakest part of an otherwise superb course

Detailed review

Gilbert Strang has taught linear algebra to more people than probably anyone alive, and 18.065 is what he built when he asked which parts of the subject a person doing machine learning and data analysis actually needs. The answer turns out to differ considerably from a standard syllabus, and that curation is the course's main value. A conventional linear algebra course spends a long time on determinants, on Cramer's rule, on computing eigenvalues of small matrices by hand. Almost none of that is load-bearing in machine learning.

18.065 reallocates the time to what is: the singular value decomposition, low rank approximation, least squares in its several forms, the four fundamental subspaces as a way of understanding what a linear map does and does not preserve, matrix factorisations as the organising idea of numerical linear algebra, norms and their consequences for regularisation, and optimisation including gradient descent and its behaviour on badly conditioned problems. The SVD is treated as the central object of the whole subject, and I think that is exactly right. Once you see that every matrix factors into a rotation, a scaling and another rotation, that the singular values tell you where the information is, and that truncating them gives you the best low rank approximation in a precise sense, an enormous amount of machine learning stops being mysterious. Principal component analysis is the SVD.

Recommendation systems built on matrix factorisation are the SVD. The reason a neural network layer with a bottleneck compresses is the SVD. Latent semantic analysis is the SVD. A student who understands it deeply has acquired a lens that keeps paying off for years, and Strang builds that understanding with more patience and more geometric intuition than any other treatment I have encountered.

Then there is the teaching itself. Strang lectures without hiding behind formalism. He tells you what he is about to show you, shows you, then tells you what mattered about it, and he does this with an evident pleasure in the material that is genuinely infectious. He will stop and say that a particular fact is remarkable, and it is remarkable, and you find yourself agreeing with a man at a blackboard about the beauty of a matrix decomposition.

That quality of teaching is rare at any price and this is free. The OCW package is complete. Video lectures, the accompanying textbook structure, problem sets, a final project description, and the instructor insights section where Strang discusses his pedagogical choices, which is worth reading on its own if you teach anything. Everything under Creative Commons, downloadable, no account.

The criticisms are modest. It is not a first course. You need 18.06 or its equivalent already, and someone arriving without knowing what a vector space is will struggle by week two. The Spring 2018 recording predates the transformer, so there is no attention mechanism content, and attention is fundamentally a matrix operation that would have fitted beautifully into this syllabus.

That is a shame rather than a flaw. The final stretch of lectures that touch on deep learning are the weakest material in the course, feeling slightly appended relative to the rigour of what precedes them, and anyone wanting deep learning should get it elsewhere and come here for the mathematics underneath it. There is also no programming. You will leave understanding the SVD and not necessarily having computed one in NumPy, and I would pair this with some hands-on work for that reason.

Four point seven. A great teacher, an unusually well chosen syllabus, and no cost whatsoever. There is very little in this catalogue I would recommend more confidently.

[ final ]

The verdict.

If you can do matrix multiplication and understand what a basis is, and you want to stop treating machine learning mathematics as a black box, this is the course. I would recommend it ahead of almost any paid alternative.