← Yulan Galagoda
Writing

Nothing Is Magic

Machine learning mathematics, rebuilt from first principles. A book I’m writing to be taught, not decoded.

Open bookIn progress2026

Most people never meet the mathematics behind machine learning. They meet its symbols: a wall of notation that makes a field built on a handful of intuitive ideas feel like gatekept magic. Nothing Is Magic is my attempt to take that wall down: to rebuild the maths from the pictures and problems underneath it, so anyone with basic algebra can follow the reasoning rather than memorise the result.

Every chapter leads with geometry and a concrete problem before any formal notation appears, because the clearest test of whether you understand something is whether you can teach it from the ground up. That conviction runs through everything I do: security is about refusing to treat a system as a black box, my research is about understanding models deeply enough to break and defend them, and this book applies the same instinct to the mathematics itself. Nothing, in the end, is magic.

“Before a symbol appears, there is a picture. Before the picture, there is a problem you can actually feel.”

Part 1: Linear algebra complete

  1. 1Vectors: Arrows and Lists
  2. 2Adding, Scaling, and Span
  3. 3The Dot Product
  4. 4Length, Distance, and Norms
  5. 5Matrices as Transformations
  6. 6Matrix Multiplication as Composition
  7. 7Independence, Basis, and Rank
  8. 8The Determinant
  9. 9Systems of Equations, Geometrically
  10. 10Eigenvectors and Eigenvalues
  11. 11The Singular Value Decomposition
  12. 12High-Dimensional Space

Parts 2 to 4 (calculus, probability & statistics, and learning theory) are in progress, extending the same first-principles approach up to the mathematics of how models actually learn.