Starting and learning
Machine learning for mathematicians
Machine learning is applied optimisation and statistics: models are functions on vector spaces, training minimises a loss, and generalisation is a question about probability. Mathematicians use it to fit regression and classification models, learn representations and approximate functions that are hard to compute directly.
How mathematicians use machine learning
Finding patterns that suggest conjectures
A model is trained to predict one mathematical quantity from others, and attribution methods show which inputs matter. Mathematicians then turn the pattern into a precise conjecture and prove it.
Real exampleAdvancing mathematics by guiding human intuition with AI (Nature, 2021)DeepMind and mathematicians used machine learning to help discover new results in pure mathematics, in knot theory and representation theory.
Searching for algorithms
Reinforcement learning treats finding an algorithm as a game with a huge search space. Every candidate it finds can be checked exactly, so the result is a correct algorithm, not an approximation.
Real exampleAlphaTensor (Nature, 2022)AlphaTensor used reinforcement learning to discover matrix multiplication algorithms, including one for 4 by 4 matrices in a finite field that improves on Strassen's two-level algorithm.
Searching for constructions with language models
A language model proposes programs that build mathematical objects and an evaluator scores them, so only verified improvements are kept. This suits extremal problems where good examples are hard to find.
Real exampleFunSearch (Nature, 2023)FunSearch pairs a large language model with an automated evaluator to search for programs, and found new constructions of large cap sets beyond the best known ones.
Proving theorems in proof assistants
Models suggest the next proof step or relevant lemmas in a formal language such as Lean, and the proof assistant checks each step. Correctness comes from the checker, not from trusting the model.
Real exampleLeanDojoLeanDojo is an open-source Lean playground of toolkits, data, models and benchmarks for research on machine learning for theorem proving.
Solving differential equations
A neural network is trained so that its output fits observed data and satisfies a given differential equation. It is used where data is sparse and the governing equations are known.
Real examplePhysics-informed neural networksRaissi, Perdikaris and Karniadakis introduced neural networks trained on data while respecting a given nonlinear partial differential equation.
Can mathematicians learn machine learning?
Yes, and you start ahead, because the maths is what most learners find hardest. What you usually need to add is programming, practical data handling and the experimental habits of machine learning: held-out data, baselines and honest evaluation.
- Python fluencyTranslate notation into code: functions, loops and clean notebooks you can rerun from the top.Learn it in Python
- NumPy and pandasArrays, vectorised operations and tables, so a matrix expression on paper becomes a line of code.Learn it in Data Tools
- Statistics in practiceEstimation, sampling variation and evaluation on held-out data, which pure mathematics courses rarely emphasise.Learn it in Statistics
- Classical models as optimisationLinear and logistic regression, regularisation and trees, read as a loss to minimise and checked on new data.Learn it in Machine Learning
- Deep learningBackpropagation as the chain rule on a computation graph, optimisers, and the architectures used in practice.Learn it in Deep Learning
Moving from mathematics into machine learning
If you already work in the field
Mathematicians already have linear algebra, analysis, probability and optimisation. Add Python, experience with messy data and the habit of reporting results on held-out data, then reproduce a published model before designing your own.
If you come from data science or ML
Practitioners who want deeper mathematics should study linear algebra, probability and convex optimisation, and read learning theory alongside practice. For research on AI for mathematics, learning a proof assistant such as Lean is a practical entry point.
Roles that do this workResearch scientistMachine learning researcherQuantitative researcherApplied scientist
Tools you will use
| Tool | What you use it for |
|---|---|
| NumPy | Implements linear algebra, least squares and gradient descent directly from the mathematics. |
| JAX | Differentiates and compiles NumPy-style functions, ideal for writing your own losses and optimisers. |
| PyTorch | Trains neural networks with automatic differentiation and GPU support. |
| scikit-learn | Provides reference implementations and cross-validation to check your own derivations against. |
| SymPy | Derives gradients and closed-form solutions symbolically before you implement them numerically. |
Public data to practise on
- Concrete Compressive Strength: Concrete mix ingredients and age with measured strength, a nonlinear regression problem for comparing linear and learned models.
- OpenML-CC18 benchmark suite: A curated set of classification tasks with standard splits for testing methods across many datasets.
Your first project
Download the Concrete Compressive Strength dataset, fit ridge regression from the closed-form solution in NumPy, and compare it with scikit-learn's Ridge and a mean baseline using test RMSE.
Common questions
Is machine learning just statistics?
It overlaps heavily with statistics but also draws on optimisation, linear algebra and computer science. Machine learning usually emphasises predictive accuracy on new data, while classical statistics often emphasises inference about parameters.
What maths is used in machine learning?
Linear algebra for data and models, calculus for gradients, probability and statistics for uncertainty and evaluation, and optimisation for training. Research also uses functional analysis, information theory and geometry.
Can machine learning prove theorems?
Systems can now find proofs in formal languages such as Lean and solve some competition problems, usually by pairing a learned model with a symbolic checker. The proof is verified by the proof assistant, not by trusting the model.
Is a PhD in mathematics useful for machine learning?
Yes for research roles, where mathematical maturity helps you read and contribute to theory. Industry roles also value programming and experience with real data, so add projects that show both.
Courses for these skills
- Maths for Machine LearningConnect vectors and linear boundaries to separability.26 published lessons · all planned lessons open
- Generative AI: LLMs, RAG and AgentsConnect embeddings and retrieval to language-model applications.Syllabus available · lessons open as produced
- Practical Machine Learning in PythonLearn regression, loss functions and generalisation on measured features.51 published lessons · more lessons in production
- Data Tools: NumPy, pandas, Matplotlib and scikit-learnInspect numeric columns, missing values and sample-level tables.23 published lessons · all planned lessons open
- Deep Learning with PyTorchUnderstand nonlinear hidden layers and network training.Syllabus available · lessons open as produced
New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.