Function (Mathematics)
Context: FIT1058_MOC Β· the formal model of a computational task Β· three parts (domain, codomain, rule) Β· its graph is a subset of a Cartesian Product Β· a special Binary Relation
Quick Revision
- π― Objective: assign each domain element exactly one codomain value β models what a task does, not how.
- π¦ Core Components: domain β codomain β rule β graph dom codomain.
- β‘ Key Constraint: totality + single-valuedness β every input has exactly one output.
π Core
1. The Function (Triple)
- Three parts β domain (inputs), codomain (output space), rule ().
- Defining constraint β every input has exactly one output (total + single-valued).
- What not how β specifies input/output, no algorithm required.
2. The Graph (Set of Pairs)
- Definition β .
- Functional relation β each domain element is the first coordinate of exactly one pair.
- Arrows β exactly one arrow leaves each domain point (never 0, never 2).
3. Standard Functions
- Identity β ; constant β .
- Indicator β if else ; empty β .
Key identities:
βοΈ Core Decision Matrix
| Aspect | Requirement | Consequence |
|---|---|---|
| totality | every input mapped | no missing outputs |
| single-valued | one output each | no ambiguity |
| domain part of identity | same rule, different domain | different function |
| multi-argument | domain is a Cartesian Product |
When It Flips: a function is the triple (domain, codomain, rule), not the rule alone β same formula on different domains gives different functions. The rule () is the what; an algorithm is the how.
π Exam Execution Trace
Manual Execution Trace
, :
| Step / State | Pair | ||
|---|---|---|---|
| 0 (Init) | β | β | β |
| 1 | 1 | 1 | |
| 2 | 2 | 3 | |
| 3 | 3 | 5 |
β οΈ Common Mistakes
- π‘ links sets, links elements β is a signature; maps one element to its value β not interchangeable.
π§ Active Recall
Why are two functions with identical rules but different domains different functions?
- Hint: Function = triple.
Answer
- Short answer: The domain (and codomain) is part of a functionβs identity, not just the rule.
- Why: Different graphs β on vs are different sets of pairs.
What is the graph, and what property makes a function more than an arbitrary set of pairs?
- Hint: Functional relation.
Answer
- Short answer: graph; each domain element is the first coordinate of exactly one pair.
- Why: Total + single-valued β exactly one arrow leaves each domain point.
Distinguish a function's rule from an algorithm (squaring example).
- Hint: What vs how.
Answer
- Short answer: The rule fixes each output; an algorithm is a step-by-step method.
- Why: No method required β many algorithms can realise the same rule.