Praxia

Start typing — resources, glossary, stages, and pages.

The cross-referenced spine

Mathematics

Every stage links here. Each topic is tagged with which stage needs it and to what depth — the minimum to be productive versus the research-grade understanding that holds under scrutiny.

Most people under-invest in mathematics. The map is blunt about this: the gap between someone who applies ML and someone who understands it is almost always a mathematics gap.

Tier 1 — Foundations Math

Foundations → Stage 1 · minimum

These are the prerequisites the other tiers build on. If any of these feel uncertain, address them before Tier 2 — gaps here propagate everywhere.

Algebra and functions

Algebraic manipulation, function composition, and the behaviour of logarithms and exponentials. The key identity every ML practitioner uses daily is the relationship between multiplication and addition of logs (which turns products of probabilities into sums):

log ⁣(i=1npi)=i=1nlogpi\log\!\left(\prod_{i=1}^{n} p_i\right) = \sum_{i=1}^{n} \log p_i

The natural logarithm lnx\ln x and the exponential exe^x are inverses: elnx=xe^{\ln x} = x. The softmax function — the gating mechanism of neural networks and the output of every classifier — is built entirely from this pair. Logarithms also appear in entropy, KL divergence, and information theory (all Tier 3).

Set theory, logic, and notation

Probability theory is built on set theory. The symbols ,,,,\in, \subseteq, \cap, \cup, \setminus appear in almost every probability definition. Propositional logic (implication, equivalence, contrapositive) is needed for reading proofs. Mathematical quantifiers ,\forall, \exists appear throughout.

Summation and product notation

Compact notation for sums and products. The training loss of nearly every model is a sum over data points; likelihoods are products. These notations let you read and write such expressions without confusion:

i=1nxi=x1+x2++xni=1npi=p1p2pn\sum_{i=1}^{n} x_i = x_1 + x_2 + \cdots + x_n \qquad \prod_{i=1}^{n} p_i = p_1 \cdot p_2 \cdots p_n

Proof techniques — the research seed

You do not need to write proofs at Stage 0. But learning to read them — especially induction and proof by contradiction — is the research-seed investment that pays off at Stage 2 and beyond. Induction is the standard tool for recurrences and complexity arguments; contradiction is how most impossibility results are established.

Tier 2

Linear Algebra

Stage 2 (minimum) · minimumStage 3 + Research · research

Machine learning is applied linear algebra. Datasets are matrices; models map vectors to vectors; every neural-network forward pass is a sequence of matrix multiplications followed by non-linearities. Invest here before deep learning — the payoff is immediate.

Vectors, matrices, and operations

Stage 2 · minimum

A vector xRn\mathbf{x} \in \mathbb{R}^n is a point in nn-dimensional space. A matrix ARm×nA \in \mathbb{R}^{m \times n} is a linear map from Rn\mathbb{R}^n to Rm\mathbb{R}^m. Matrix multiplication ABAB composes two linear maps. These are not just notational conventions — they are the geometric content.

The Euclidean norm of a vector:

x2=x12+x22++xn2\|\mathbf{x}\|_2 = \sqrt{x_1^2 + x_2^2 + \cdots + x_n^2}

The dot product xy=ixiyi=x2y2cosθ\mathbf{x}^\top \mathbf{y} = \sum_i x_i y_i = \|\mathbf{x}\|_2 \|\mathbf{y}\|_2 \cos\theta measures alignment — the foundation of cosine similarity, attention scores, and the kernel trick.

Eigenvalues, eigenvectors, and eigendecomposition

Stage 2–3 · minimum

A vector q\mathbf{q} is an eigenvector of AA with eigenvalue λ\lambda if:

Aq=λqA \mathbf{q} = \lambda \mathbf{q}

For a symmetric positive-definite matrix — the type that appears in covariance matrices, kernel matrices, and Hessians — the eigendecomposition factors AA as:

A=QΛQA = Q \Lambda Q^\top

where QQ is an orthonormal matrix of eigenvectors and Λ\Lambda is diagonal with the eigenvalues. This decomposition is behind PCA, kernel methods, spectral clustering, and the analysis of gradient descent convergence (the condition number of AA is the ratio λmax/λmin\lambda_{\max}/\lambda_{\min}).

Singular Value Decomposition (SVD)

Stage 2–3 · research-grade

The SVD generalises eigendecomposition to non-square matrices — which is essentially everything in ML, since data matrices are n×dn \times d with ndn \neq d:

A=UΣVA = U \Sigma V^\top

URm×mU \in \mathbb{R}^{m \times m} and VRn×nV \in \mathbb{R}^{n \times n} are orthonormal; Σ\Sigma is diagonal with the singular values σ1σ20\sigma_1 \geq \sigma_2 \geq \cdots \geq 0. Truncating to the top kk singular values gives the best rank-kk approximation to AA in the Frobenius norm — this is the mathematics behind PCA, dimensionality reduction, and collaborative filtering. LoRA (the fine-tuning technique in Stage 4) exploits exactly this low-rank structure.

Tier 2

Calculus and Optimisation

Stage 2 (minimum) · minimumStage 3 + Research · research

Training a model is solving an optimisation problem. Calculus provides the language for describing how a function changes; optimisation provides the algorithms for making it as small as possible. These are inseparable.

The chain rule and backpropagation

Stage 2 · minimum

The scalar chain rule:

ddxf(g(x))=f(g(x))g(x)\frac{d}{dx} f(g(x)) = f'(g(x)) \cdot g'(x)

Backpropagation is just the chain rule applied recursively through a computational graph. Every gradient in a neural network is computed this way. The key insight is that the chain rule decomposes the derivative of the loss LL with respect to early-layer weights into a product of local Jacobians, each computable from the forward pass.

Gradients and gradient descent

Stage 2 · minimum

The gradient wL\nabla_{\mathbf{w}} L is the vector of partial derivatives of the loss with respect to every parameter — the direction of steepest ascent. Gradient descent steps in the opposite direction:

wwαwL(w)\mathbf{w} \leftarrow \mathbf{w} - \alpha \nabla_{\mathbf{w}} L(\mathbf{w})

where α>0\alpha > 0 is the learning rate. The learning rate is the most consequential hyperparameter in training — too large and the loss diverges, too small and training stalls. Adaptive methods (Adam, RMSProp) effectively adjust the per-parameter learning rate from curvature information.

Matrix calculus

Stage 3 · research-grade

Matrix calculus extends scalar calculus to vector and matrix arguments. The two most common identities you will use:

x(Ax)=Ax(xAx)=(A+A)x\frac{\partial}{\partial \mathbf{x}} (A\mathbf{x}) = A^\top \qquad \frac{\partial}{\partial \mathbf{x}} (\mathbf{x}^\top A \mathbf{x}) = (A + A^\top)\mathbf{x}

These identities appear in the derivation of linear regression (where the normal equations emerge from wyXw2=0\nabla_{\mathbf{w}} \|\mathbf{y} - X\mathbf{w}\|^2 = 0), in the analysis of quadratic forms in attention, and in second-order optimisation methods.

Convexity and why it matters

Research · minimum for theory

A function ff is convex if, for all x,y\mathbf{x}, \mathbf{y} and t[0,1]t \in [0,1]:

f(tx+(1t)y)tf(x)+(1t)f(y)f(t\mathbf{x} + (1-t)\mathbf{y}) \leq t f(\mathbf{x}) + (1-t)f(\mathbf{y})

For convex functions, every local minimum is a global minimum — gradient descent is guaranteed to converge. Deep network loss landscapes are non-convex, which is why understanding when convexity fails and what the alternatives are (saddle-point theory, loss-landscape analysis) matters for serious research.

Tier 2

Probability and Statistics

Stage 1 (minimum) · minimumStage 2 + Research · research

ML is applied probabilistic reasoning. Models make claims under uncertainty; probability is the language of uncertainty. Without this, you cannot evaluate models honestly, design experiments properly, or understand why any of the Bayesian methods work.

Bayes' theorem

Stage 1–2 · minimum

The fundamental rule for updating beliefs given evidence:

P(AB)=P(BA)P(A)P(B)P(A \mid B) = \frac{P(B \mid A)\, P(A)}{P(B)}

In ML: posterior = likelihood × prior / evidence. Naive Bayes, Bayesian networks, variational inference, and the theoretical underpinning of regularisation (L2 = Gaussian prior; L1 = Laplace prior) all flow from this single equation. Be sure you can derive it from the definition of conditional probability.

Maximum Likelihood Estimation and MAP

Stage 2 · minimum

MLE finds the parameter θ^\hat{\theta} that makes the observed data most probable under the model:

θ^MLE=argmaxθi=1nlogp(xiθ)\hat{\theta}_{\text{MLE}} = \arg\max_{\theta} \sum_{i=1}^{n} \log p(x_i \mid \theta)

The log-sum form (equivalent to the product-of-likelihoods by the Tier 1 log identity) is numerically stable and separates into per-sample terms. Minimising cross-entropy loss is exactly MLE under a categorical model. MAP extends MLE by adding a prior, which introduces the regularisation term.

The Central Limit Theorem

Stage 1–2 · minimum

For i.i.d. random variables X1,,XnX_1, \ldots, X_n with mean μ\mu and variance σ2\sigma^2, the sample mean converges in distribution to a Gaussian:

XˉndN ⁣(μ,  σ2n)\bar{X}_n \xrightarrow{\,d\,} \mathcal{N}\!\left(\mu,\; \frac{\sigma^2}{n}\right)

This is why confidence intervals around test-set performance have the form “mean ± z·σ/√n”, why statistical tests use t or z statistics, and why batch gradients in SGD can be used as unbiased estimates of the full-data gradient. The CLT is the mathematical licence for sampling.

Hypothesis testing and p-values

Stage 1 · minimum

A p-value is the probability of observing data at least as extreme as the data you actually observed, assuming the null hypothesis is true. It is not the probability the null is true. This distinction matters enormously in practice: a p = 0.03 result means the data is surprising under the null, not that the effect is large or real. Know the one-sample tt-test, the two-sample tt-test, ANOVA, chi-square, and when each applies. Know the Bonferroni and Benjamini–Hochberg corrections for multiple comparisons.

Research track

Tier 3 — Advanced and Research Math

Research track · research

These are the topics that separate practitioners who use results from researchers who prove them. Build them one at a time, as they become relevant to your subfield. You do not need all of Tier 3 before starting research — you need the slice your problem requires.

Information Theory

Entropy

H(X)=xp(x)log2p(x)H(X) = -\sum_x p(x)\log_2 p(x)

KL divergence

DKL(PQ)=xP(x)logP(x)Q(x)D_{\mathrm{KL}}(P \,\|\, Q) = \sum_x P(x)\log\frac{P(x)}{Q(x)}

Entropy, cross-entropy, KL divergence, mutual information. Cross-entropy loss = entropy + KL divergence between the true and predicted distributions — understanding this makes the loss function's geometry intuitive. KL divergence appears in VAEs, RL (PPO's clipping objective), and model calibration.

Resources: MML ch. 6; Cover & Thomas 'Elements of Information Theory'

Statistical Learning Theory

PAC bound (VC)

R(h)R^(h)+dlog(n/d)+log(1/δ)nR(h) \leq \hat{R}(h) + \sqrt{\frac{d\log(n/d) + \log(1/\delta)}{n}}

PAC learning, VC dimension, Rademacher complexity, generalization bounds, concentration inequalities (Hoeffding, McDiarmid). This is the mathematical language for asking 'why does this generalise?' — the central question in ML theory. The generalization bound above says: test risk ≤ empirical risk + a complexity term that shrinks with data.

Resources: Mohri, Rostamizadeh & Talwalkar 'Foundations of ML'; Shalev-Shwartz & Ben-David 'Understanding ML'

Measure-Theoretic Probability

Expectation

E[X]=ΩX(ω)dμ(ω)\mathbb{E}[X] = \int_\Omega X(\omega)\, d\mu(\omega)

The rigorous foundation of probability: sigma-algebras, measurable functions, Lebesgue integration. Needed for theory papers that involve expectations over function classes or infinite-dimensional spaces. You will not use it daily, but you will need it to read PAC-Bayesian proofs, ergodic arguments, and diffusion model theory.

Resources: Durrett 'Probability: Theory and Examples'; Williams 'Probability with Martingales'

Real Analysis Essentials

Limit definition

limxaf(x)=L    ε>0  δ>0:xa<δf(x)L<ε\lim_{x \to a} f(x) = L \iff \forall \varepsilon>0\; \exists \delta>0 : |x-a|<\delta \Rightarrow |f(x)-L|<\varepsilon

Sequences, series, continuity, compactness, uniform convergence. The foundation of everything that says 'this converges' or 'this approximation holds uniformly.' Needed for understanding why neural networks can approximate arbitrary functions (universal approximation theorem) and why training eventually converges.

Resources: Rudin 'Principles of Mathematical Analysis'; Abbott 'Understanding Analysis' (more accessible)

Advanced Optimisation

Lagrangian (KKT)

L(x,λ)=f(x)+λg(x)\mathcal{L}(\mathbf{x}, \boldsymbol{\lambda}) = f(\mathbf{x}) + \boldsymbol{\lambda}^\top g(\mathbf{x})

Duality (Lagrangian, KKT conditions), non-convex landscapes, saddle points, second-order methods (Newton, quasi-Newton), convergence rates. SVMs are literally the dual of a constrained quadratic program. Modern optimizers (Adam, Lion, Shampoo) are motivated by second-order information without paying the full Hessian cost.

Resources: Boyd & Vandenberghe 'Convex Optimization' (free); Nocedal & Wright 'Numerical Optimization'

Probabilistic Graphical Models

Joint factorisation

p(x1,,xn)=ip(xipa(xi))p(x_1, \ldots, x_n) = \prod_{i} p(x_i \mid \mathrm{pa}(x_i))

Bayesian networks, Markov random fields, exact and approximate inference (variable elimination, belief propagation, variational inference, MCMC). PGMs are the mathematical language of structured uncertainty. VAEs, HMMs, and diffusion models are all PGMs. PRML (Bishop) and Murphy are the canonical treatments.

Resources: PRML (Bishop) chs. 8–10; Murphy 'Probabilistic Machine Learning' vol. 2

Ranked and curated

Resources

The sequence that works for most people: 3Blue1Brown for geometric intuition → MML for ML-context derivations → MIT 18.06 (Strang) for rigorous linear algebra → Stat 110 for probability → Boyd for optimisation. These five resources cover Tiers 1–2 completely. Tier 3 requires field-specific texts listed per-topic above.

Books

BookCompetentFree
Mathematics for Machine Learning

Deisenroth, Faisal & Ong · 2020

The single best bridge between undergraduate mathematics and ML — covers linear algebra, calculus, and probability in the context of ML applications.

Use this if: You need to strengthen your mathematical foundations alongside ISLR or before tackling deep learning.

Reviewed 2026-06-11

BookExpertFree
Convex Optimization

Stephen Boyd & Lieven Vandenberghe · 2004

The optimisation reference — comprehensive, mathematically rigorous, and free; most practitioners need chapters 1–5; researchers need the rest.

Use this if: You want to understand why gradient descent works, when it does not, and what the theory of convex optimisation actually says.

Reviewed 2026-06-11

Courses & Videos

VideoFoundationsFree
Essence of Linear Algebra

3Blue1Brown / Grant Sanderson

The best geometric intuition for linear algebra — transforms the subject from symbol manipulation to genuine understanding of what vectors and matrices are.

Use this if: You have seen the linear algebra formulas but do not have geometric intuition for what they mean — watch this before or alongside any formal course.

Reviewed 2026-06-11

CourseFoundationsFree

Solid foundational drilling — the exercises are genuinely useful, though the content stops well short of inference at the level you need for professional work.

Use this if: You need to build fluency in probability basics and descriptive statistics before moving to inferential tests.

Reviewed 2026-06-11

VideoFoundationsFree
Essence of Calculus

3Blue1Brown / Grant Sanderson

Builds the intuition for derivatives and integrals that most textbooks never give — the chain rule visualisation alone is worth the series.

Use this if: You want to understand what derivatives actually are before applying them in gradient descent and backpropagation.

Reviewed 2026-06-11

CourseCompetentFree
MIT 18.06 Linear Algebra

Gilbert Strang / MIT OpenCourseWare

The canonical linear algebra course — Strang's lectures are legendary and the exercises are genuinely instructive; this is the course that makes linear algebra click.

Use this if: You need rigorous linear algebra — eigendecompositions, SVD, projections — for ML applications; 3Blue1Brown gives intuition, Strang gives tools.

Reviewed 2026-06-11

CourseCompetentFree
Introduction to Probability / Harvard Stat 110

Joseph Blitzstein & Jessica Hwang

The best probability course and textbook combination — Blitzstein's lectures are the clearest treatment of conditioning, distributions, and Bayes available for free.

Use this if: You need to build a solid probability foundation for machine learning — or you are headed toward research and need probability to be second nature.

Reviewed 2026-06-11

Cross-links

Where you need this

Each stage has a mathematics section that links back here. If you are on a stage page and want to know where a specific topic fits in the ladder: