Foundations Refresher
Numbers, Symbols & Algebra
Why start here?
Every machine learning model — from a spam filter to ChatGPT — is, underneath everything, a mathematical function that turns numbers into other numbers. Before we can understand those functions, we need to be comfortable with the language they are written in: algebra.
Don't worry if school math feels far away. We rebuild everything from zero.
Variables: boxes with names
A variable is just a named box that holds a number. Instead of saying "some number", we write . This lets us describe rules that work for any number:
Read it as: "take , double it, add one, call the result ". If , then . If , then . One line of symbols describes infinitely many calculations — that is the entire superpower of algebra.
In machine learning you will constantly meet:
- — an input (e.g. the size of a house)
- — an output (e.g. its price)
- and — weights and bias, the numbers a model learns
- — "y-hat", the model's prediction of
The most famous equation in machine learning is barely more complex than the one above:
That is a complete machine learning model. Seriously. Learning means finding good values for and .
The rules of the game
Algebra has a small rulebook you already half-know:
- Order of operations — parentheses, then powers, then multiplication/division, then addition/subtraction.
- Balance — an equation stays true if you do the same thing to both sides. From you can subtract 1 from both sides (), then divide both by 2 ().
- Distribution — .
Powers, roots and logarithms
- Powers repeat multiplication: .
- Roots undo powers: because .
- Logarithms answer "what power do I need?": because .
Logarithms appear everywhere in ML — in loss functions, in information theory, in probabilities — because they turn huge multiplications into manageable additions:
Sigma notation: loops in math
When a formula repeats over many items, mathematicians use (sigma) as a "for loop":
Read it as: "for from 1 to 4, add up ". If you can read a for loop, you can read sigma notation. You will see it in nearly every ML formula, e.g. "sum the error over all training examples".
Key takeaways
- Variables let one formula describe infinitely many situations.
- A machine learning model is a formula with adjustable numbers (parameters) like and .
- Logs turn multiplication into addition; sigma notation is a for loop.
Check your understanding
1.In the model , which values does training adjust?
2.What does equal?
3.Why do logarithms appear so often in ML?
0% of Mathematics for AI completed