Math for Computer Science
The continuous and statistical mathematics that modern computing runs on — sets, calculus, linear algebra, and probability, and where each one shows up in practice.
- Reading time
- ~15 min (+13 min optional)
- Level mix
- 2 beginner · 7 intermediate
Most of computer science’s “hard math” is really four toolkits: the language of sets that everything is phrased in, the calculus of change behind optimisation, the linear algebra that lets you operate on whole datasets at once, and the probability and statistics that let a system act sensibly under uncertainty.
Start with set theory — the vocabulary shared by logic, databases, and type systems — then pick up calculus and linear algebra as the engine of graphics and model training. Finish with probability and statistics, the foundation of machine learning and analytics, and follow the thread into gradient descent to see all three converge in how models actually learn.
Roadmap
Loading progress...
The shared language
The mathematics of collections — sets, membership, and the operations on them. The shared vocabulary beneath logic, databases, type systems, and the rest of mathematics.
- Discrete MathematicsOptional
The branch of mathematics dealing with distinct, separate values — logic, sets, combinatorics, graphs, and proof — that forms the mathematical foundation of computer science.
- Boolean LogicOptional
The algebra of true and false — the simple rules (AND, OR, NOT) from which every digital decision is built.
Change and accumulation
The mathematics of change and accumulation — derivatives measure rates, integrals add them up. In computing it powers optimisation and the training of machine-learning models.
Data in bulk
The mathematics of vectors and matrices — the language for representing and transforming data in bulk, and the engine under graphics and machine learning.
Reasoning under uncertainty
The mathematics of uncertainty and evidence — probability models what might happen, statistics infers what is true from data. Together they underpin machine learning and analytics.
Where it leads
The optimisation algorithm that trains almost every neural network — iteratively nudge each parameter in the direction that reduces the loss.
- Linear ProgrammingOptional
Optimising a linear objective function subject to linear constraints — the foundational model for scheduling, resource allocation, and network flow, solved efficiently by the simplex method.
- Machine LearningOptional
Building systems that improve at a task by learning from data instead of being explicitly programmed for every case.