A4Numerical methods
8 lessons. Study in order; each one assumes the previous.
Numerical methods are the gap between mathematics on paper and code that runs correctly at scale. Computers store real numbers in finite precision, so an algorithm that is exact in theory can quietly lose all its accuracy, and this discipline teaches you to predict, detect, and prevent that failure.
You will start with IEEE-754 floating point and machine epsilon, then separate the conditioning of a problem from the stability of an algorithm and bound error with the condition number. You will see catastrophic cancellation and learn to reformulate around it, derive the log-sum-exp trick behind a stable softmax, and study iterative solvers: fixed-point iteration, conjugate gradient for symmetric positive-definite systems, and GMRES for the nonsymmetric case. The discipline closes with mixed-precision arithmetic (fp32 versus fp16 and bf16, plus loss scaling), the foundation of modern large-scale training.
This is short but high-leverage. The skills here explain why a naive softmax overflows, why an ill-conditioned matrix wrecks a least-squares fit, and how billion-parameter models train in low precision without diverging, which connects directly to the training systems of pillar D.
Before you start
- A1 Linear algebra: the SVD, condition number, and positive-definite systems.
- Single-variable calculus (L2, L3) and basic familiarity with exponentials and logarithms.
- Python with numpy to reproduce overflow, cancellation, and precision experiments.