Phase 01: Math Foundations

Linear Algebra Intuition

Every AI model is just matrix math wearing a fancy hat. Implement vector and matrix operations (addition, dot product, matrix multiply) from scratch in Python. Explain geometrically what the dot product, projection, and Gram-Schmidt process do. Determine linear independence, rank, and basis of a set of vectors using row reduction. Connect linear algebra concepts to their AI applications: embeddings, attention scores, and LoRA. Open any ML paper. Within the first page, you'll see vectors, matrices, dot products, and transformations. Without linear algebra intuition, these are just symbols. With it, you can see what a neural network is actually doing -- moving points around in space. You don't need to be a mathematician. You need to see what these operations mean geometrically, then code them yourself. A vector is just a list of numbers. But those numbers mean something -- they're coordinates in space. 2D vector [3, 2]: The vector has magnitude sqrt(3^2 + 2^2) = sqrt(13) and points up and to the right. In AI, vectors represent everything: A word → a vector of 768 numbers (its "meaning" in embedding space). An image → a vector of millions of pixel values. A user → a vector of preferences. A matrix transforms one vector into another. It can rotate, scale, stretch, or project. In AI, matrices ARE the model: Neural network…

Linear Algebra Intuition: Every AI model is just matrix math wearing a fancy hat. Implement vector and matrix operations (addition, dot product, matrix…

This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.

Browse the complete course catalog or open this lesson on GitHub.