
Foundations for Scientific Machine Learning
An interactive online book for undergraduate and postgraduate students — from "what is a function?" to physics-informed neural networks and neural operators. Every idea comes with a plain explanation, the standard definition with its source, a simulation you can play with, and Python you can run right here.
How to use this book
No prior knowledge beyond school mathematics is assumed for Part A. Students attending RACM–SciML 2026 are encouraged to finish Parts A and B before the workshop (12–16 December 2026) and to try the PINN (Physics-Informed Neural Network) chapter — the lectures will then make much more sense.
Watch, map, play, test
Workshop companion
Checklist, chapters for each day of RACM–SciML 2026, four Colab notebooks, speakers' areas.
🧠Mind map of the whole book
All 22 chapters on one zoomable map, from functions to neural operators.
✎Tests: basic → advanced
Pick chapters and a level, get a score, see what to revise.
🧪Pendulum lab
Train a data-only network and a PINN side by side in your browser.
📡Research radar
Live list of the latest and most-cited PINN papers, growth charts, arXiv feeds and Scholar alerts.
🔬Inside a network
See every neuron's piece and how they add up to the output.

Where does scientific machine learning fit in AI?
Artificial intelligence (AI), machine learning (ML), neural networks, deep learning, ChatGPT and physics-informed neural networks (PINNs) are often mentioned together. They are nested and overlapping sets: every deep-learning model is a neural network, every neural network is a machine-learning model, and every machine-learning method is a form of AI. Scientific machine learning (SciML) is where machine learning meets scientific computing — the numerical solution of the equations of physics and engineering. Click any region or label to see what it means, with examples.
Part AMathematical foundations
Functions
Inputs, outputs, families of functions, composition, fields like u(x, t).
2Derivatives: rates of change
Rates of change, finite differences, Taylor's theorem, gradient, chain rule.
3Integrals: adding up
Riemann sums, the fundamental theorem, quadrature and Monte Carlo.
4Vectors and matrices
Matrices as transformations, Ax = b, determinants, eigenvalues, conditioning.
Part BDifferential equations and their numerical solution
Ordinary differential equations
Direction fields, growth and decay, oscillators, SIR (Susceptible–Infected–Recovered) epidemics, existence and uniqueness.
6Solving ODEs on a computer
Euler and Runge–Kutta, order of accuracy, stability and stiffness.
7Partial differential equations
Heat, wave and Laplace equations live; boundary conditions; well-posedness.
8Finite differences for PDEs
Stencils, the r ≤ ½ stability limit, CFL (Courant–Friedrichs–Lewy) condition, Lax equivalence.
Part CFrom classical methods to machine learning for science
From classical methods to SciML
Where classical methods excel and struggle, data + physics, a classical ↔ SciML dictionary, hybrids.
10How a machine learns: gradient descent from scratch
Learn the price of an apple by guessing and improving: loss, slope, why the minus sign, learning rate — by hand, in a lab and in a one-minute video.
11Optimisation and gradient descent
Loss landscapes, gradient descent, momentum, Adam (Adaptive Moment Estimation), SGD (Stochastic Gradient Descent), convexity.
12From the perceptron to neural networks
History from 1943 to today, the perceptron, XOR (exclusive OR), layers, forward pass, every term explained.
13Training neural networks
Loss, backpropagation number by number, a network playground, vanishing gradients.
14Forward and backward: automatic differentiation
Forward vs backward propagation, dual numbers, backpropagation step by step, why backward is cheap with millions of weights, and how PINNs use autodiff twice.
15Famous results of machine learning
Training vs test data, underfitting and overfitting, bias–variance, No Free Lunch, garbage in–garbage out, curse of dimensionality.
16Physics-informed neural networks
Anatomy of a PINN, residual losses, inverse problems, failure modes, PyTorch code.
17PINNs step by step: 1, 2, 3 points
Fit y = x² and solve y′ = x with one, two, three points; one PINN iteration in numbers; hyperparameters; what “deep” means.
18Operator learning
Solution operators, Green's functions from data, DeepONet (Deep Operator Network), FNO (Fourier Neural Operator).
Part DHands-on
Case study: a pendulum, from physics to PINN
Newton's law to ODE, RK4, training/test/collocation points, a data-only network vs a PINN live in your browser, learning g/L.
20Python toolkit for SciML
NumPy (Numerical Python), Matplotlib, SciPy (Scientific Python) and PyTorch autograd — runnable cells and a slicing visualiser.
Part EResearch frontier
Do PINNs converge? Theory and open problems
Consistency, stability and convergence for PINNs: what has been proved (to 2026), certified error bounds, FEM/spectral/wavelet comparison, why training fails, open problems.
22PINNs in the world: applications and research
Applications in 18 fields, most-cited papers, live radar, emerging directions (KANs, foundation models, quantum), uncertainty, petroleum and singular BVP focus, project ideas.
What this book covers
This is an interactive textbook on the mathematical foundations of machine learning and scientific machine learning (SciML), written for undergraduate and postgraduate students in mathematics, physics, engineering and computer science. It starts from functions, derivatives, integrals and matrices; continues with ordinary and partial differential equations and the numerical methods that solve them (Euler, Runge–Kutta, finite differences, stability and convergence); explains honestly where classical methods struggle; and then builds neural networks from the single perceptron upwards — loss functions, backpropagation, gradient descent and Adam — before reaching the foundations of physics-informed neural networks (PINNs) — why plain networks struggle with scientific data and how PINNs fix it — DeepONet and Fourier neural operators. Every chapter begins with the simplest possible example (for instance, the integral of the constant function $f(x) = 2$ is just the area of a rectangle), states standard definitions and theorems with their sources, and ends with quizzes and a reading list.
Frequently asked questions
What is scientific machine learning? The combination of scientific models — usually differential equations — with machine learning, so that physical laws and data are used together. Chapter 9 explains why it is needed and how it connects to classical numerical methods.
What mathematics do I need for machine learning? Functions, derivatives (especially the chain rule and the gradient), integrals, vectors and matrices, and optimisation. Part A covers all of them from scratch, with simulations.
What is a physics-informed neural network (PINN)? A neural network trained so that it satisfies a differential equation and its boundary conditions, by putting the equation's residual into the loss function. Chapter 16 explains it step by step and lets you train one in the browser.
Do I need to install anything? No. Simulations and Python cells run in your web browser. PyTorch examples can be copied into Google Colab.
Who is it for? Learners at every level — undergraduate and postgraduate students, workshop participants, and anyone who wants to understand scientific machine learning from the ground up.
This book is here to help learners — a learning resource for participants and anyone interested in the field. It is self-contained: definitions, theorems, examples and code are all here, with references to standard books and original papers for further study — see the reading list.