Function
A rule that takes an input and returns exactly one output.
- Domain = inputs; codomain = possible outputs.
- Linear, polynomial, exponential, neural-net... all functions.
- A trained model IS a function from inputs to predictions.
When to use: Defining any input→output rule: activations, losses, models.
Example: f(x) = 2x + 1 maps 3 → 7. A CNN maps 28×28 image → class label in {0,...,9}.