Contents
Figure 1: Best Linear Algebra Courses and Books for Machine Learning — the right course is the one that gets you from notation to intuition, and the right book is the one you actually finish
You open a paper on PCA or attention, and the notation turns into a wall of matrices. Sound familiar? Linear algebra sits under almost everything in ML, and the right resource makes the difference between "I memorized the formulas" and "I finally get it."
This is a short list, not a catalog. I'll cover the courses and books I would actually pick, who each one suits, and an eight-week order that works. If you want the broader statistics and calculus picture, the math courses guide covers that; this post stays on linear algebra.
What You Actually Need to Learn
You do not need a full math degree's worth of linear algebra. For ML, these topics carry most of the weight:
- Vectors and dot products — similarity, projections, and norms.
- Matrices as transformations — what a matrix does to space, not just a grid of numbers.
- Solving systems and least squares — the engine behind linear regression.
- Rank, column space, and null space — what information a matrix keeps and what it destroys.
- Eigenvalues and eigenvectors — PCA, covariance, and stability.
- SVD — compression, recommenders, and low-rank ideas.
- Positive definite matrices — optimization and covariance.
Keep that list handy. It turns any course catalog into a checklist, and it tells you when to stop. You need enough math to read papers and debug models, not to prove every theorem — a point I made in math for machine learning.
The Short List
| Resource | Format | Cost | Best for |
|---|---|---|---|
| 3Blue1Brown | Video series | Free | Geometric intuition, first pass |
| MIT 18.06 | Course + lectures | Free | Real understanding, theory |
| MIT 18.065 | Course + lectures | Free | ML applications after 18.06 |
| Imperial College (Coursera) | Specialization | Audit free | Structure and graded work |
| DeepLearning.AI (Coursera) | Specialization | Paid certificate | All three math branches |
| Mathematics for Machine Learning | Book + PDF | Free PDF | One-book coverage |
| Introduction to Linear Algebra | Book | Paid | Companion to 18.06 |
| Linear Algebra and Learning from Data | Book | Paid | SVD and ML matrix methods |
| Introduction to Applied Linear Algebra | Book + PDF | Free PDF | Engineering and data work |
| Linear Algebra: Theory, Intuition, Code | Book | Paid | Coding-first learners |
| Linear Algebra Done Right | Book | Paid | Proofs, later |
Best Courses
3Blue1Brown: Essence of Linear Algebra
Start here if matrices still feel like grids of numbers. Grant Sanderson's free series animates vectors, linear combinations and bases, linear transformations, matrix multiplication, determinants, inverses, column and null spaces, dot and cross products, change of basis, and eigenvectors. It runs about three hours total [1].
You will not learn to solve problems from it, and that is fine. Its job is to give you the geometric picture — what a matrix does — before anyone asks you to compute one. Watch it first, then everything else makes more sense.
MIT 18.06 Linear Algebra (Gilbert Strang)
This is the classic. MIT OpenCourseWare publishes the full lecture videos and problem sets for free, covering systems of equations, vector spaces, eigenvalues, positive definite matrices, and the theory behind them [2].
Plan on about 35 lectures — roughly 30 hours of video — plus the problem sets. Strang retired in 2023 after 61 years at MIT, and his final 18.06 lecture is on OpenCourseWare too. His teaching stays grounded in computation and application, which is why it suits ML learners better than a pure proof course.
Take this if you want to understand the subject and not just use it. The problem sets are the point; watching without doing them is entertainment.
MIT 18.065: Matrix Methods in Data Analysis, Signal Processing, and Machine Learning
This is Strang's follow-up, and it connects linear algebra directly to ML and deep learning. It assumes you know the basics, so take 18.06 or an equivalent first. The course textbook is Linear Algebra and Learning from Data (Wellesley-Cambridge Press, 2019) [3].
Pick it when you already know the fundamentals and want to see SVD, low-rank approximation, and optimization used in earnest. It is the bridge between a math course and the matrix methods you meet in papers.
Imperial College London: Mathematics for Machine Learning (Coursera)
This specialization contains three courses: linear algebra, multivariate calculus, and PCA. You can audit the content for free, and certificates cost money. It runs about 50 hours and gives you graded assignments, which helps if you need deadlines and structure.
It suits you if self-study stalls without accountability. The PCA course at the end ties everything back to a real ML technique.
DeepLearning.AI: Mathematics for Machine Learning and Data Science (Coursera)
Luis Serrano teaches this one, and it covers calculus, linear algebra, and probability and statistics in a single track. It carries a paid certificate and graded assignments.
Choose it if you want all three math branches in one place, with an ML-flavored framing and a gentler ramp than 18.06.
Khan Academy and Immersive Linear Algebra
For practice, Khan Academy offers a linear algebra course with exercises. For interactive visuals, Immersive Linear Algebra is a free online book with manipulable figures, first published in 2015.
One useful recipe: build geometric intuition first, then add theory, then drill problems. Intuition, then theory, then repetition — in that order.
Best Books
Mathematics for Machine Learning (Deisenroth, Faisal, Ong)
If you read one book, read this one. It covers the math ML uses — linear algebra, vector calculus, probability, and optimization — and nothing else. The PDF is free to view and download for personal use, and it includes exercises [4].
The book moves fast, so pair it with a video course if you feel lost. Its linear algebra chapter is a map, not a substitute for problem practice.
Introduction to Linear Algebra (Gilbert Strang)
This is the companion textbook to MIT 18.06. Read it alongside the lectures and you get explanations in two formats. It is friendly, example-driven, and full of problems — the right book if the lectures move too quickly.
Introduction to Linear Algebra — pair it with the 18.06 playlist.
Linear Algebra and Learning from Data (Gilbert Strang)
The textbook for 18.065. It goes straight to SVD, low-rank structure, and the matrix ideas behind deep learning. Read it after you finish the introductory material, not instead of it.
Linear Algebra and Learning from Data — the applied follow-up.
Introduction to Applied Linear Algebra (Boyd and Vandenberghe)
This is the best pick for engineering and data work. It builds vectors, matrices, and least squares around modern applications, and basic programming helps. Go with it if you like seeing every concept attached to a use case — clustering, regression, and classification all show up.
Introduction to Applied Linear Algebra — and the authors do offer a free PDF at Stanford, so you can try it before buying [5].
Linear Algebra: Theory, Intuition, Code (Mike X Cohen)
This one is aimed at Python-oriented learners with some programming background. It pairs the theory with implementations, so you can see what the notation does in NumPy. It works well beside a theory-first course, because you code each idea as you learn it.
Linear Algebra: Theory, Intuition, Code — the coding-first option.
Linear Algebra Done Right (Axler)
This one takes a proof-based approach. It is wonderful if you enjoy rigor, but it is not the fastest route to ML skills. The best text for computation rarely works as the best first proof book.
Linear Algebra Done Right — save it for later, if theory excites you.
Which Resource Fits You?
- Total beginner, math-anxious: 3Blue1Brown, then Khan Academy exercises.
- Wants real understanding: MIT 18.06 with Strang's textbook.
- Wants ML connections fast: Mathematics for Machine Learning, then 18.065.
- Needs structure and a certificate: the Imperial or DeepLearning.AI specialization.
- Learns by coding: Linear Algebra: Theory, Intuition, Code with NumPy practice.
- Works in engineering or data analysis: Boyd and Vandenberghe.
- Loves proofs: Axler, after you finish a computational course.
The mistake is trying to match all seven. Pick the row that describes you this month, finish that resource, and revisit the list later.
An Eight-Week Plan
You do not need to do everything. Here is a path I would follow:
- Week 1: Watch Essence of Linear Algebra, and redraw the pictures yourself.
- Weeks 2 to 4: Work through the first half of MIT 18.06 — systems, vector spaces, and orthogonality. Do the problem sets.
- Weeks 5 and 6: Finish 18.06 through eigenvalues, then read the linear algebra chapters of Mathematics for Machine Learning.
- Week 7: Implement PCA and least squares from scratch in NumPy. The PCA tutorial walks through the implementation if you get stuck.
- Week 8: Start 18.065, or read the SVD chapter in your chosen book. The SVD explainer covers the intuition and the recommender connection.
Adjust the pace to your schedule. One hour a day beats a six-hour weekend binge that you forget by Wednesday.
Study Habits That Work
- Do the exercises. Watching feels productive, but problem solving builds the skill.
- Code everything. Reimplement dot products, projections, and SVD in NumPy.
- Connect to ML constantly. Ask where each concept shows up: covariance matrices, weight matrices, embeddings.
- Revisit hard ideas. Eigenvectors rarely click on the first pass.
- Do not chase perfection. You need enough math to read papers and debug models, not to prove every theorem.
Common Pitfalls
- Skipping straight to SVD and PCA. You will memorize steps without understanding them.
- Collecting resources instead of finishing one. Pick a course and complete it.
- Treating videos as the whole job. Pair every lecture with problems.
- Starting with a proof-heavy text. It may kill your motivation before you reach ML.
- Ignoring computation. Numerical issues, like ill-conditioned matrices, matter in practice.
- Buying six books before opening one. Start with the free PDF or the library copy.
- Watching at double speed without pausing. If you cannot rederive the result, you did not learn it.
Best Book to Read
| Cover | Book | Description | Get it |
|---|---|---|---|
![]() |
Mathematics for Machine Learning | the one book that covers the linear algebra, calculus, probability, and optimization an ML practitioner actually uses. | View on Amazon |
As an Amazon Associate I earn from qualifying purchases. Links on this page are affiliate links, and I may earn a commission at no extra cost to you.
Read chapters 2 and 4 together. Chapter 2 builds the algebra, and chapter 4 delivers the matrix decompositions — eigenvalues, SVD, and PCA — that the rest of ML keeps borrowing. The PDF is free at mml-book.github.io, so there is no reason to start anywhere else.
Wrapping Up
For most learners, the best combination is: 3Blue1Brown for intuition, MIT 18.06 for depth, Mathematics for Machine Learning for the ML connection, and 18.065 or Boyd and Vandenberghe once you are ready to apply it.
Add coding practice throughout, and the subject stops feeling like a wall. The goal is not to finish every resource; it is to reach the point where a matrix in a paper reads as a transformation you can reason about.
Pick the first video today and watch it tonight. You will know within twenty minutes whether this path suits you.
For the broader curriculum, the statistics and math courses guide covers calculus and probability, and math for machine learning explains how much of each subject you actually need.
Frequently Asked Questions
Do I need linear algebra before machine learning?
You need the working core, not a full math degree. Vectors, dot products, matrices as transformations, least squares, eigenvalues, and SVD cover most of what ML papers and code throw at you. Start with the geometric intuition, then add the theory as you meet it.
Is MIT 18.06 too hard for beginners?
It is hard if you have never seen matrices or calculus, because Strang moves quickly and the problem sets assume mathematical maturity. Watch 3Blue1Brown or work through Khan Academy first, then take 18.06. It is worth the effort, but it is not the first thing to open.
Should I take MIT 18.06 or 18.065 first?
Take 18.06 first. It builds vector spaces, eigenvalues, and positive definite matrices from the ground up. 18.065 assumes that background and spends its time on SVD, low-rank approximation, and optimization for data and machine learning.
Is Mathematics for Machine Learning enough on its own?
It is enough for coverage, but not for fluency. The book moves fast and the exercises are essential. Pair it with a video course and implement the ideas in NumPy, especially PCA and least squares, or the chapters will feel like notation rather than tools.
How long does it take to learn enough linear algebra for ML?
The working core takes about six to ten weeks at an hour a day: one week of intuition, four to six weeks of a first course, and one to two weeks implementing PCA and least squares. A full 18.06 pass is roughly 30 hours of video plus problem sets, so treat it as a semester, not a weekend.
Sources
[1]3Blue1Brown, Essence of Linear Algebra — the full animated series on vectors, transformations, and eigenvectors: 3blue1brown.com[2]MIT OpenCourseWare, 18.06 Linear Algebra — Strang's lectures, problem sets, and exams: ocw.mit.edu[3]MIT OpenCourseWare, 18.065 Matrix Methods in Data Analysis, Signal Processing, and Machine Learning — the applied follow-up course: ocw.mit.edu[4]Deisenroth, Faisal, and Ong, Mathematics for Machine Learning — the free PDF and exercises: mml-book.github.io[5]Boyd and Vandenberghe, Introduction to Applied Linear Algebra — the free PDF and application-driven chapters: stanford.edu
