Colophon
About linearly
linearly is a free course on the mathematics inside AI, starting with the subject that carries most of it: linear algebra. It exists because the usual choices are bad. Textbooks are rigorous but hard to read. Videos are easy to watch but hard to retain. This course tries to keep the rigor and lose the friction. Each idea arrives as a picture, then in plain words, then as code. The notation comes last, when you already understand the thing it names.
In memory of Aqshin
This project is dedicated to my close friend Aqshin, one of the very first Azerbaijani students to study computer science at MIT. In 2015 he told me about MIT OpenCourseWare. That one conversation set everything in motion: the years of learning that followed, the lectures this course grew from, and finally this site, built on the MIT course he pointed me to. Everything here traces back to him. This course is his, too.
How it teaches
- Drawings first. If we can't draw an idea, we don't understand it yet, and we won't ask you to read it.
- Ordinary words and short sentences. Every symbol is introduced before it appears in a formula.
- Code in four frameworks: NumPy, PyTorch, JAX, TensorFlow. For people who build things, running code is what turns math into belief.
- Anchored to MIT 18.06 and Strang's Introduction to Linear Algebra. Wherever the two overlap, the lecture names its counterpart, so you can move between this course and the originals at will.
Open, on purpose
Everything in this course is centuries of a single habit compounding: someone worked an idea out, wrote it down, and let anyone read it. Elimination crossed continents in books that anyone could copy. The four subspaces reached the world because a professor filmed his lectures and gave them away. Mathematics grows only in the open; every closed door costs a generation of minds that never got in.
This course exists because of that openness. A free set of MIT lectures reached a student in Baku, who told a friend, and the friend built what you are reading. There is no paywall anywhere in that chain, and adding one now would break the very mechanism that produced it. So the course stays free, for the same reason science publishes: knowledge kept from the people who could use it is wasted twice, once on them and once on everyone their work would have reached. If this course teaches someone who then teaches someone else, it is working. That is the whole business model, and it is the oldest one in science.
Built to be grown
This course belongs to the people who improve it. It started as one person's lecture series, and it is built so anyone can extend it. Fixing a sentence is a one-file change. Adding a drawing, an interactive, or a whole lecture follows a documented path. If you learned something here and saw a way to teach it better, that observation belongs in the course. Start with the contributing guide.
The license protects that spirit. Everything is free to learn from, share, translate, and build on. Nothing here may be sold, paywalled, or folded into a commercial product, by anyone. The code is under the PolyForm Noncommercial License and the content is under CC BY-NC-SA 4.0, so every future version stays as free as this one.
The author
I'm Ali Khalilli. I build Deterministic Labs, where we work on making AI output reliable and verifiable. This course began as my live lecture series, written and taught in 2022 and 2023, before the LLM era: every explanation here was worked out by hand, for a room of real students. More about me at khalilli.ai.