US AI Academy

Course 1

The math behind AI

Five ideas build and run every AI you talk to. Here they are, worked by hand on a real model, one number at a time.

Jazon SamillanoTaught byJazon Samillano
1
a⋅ba\cdot b
dot product
2
y=Wxy=Wx
matrix multiply
3
ezi∑jezj\frac{e^{z_i}}{\sum_j e^{z_j}}
softmax
4
−log⁡2p-\log_2 p
surprise, in bits
5
∂L∂w\frac{\partial L}{\partial w}
chain rule

Why this course

Every number is real

A real model

I follow one sentence, “The Eiffel Tower is in the city of”, through a real AI model: Qwen3-0.6B-Base, a small open model from 2025. I rewrote its math in plain numpy (a basic math toolkit for Python) so I could stop it at every step. Its top guess, Paris at 63.3%, is worked out number by number.

A real network

A network of three neurons trained on a puzzle that a single neuron provably can’t solve. Then I trained the same network 1,000 times, each time starting from different random numbers, and that turned up a surprise.

Your hands on it

Most lessons have labs: drag a line, turn a dial, change a number, and watch the math respond. If you can multiply and add, and you have a scientific calculator (the one on your phone will do), you can follow every step. The symbols are said in plain words here.

What you’ll get out of it

By the end, you’ll be able to

  • follow a real prediction (Paris, 63.3%) from the moment the sentence goes in to the moment the answer comes out;
  • explain the five ideas to a friend, first without equations, then with them;
  • work out by hand three of the calculations a model does to make its guess: the dot product, the matrix product and the softmax;
  • grade any guess in bits (a score for how surprised the guess was by the real answer), and turn bits back into chances;
  • run the chain rule (the math that tells each number in a network which way to move) through a real network, and check it with a nudge, the way engineers do;
  • say which parts of the theory are settled and which are still being argued about;
  • pass the final exam and earn your US AI Academy AI Foundations Certificate.

Syllabus

The lessons

The free chapter is yours, no sign-up needed. It ends on the question that the rest of the course answers.

The free chapter: from the puzzle to one neuron

  1. 1Before the five ideasThe puzzleTwo cats, two dogs, one straight line, and a proof that it can’t be done.Free
  2. 2Before the five ideasWords become numbersTokens, vectors, and why Paris points toward France.Free
  3. 3Idea 1The dot productThe recipe, the angle between arrows, and Paris’s score.Free
  4. 4Idea 1One neuron, one lineWhy a single neuron can only draw a straight line, and the question the rest of the course answers.Free

The full course

  1. 5Idea 2Matrix multiplicationDot products at scale, and every weight multiplication in a Qwen3 layer counted.Full course
  2. 6Idea 3Softmax and attentionQueries and keys, a head that finds Eiffel, the square root, and rotations.Full course
  3. 7Idea 4Surprise, in bitsGrading a guess, Paris versus Tuesday, and the loss every lab trains down.Full course
  4. 8Idea 5The chain rule and gradient descentDownhill steps, probability minus truth, and backpropagation by hand.Full course
  5. 9After the five ideasThe puzzle, solved3,000 steps of training, and the two lines the network drew for itself.Full course
  6. 10After the five ideasWhat the math can’t explain yet272 stuck networks out of 1,000, and the memorization puzzle.Full course
  7. 11After the five ideasThe five ideas, togetherA timeline, and a cheat sheet to print.Full course
  8. 12PracticeTrace one prediction yourselfA worksheet: Paris, start to finish, with your own pencil.Full course
  9. 13PracticeExercises, with worked answersProblems from warm-ups to a capstone, with every step of every answer.Full course
  10. 14CertificateFinal examPass it to earn your AI Foundations Certificate, with its own page anyone can check.Full course

Unlock the whole course

Everything after the free chapter, with real numbers from the same model and the same puzzle network.

  • Ideas 2 to 5, each with labs you can drag: matrices (many dot products at once), softmax and attention (how scores become chances, and how tokens look at each other), and surprise in bits and the chain rule (together, how hidden neurons learn)
  • The puzzle, solved: the three-neuron network trained step by step, with the real numbers
  • An AI tutor that answers from the course itself (up to 30 questions in total)
  • A worksheet that traces the Paris prediction by hand
  • 28 exercises, with every step of every answer worked out
  • A 50-page illustrated PDF guide to the same math, to print or read offline
  • The final exam, and your AI Foundations Certificate when you pass, with its own page anyone can check
  • Lifetime access to this course and its updates
$39paid once, not a subscription. Full refund within 14 days of buying.

You can’t buy it yet: checkout opens soon. Join the list and you’ll get the launch price, $29 instead of $39, if you buy in the first 14 days after it opens.

I’ll email you when the full course opens, and when new lessons and courses arrive. You can unsubscribe any time.

Taught by Jazon Samillano. The AI tutor can make mistakes; the course itself is the reference. See the terms and refund policy.