Skip to content

AI Math Textbook

A free, self-paced textbook in 8 chapters. Read a chapter, then drill it with the 500 companion flashcards using spaced repetition.

8 chapters · 500 cards · Updated

Chapters

  1. 1Linear Algebra Foundations

    Vector space structure forms the foundation of all machine learning mathematics. A vector \(\mathbf{x} = [x_1, \ldots, x_n]^\top \in \mathbb{R}^n\) is an ordered list of \(n\) numb...

  2. 2Matrix Decompositions and Subspaces

    Subspace concepts reveal the structure of linear transformations. The span of vectors \(\{\mathbf{v}_1, \ldots, \mathbf{v}_k\}\) consists of all linear combinations \(\sum_i c_i \m...

  3. 3Differential Calculus

    Derivatives measure instantaneous rates of change, forming the foundation of optimization in machine learning. The derivative \(f'(x) = \lim_{h \to 0}(f(x+h)-f(x))/h\) is the slope...

  4. 4Optimization Theory and Methods

    Unconstrained optimization finds minima of \(f(\theta)\). Convex problems \(f(\lambda\mathbf{x} + (1-\lambda)\mathbf{y}) \leq \lambda f(\mathbf{x}) + (1-\lambda)f(\mathbf{y})\) hav...

  5. 5Probability and Statistical Inference

    Probability axioms form the foundation. Kolmogorov axioms: \(P(\Omega) = 1\), \(P(A) \geq 0\), and \(P(A \cup B) = P(A) + P(B)\) for disjoint \(A, B\). The complement rule \(P(A^c)...

  6. 6Information Theory

    Self-information (surprisal) \(I(x) = -\log_2 p(x)\) measures surprise: rare events carry more information. Doubling rarity adds exactly 1 bit, since log converts products to sums,...

  7. 7Deep Learning Foundations

    A single neuron computes \(a = \sigma(\mathbf{w}^\top\mathbf{x} + b)\) where \(\mathbf{w}\) are weights, \(b\) is bias, and \(\sigma\) is a nonlinear activation. A layer in matrix...

  8. 8Transformer Architecture

    The Transformer architecture relies on self-attention. For an input sequence \(X \in \mathbb{R}^{n \times d_{\text{model}}}\), three learned projections produce queries \(Q = XW_Q\...

← Back to the AI Math deck