Python & Math for AI
The Python, NumPy, linear algebra, calculus, and probability you actually need before touching models.
Before this: None. Start here if you have never coded.
-
2h 02m
Step 1Python from zero
Variables, loops, functions, and classes in one sitting.
Python Full Course for BeginnersProgramming with Mosh
-
58 min
Step 2NumPy arrays
Every ML library speaks NumPy. Learn arrays, slicing, and broadcasting.
Python NumPy Tutorial for BeginnersfreeCodeCamp.org
rougier/numpy-100★ 14.7k -
1h 34m
Step 3Pandas for data
Load, filter, group, and clean real tables.
Complete Python Pandas Data Science Tutorial! (2025 Updated Edition)Keith Galli
guipsamora/pandas_exercises★ 13.4k -
31 min
Step 4Plotting with Matplotlib
If you can't plot your data, you can't debug your model.
Learn Matplotlib in 30 Minutes - Python Matplotlib TutorialTech With Tim
jakevdp/PythonDataScienceHandbook★ 50.5k -
10 min
Step 5Vectors
The building block of embeddings, weights, and everything else.
Vectors | Chapter 1, Essence of linear algebra3Blue1Brown
-
11 min
Step 6Matrices as transformations
The single best intuition for what a neural-network layer does.
Linear transformations and matrices | Chapter 3, Essence of linear algebra3Blue1Brown
-
10 min
Step 7Matrix multiplication
Why stacking layers is composing functions.
Matrix multiplication as composition | Chapter 4, Essence of linear algebra3Blue1Brown
-
17 min
Step 8Eigenvectors and eigenvalues
The idea behind PCA and many stability tricks.
Eigenvectors and eigenvalues | Chapter 14, Essence of linear algebra3Blue1Brown
-
17 min
Step 9The essence of calculus
Derivatives and integrals, visually, without the textbook pain.
The essence of calculus3Blue1Brown
-
17 min
Step 10Derivatives
Gradients are just derivatives, and gradients train every model.
The paradox of the derivative | Chapter 2, Essence of calculus3Blue1Brown
-
15 min
Step 11Bayes' theorem
How to update beliefs with evidence. Shows up everywhere in ML.
Bayes theorem, the geometry of changing beliefs3Blue1Brown
-
5 min
Step 12The normal distribution
The distribution behind initialization, noise, and diffusion.
The Normal Distribution, Clearly Explained!!!StatQuest with Josh Starmer
-
6 min
Step 13Maximum likelihood
The principle behind almost every loss function.
Maximum Likelihood, clearly explained!!!StatQuest with Josh Starmer
mml-book/mml-book.github.io★ 16.2k
Build it
Watching isn't learning. Pick one and put it on GitHub.
- Load a real CSV (e.g. NYC taxi trips) with pandas, clean it, and answer five questions with one chart each.
- Solve the first 30 numpy-100 exercises without a single Python loop.
- Implement linear regression with plain NumPy and gradient descent, then plot the loss curve.