Introduction

Mathematics is a language for saying precise things about quantities.

That is why this chapter comes first. Before vectors, matrices, gradients, probabilities, and losses, we need to read the sentences they are written in.

This is not a proof course. It is a reading course. You will learn how to slow down notation, say it in ordinary language, and connect it to small computations.

The Central Question

How do we read a formula without losing the idea?

For example:

f(x)=2x+1f(x) = 2x + 1

This is not just a line of symbols. It says:

take a number x
double it
add 1
call the result f(x)

That is already close to code:

def f(x):
    return 2 * x + 1

The notation is compact. The code is explicit. The idea is the same.

Why This Matters for ML

Machine learning uses formulas to describe computation:

  • a vector stores ordered numbers
  • a matrix transforms a vector
  • a loss function measures error
  • a gradient tells an optimizer which way to move
  • a probability distribution assigns weight to possible outcomes

If the notation feels like a wall, the later ideas feel harder than they are. This chapter gives you a way through the wall.

What This Chapter Teaches

You will practice the basic language that appears throughout ML:

  • notation as compression
  • variables and expressions
  • functions
  • sets and membership
  • tuples, indices, and coordinates
  • sums and products
  • reading formulas aloud

The purpose is fluency. When a later chapter writes

i=1nxiwi\sum_{i=1}^{n} x_i w_i

you should be able to say what it means before you compute it.

What You Need

You need ordinary arithmetic:

  • addition and multiplication
  • fractions
  • simple substitution, such as replacing xx with 3

You do not need calculus, linear algebra, or programming experience for this chapter. When code appears, it is there to mirror the math, not to test Python knowledge.

How to Read This Chapter

Read slowly. Type small examples when code appears. When notation appears, say it in words before moving on.

The habit matters more than speed.

A Useful Warning

Do not memorize symbol names as a substitute for meaning.

Knowing that \sum is called sigma is less useful than knowing that it means:

add repeated terms

In this chapter, every symbol should become an action.

Next, we start with notation itself: why it exists and why it often looks harder than the idea it represents.