1  Preliminaries

To prepare for your dive into deep learning, you will need a few essential survival skills: (i) techniques for storing and manipulating multidimensional data in memory (Section 1.1); (ii) tools for ingesting and cleaning tabular data from raw files, complete with missing entries and categorical text fields (Section 1.2); (iii) fluency in the linear-algebraic operations that transform high-dimensional representations and measure their size (Section 1.3); (iv) differential calculus to determine which direction to adjust each parameter in order to decrease a loss function (Section 1.4); (v) automatic differentiation so that the framework handles the chain rule across millions of parameters for you (Section 1.5); and (vi) a working grasp of probability and statistics, our primary language for reasoning under uncertainty and distinguishing genuine signal from sampling noise (Section 1.6).

What deep learning adds to classical linear algebra, calculus, and probability is scale: we apply them to millions or billions of variables where calculation by hand is out of the question. Doing so relies on two software pillars that every subsequent chapter takes for granted: tensor libraries, which apply compiled operations to entire arrays of numbers in parallel on CPUs and GPUs, and automatic differentiation, which differentiates arbitrary numerical programs mechanically.

This chapter provides a rapid, hands-on crash course in these prerequisites. If you are already comfortable with NumPy, linear algebra, and multivariable calculus, you can skim the familiar parts, though we still recommend reading Section 1.5 on automatic differentiation and Section 1.6 on standard errors and statistical estimation, as later chapters rely on both constantly. For a deeper theoretical foundation with complete proofs and derivations, our Mathematics for Deep Learning appendix develops linear algebra (Chapter 33), calculus (Chapter 34), and probability and statistics (Chapter 36) in full detail.