How AI actually works — from the maths up
No shortcuts, no hand-waving. Each post builds one idea from scratch — with the real maths worked out by hand and a live demo you can play with. Written so a Class-9 student can follow every step.
New here? Start with these
Why the maths matters, and why it pays to start early.
- Perspective~7 min read
Why learn the maths behind AI?
When everyone can push the button, the edge belongs to the few who know what happens after they do.
Read it → - Perspective~6 min read
Start early: the compounding case
The ideas behind AI build on each other. Start early with years of runway and every concept reinforces the last.
Read it → - Perspective~7 min read
A few ideas power all of AI
Six core ideas, reused everywhere. Master the small core and each 'new' model becomes a variation on a song you know.
Read it → - Perspective~6 min read
Future-proof: what stays true
Tools churn every few months; the maths underneath doesn't. Own the slow layer and you're ready for a future you can't predict.
Read it →
All posts
- Deep Learning~35 min read
Attention Is All You Need, explained from scratch
The Transformer paper behind ChatGPT — every idea and every bit of maths, built up so a Class-9 student can follow along.
Read it → - Generative AI~8 min read
Embeddings: turning words into numbers
Meaning becomes position in space. How words turn into vectors, and how we measure 'similar' with cosine similarity.
Read it → - Generative AI~8 min read
How an LLM predicts the next word
One token at a time: scores → softmax → probabilities → pick. The whole loop, with a worked example.
Read it → - Classical ML~8 min read
PCA: finding the directions that matter
Find the direction the data is most spread along, keep it, drop the rest — dimensionality reduction, from scratch.
Read it → - Foundations~8 min read
Gradient descent, by hand
The one update rule behind all of machine learning — computed step by step, then played with live.
Read it → - Generative AI~8 min read
How diffusion models paint from noise
Start from static, remove a little noise at a time, and a picture appears — the idea behind Stable Diffusion.
Read it → - Deep Learning~7 min read
What a single neuron computes
Multiply, add, switch. The one unit every neural network is built from — worked out by hand.
Read it → - Foundations~8 min read
Bayes' theorem and the base-rate trap
Why a positive result on a 99%-accurate test can still mean you're probably fine — updating belief with evidence.
Read it → - Deep Learning~8 min read
Convolution: how CNNs see images
Slide a small filter across an image, multiply and sum — the operation that lets CNNs find edges, shapes and objects.
Read it → - Deep Learning~8 min read
The chain rule and backpropagation
How a network figures out which way to nudge every weight — the chain rule, run backward through the layers.
Read it → - Classical ML~7 min read
K-means clustering, from scratch
Two steps — assign, then update — repeated until messy guesses snap onto the real groups. Learning without labels.
Read it → - Classical ML~9 min read
Decision trees & random forests
How a computer learns which yes/no questions to ask (Gini impurity), and why a forest of trees beats any single one.
Read it → - Generative AI~7 min read
Tokenization: how LLMs read text
Text becomes tokens before a model sees it. How byte-pair encoding builds them — and why it explains cost, context limits and spelling quirks.
Read it → - Classical ML~8 min read
Linear vs logistic regression
One predicts a number, the other a yes/no — and a single S-shaped function (the sigmoid) is all that stands between them.
Read it → - Deep Learning~8 min read
What is a Transformer block?
Attention → add & norm → feed-forward → add & norm. The single block that, stacked, becomes every modern LLM.
Read it → - Classical ML~8 min read
SVMs and the kernel trick
Draw the boundary with the widest margin — then use the kernel trick to separate data that no straight line could.
Read it → - Generative AI~8 min read
RAG, explained from scratch
Retrieve the right passages, paste them into the prompt, let the model answer from them — grounded AI over your own documents.
Read it →
Reading isn't learning
Every post ends with a live demo — but the ideas stick when you build them yourself, with a tutor that gives hints, not answers. The first five lessons are free.