How to Use This Book
This book is meant to take you from rusty foundational mathematics to the mathematics a strong computer scientist reads and uses every day. Calculus is one milestone on that journey, not the finish line.
Who this book is for
You probably met most of this material once. Maybe it was UK sixth-form "Maths with Mechanics" decades ago, maybe an American Algebra II class. Since then, some of it has stuck and much of it has faded. When you see
it looks familiar, but words like discriminant, vertex or completing the square may not come back straight away.
So the book assumes prior exposure with substantial gaps and rusty recall. It won’t treat you as someone who has never seen an equation. It also won’t wave a section through with "you already know this". Each topic is complete enough that a real gap won’t leave you stuck, and the explanations are built so you can move quickly through anything that comes back easily.
There is a second reader in mind: a teenager in the American school system. Every major topic carries a short US curriculum note saying roughly where an American student would meet it. If someone tells you "he’s doing Algebra II", you’ll know what mathematics that covers, and the explanations here can be shared with them directly.
What this book is, and is not
This book is the canonical knowledge path, the core of a larger project that can grow to include experiments, Python and Mathematica notebooks, interactive visualisations, and eventually a companion application with mastery tracking.
The book deliberately avoids becoming:
-
a school textbook, padded out to fill semesters;
-
a formula encyclopedia, where formulas are known but not understood;
-
a pure mathematics text, where rigour comes before intuition and application;
-
a programming book in disguise, since code reinforces the mathematics but never replaces it;
-
a calculus cram course, which reaches derivatives fast and leaves holes underneath;
-
an endless prerequisite trap, since you don’t need to relearn everything before reaching interesting material;
-
an exercise treadmill, because mastery matters more than volume.
How each topic is taught
Every substantial topic follows the same arc:
Motivation → intuition → formalisation → mechanics.
The topic starts with a problem worth solving. Next comes what the idea means in plain language, then how to state it precisely, and only after that how to calculate with it efficiently. Formulas are derived when derivation illuminates, and theorems are proved when proof teaches. Procedures are shown step by step with nothing hidden, then summarised as algorithms, because much of mathematics really is algorithmic and you already think in algorithms.
The book keeps returning to four representations of the same idea:
Being able to move between them is much closer to understanding than memorising any one of them.
It also keeps asking two questions: Where would I use this? and When should I use this, and when shouldn’t I? Knowing when a technique fails is part of knowing the technique.
The boxes
You will see the same kinds of box throughout the book. Here is what each one is for.
|
Refresher boxes
Short definitions of vocabulary and notation, written to be scanned quickly. Together they form the glossary and the cheat sheet in the appendices: the "I remember learning this, remind me what it means" reference. |
Input: a technique you have just understood.
Steps: the technique written as an explicit algorithm.
Output: something you could translate into code, and often the book does.
|
Watch-out boxes
Failure modes, common mistakes and limitations. These are not footnotes; they are part of understanding the idea. |
|
Interesting boxes
Where a word came from, who solved the problem first, or an unexpected modern use. Kept short. |
|
Interactive Lab boxes
Places where a hands-on experiment would help, such as dragging a point, changing a matrix or picking a starting value. They are collected in Appendix E as the design inventory for a future companion app. |
Test out where possible; slow down where necessary
There is no big entrance exam. Instead, each chapter ends with a mastery check: a few problems and a decision rule. If they are easy, move on. If they are hard, that tells you exactly which foundation needs more time, and the decision rule points you back to the relevant section.
Each chapter also opens with a Where this chapter sits sidebar that lists its prerequisites. If a mastery check exposes a gap, follow those links backwards.
Understand, calculate, implement, experiment
Computation in this book follows a fixed order:
-
understand the idea;
-
calculate a few cases by hand;
-
implement it (usually in a few lines of Python);
-
experiment: break it, vary it, plot it.
Asking a computer algebra system for an answer is not understanding. Writing ten lines of Python after doing three iterations by hand is a good way to make the understanding stick. All code uses only Python’s standard library and NumPy.
The companion code
The companion/ folder that accompanies this book has one Python folder per chapter (ch01_numbers/ to ch33_horizons/), and each one follows that same order:
-
walkthrough.pyreproduces the chapter’s worked examples line by line, with the reason for each step, then implements the procedure and experiments with it, including the ways it fails; -
exercises.pyholds functions for you to implement, andtest_exercises.pytells you when you’ve got them right;solutions.pyhas reference answers with commentary; -
lab_*.pybuilds the chapter’s Interactive Labs as interactive plots you can drag and adjust; -
python3 -m mathbook.mastery chNNruns the chapter’s mastery check as a quiz and tells you which sections to revisit.
A good rhythm is to read a section, run the matching part of the walkthrough, and do the exercises before moving on. See companion/README.md for setup.
The three volumes
The book comes in three volumes that follow the knowledge map:
| Volume | Contents | Chapters |
|---|---|---|
1: Foundations to Precalculus |
Numbers, algebra, geometry, functions, trigonometry, sequences, complex numbers. Everything the other two volumes build on. |
1–15 (Parts I–IV) |
2: Continuous Mathematics |
Calculus, linear algebra, numerical mathematics. |
16–20, 26–28, 32 (Parts V, VII, IX) |
3: Discrete and Probabilistic Mathematics |
Logic, proof, number theory, combinatorics, graphs, probability, statistics, and the Horizons capstone. |
21–25, 29–31, 33 (Parts VI, VIII, X) |
Volumes 2 and 3 both build on Volume 1 but not on each other, so you can read them in either order or side by side. Chapter numbers are the same in every edition, which is why Volume 2 jumps from Chapter 20 to Chapter 26: a reference such as "Chapter 17" always means the same chapter, and so does the companion folder ch17_derivatives/. A reference to a chapter in another volume names the volume, as in "Volume 2, Chapter 17". In the PDF it links to that chapter in the online edition.
How to read the rest of the book
The chapters are numbered, but the book is not a straight line. The Knowledge Map shows how the topics depend on one another. Discrete mathematics can run alongside algebra. Probability can begin early. Linear algebra does not need calculus. Choose your route, use the mastery checks, and go back when you need to.
Building the book
The source is AsciiDoc. From the repository root:
make # regenerate all diagrams, then build build/book.html
make html # just the HTML
make check # fail on any AsciiDoc warning
Mathematics is typeset with LaTeX notation (:stem: latexmath) and rendered by MathJax in the HTML output. Diagrams are SVGs generated from the scripts in diagrams/, so they can be regenerated and changed.