Free through lesson 3

Math for Programmers for Beginners

From exponents, logarithms, and sequences to vectors and matrices, derivatives and gradient descent, and probability and statistics. Across 30 lessons, you'll get to the point where you can read the formulas behind machine learning and algorithms and turn them into code yourself. No walls of proofs. You compute by hand first, then hand the work to NumPy, and every output shown comes from actually running the code.

Curriculum

The 30 lessons are split into 6 chapters. Working through them in order from chapter 1 is recommended, but feel free to dip into just the parts that interest you. * This is not a course full of proofs. The priority is understanding what each formula is a tool for. * Most samples run right in your browser (they use only the standard library). For lessons that need numpy or scipy, try them with python3 on your own machine.

Chapter 1 — Working with Numbers (lessons 1–5)

Reread math notation as Python code, and gather the tools for measuring growth: exponents, logarithms, and sequences. Finally, you'll run into float errors firsthand and learn to tell which digits of a number you can trust.

Chapter 2 — Linear Algebra (lessons 6–12)

Compute vectors and matrices by hand all the way through, using plain Python lists. After writing dot products, matrix multiplication, inverses, and eigenvalues yourself, you'll finally replace the same work with a single line of NumPy.

6

Vectors: Lists of Numbers and Their Length

A vector is just a list. Compute the L2 norm by hand, normalize to a unit vector, and use distance to find a nearest neighbor.

🔒 Basic
7

Vector Operations and Linear Combinations

Addition, subtraction, and scalar multiplication all work element by element. See that a linear combination is a prediction formula, and tell the elementwise product apart from the dot product.

🔒 Basic
8

Dot Products and Cosine Similarity

Confirm that the sign of the dot product tells you the angle. Rank documents by closeness with cosine similarity, which removes the effect of length.

🔒 Basic
9

Matrices, and Matrix Times Vector

A matrix is a list of lists. Verify by hand that matrix times vector is "a dot product with each row," and watch a rotation matrix move a vector.

🔒 Basic
10

Matrix Multiplication Is Composing Transformations

Write matrix multiplication as a triple loop and learn the shape rules. Confirm that the order of multiplication changes the answer, and see what the identity matrix does.

🔒 Basic
11

Inverse Matrices and Systems of Linear Equations

Build a 2x2 inverse by hand and see that a determinant of 0 means no unique solution. Write Gaussian elimination and run into an ill-conditioned problem.

🔒 Basic
12

Eigenvalues, Eigenvectors, and How to Write Them in NumPy

Look for vectors whose direction doesn't change when multiplied by a matrix. Work through the characteristic equation and power iteration by hand, then hand the same calculation to NumPy.

🔒 Basic

Chapter 3 — Derivatives (lessons 13–18)

Start by finding slopes numerically, then work through the chain rule, partial derivatives, and gradients by hand. Finally, run gradient descent in plain Python and watch it land exactly on the least-squares answer.

Chapter 4 — Probability (lessons 19–23)

Start from "count it and you get the answer," then move on to conditional probability, Bayes, expected value, variance, and common distributions. Each time, you'll check on the spot how seeded random simulations close in on the theoretical values.

Chapter 5 — Statistics (lessons 24–27)

Covers everything from descriptive statistics that summarize the data you have to estimation and hypothesis testing that infer the population behind it. You'll write a permutation test yourself to get a p-value, and finish by solving correlation and regression with the least-squares formula.

Chapter 6 — Wrapping Up (lessons 28–30)

Build 4 classic cases of misreading numbers yourself, so you learn firsthand where judgment goes wrong. Finally, practice turning formulas from papers and docs into code, and get a map of which courses to take next.

Once you finish all 30 lessons, it's time to be the one using these tools. Work with data in Python & Machine Learning for Beginners, look inside the training loop in PyTorch & Deep Learning for Beginners, measure complexity in Algorithms for Beginners, and connect numbers to decisions in Practical Data Analysis Course. Each one picks up where this course leaves off. A membership unlocks every course.