Foundations Refresher
Functions & Graphs
Functions are machines
A function is a machine: numbers go in, numbers come out, and the same input always produces the same output. We write
meaning "the machine named squares whatever you feed it": , .
This is the mental model for AI. A neural network is nothing more than a very large function: an image goes in (as numbers), a label like "cat" comes out (as numbers). Training a model means shaping the machine until it produces the outputs we want.
Graphs: seeing a function
Plotting turns a formula into a picture. A few shapes you must recognize on sight:
| Function | Shape | Where you'll meet it |
|---|---|---|
| straight line | linear regression | |
| U-shaped parabola | loss functions | |
| explosive growth | exponentials, softmax | |
| fast rise, then flattens | log-loss, information | |
| S-curve from 0 to 1 | sigmoid activation |
The slope of a line, in , measures steepness: how much changes when increases by 1. The intercept is where the line crosses the vertical axis. Machine learning is obsessed with slopes — calculus (coming soon) is the science of slopes for curved functions.
Composing functions: machines feeding machines
You can chain machines: feed the output of into . This is written
Example: and give .
Why care? A deep neural network is exactly this: dozens of simple functions composed together. "Deep" literally refers to the length of the chain. When you later meet the chain rule in calculus, it will tell us how to train such chains — and it is the mathematical heart of deep learning.
Functions with many inputs
Real models take many inputs at once. A house-price model might use size, age and location:
We write multi-input functions as . Soon we'll bundle those inputs into a single object called a vector — that's where linear algebra begins.
Key takeaways
- A function is a deterministic machine from inputs to outputs; a neural network is a huge composed function.
- Know the shapes: line, parabola, exponential, logarithm, S-curve.
- Composition () is the structural idea behind "deep" learning.
Check your understanding
1.A neural network is best thought of as…
2.If and , what is ?
3.Which function shape does the sigmoid have?
0% of Mathematics for AI completed