Maths for AI
Topic 1 · Getting started · ⏱ about 30 min

Maths for AI: Start Here

Which maths machine learning really uses, where each idea appears in a model, and how to learn it with pictures, numbers and code instead of memorising formulas.

Show:
In this topic
Beginner

You need less maths than you fear, but you need it

You can train a model by copying code. But to choose the right model, understand why training fails, read a paper or explain a result, you need four areas of maths, at the level this course teaches:

AreaWhat it is for in AITopics
Linear algebradata is a matrix, a model is mostly matrix multiplications, embeddings are vectorsvectors, matrices, eigenvectors & SVD
Calculustraining means following the gradient of the loss downhillderivatives, gradients, optimisation
Probability & statisticsmodels output probabilities; we measure uncertainty and test whether one model is really betterdistributions, MLE, inference
Information & computationcross-entropy is the loss of almost every classifier; computers approximate real numbersinformation theory, numerical stability

School algebra is enough to start. Each topic begins with the idea in words, then a picture you can change, then the symbols, then a few lines of NumPy that check the maths.

Beginner

If your school maths is rusty

Start with the three short refresher lessons: Numbers, Powers & Algebra, Functions & Graphs and Describing Data. Each ends with practice questions that check your answers; if you get them right, skip ahead. Every lesson in this course has practice questions, and the maths symbols guide explains every symbol you will meet, with how to say it and what it means in code.

Try it

Where the maths appears in one training step

Step through a single step of training a model and see which area of maths does each job.

Interactive: this part runs in your browser.

Beginner

How to study maths for AI

  • Words first, symbols second. Say what a formula means in a sentence before reading the notation. The notation topic explains every symbol you will meet.
  • Use small numbers. Work an example by hand with 2 or 3 values; the pattern then generalises.
  • Check with code. Every topic has NumPy code you can run and change. If your hand calculation and the code disagree, you have found exactly what to learn.
  • Come back. Maths sinks in over several passes. The Machine Learning course links back here whenever an idea is needed, so you will meet each topic again in context.
Check yourself

Quiz

1. Which area of maths does training by gradient descent mainly rely on?

2. A dataset of 1,000 patients with 12 features is naturally a…

3. Cross-entropy, the usual classification loss, comes from…

Go deeper

📚 Further reading

Trusted, mostly free sources: official documentation, well-known textbooks and courses. When you want to confirm or go deeper on anything here, start with these.

Ready