
30 Problems
Calculus for ML
From limits to multivariable calculus. Understand the math behind gradient descent, backpropagation, and optimization in neural networks.
5 Easy18 Medium7 Hard
Unlock the full study plan
Upgrade to Pro to access the full curriculum.
6 sections
Gradient of Multivariate Linear Regression LossMediumDirectional Derivative & Steepest Descent DirectionMediumJacobian of a Neural Network LayerHardHessian Matrix & Convexity of Linear Regression LossMediumJVP and VJP for a 2-Layer NetworkHardSecond-Order Partial DerivativesEasyJacobian of a Vector-Valued PolynomialEasyGradient of a Matrix-Valued FunctionEasyHessian Tensor of a Vector-Valued FunctionMediumMultivariable & Matrix Calculus Quiz10 questions
What you will learn
Calculus explains how models learn: every gradient-descent step and every backward pass is calculus. This plan has 30 problems in six sections, from limits and derivatives to Jacobians, Hessians and the gradients used in neural network training.
Prerequisites
Python and basic NumPy, and some familiarity with functions and graphs. The Linear Algebra study plan helps for the matrix calculus section.
The sections, in order
- Foundations: limits and continuity of ML functions, bounding the sigmoid and a numerically stable log-sum-exp.
- Single-variable differentiation: activation derivatives, the chain rule through a network, curvature, subgradients and finite-difference gradient checks.
- Integration and probability calculus: expected values by numerical integration, KL divergence and ROC AUC with the trapezoidal rule.
- Multivariable and matrix calculus: gradients, directional derivatives, Jacobians and Hessians, JVPs and VJPs, and higher-order derivatives.
- Optimization: gradient descent on non-convex losses, learning-rate stability, Lagrange multipliers and Taylor approximations.
- ML applications: forward-mode autodiff, backpropagation through a graph, the softmax cross-entropy gradient, gradient clipping and Gaussian log-likelihood gradients.
Where to go next
Continue with the Optimization study plan, or build a working autodiff engine in Build Micrograd from Scratch.