1. What a Function Really Means
A function is a rule that assigns each input exactly one output. Think of it as a machine: put something in, and it gives back one clear result. No input is allowed to have two different outputs.
This idea comes from relations, but it's more strict. A function keeps the pairing neat and predictable.
2. Formal Definition
If a relation connects elements of set A (inputs) with elements of set B (possible outputs), it becomes a function only when each element of A is paired with one and only one element of B.
2.1. Definition
f \text{ is a function from } A \text{ to } B \iff \forall a \in A, \; \exists! \; b \in B \text{ such that } (a,b) \in f
3. Understanding the Condition
The condition “each input has exactly one output” has two parts:
3.1. 1. Every Input Must Appear
For every a in A, there must be some output assigned to it.
3.2. 2. No Input Can Have Two Outputs
For the same a, you cannot have both (a,b1) and (a,b2) if b1 ≠ b2.
4. Examples of Functions
Some simple rules become functions because each input leads to only one result.
4.1. Example 1
Let A = {1,2,3}. Define:
f = \{(1,2),(2,4),(3,6)\}
Each input has one clear output → this is a function.
4.2. Example 2
Rule: “multiply by 5”.
f(x) = 5x
Every number has exactly one result after being multiplied by 5.
5. Non-Examples (Not Functions)
Anything that gives an input two different outputs is not a function.
5.1. Example
Let A = {1,2} and B = {3,4}. Consider:
R = \{(1,3),(1,4),(2,3)\}
Input 1 gives two different outputs (3 and 4), so this is not a function.
6. Functions as Rules vs. Sets of Pairs
A function can be described in two ways:
- A set of ordered pairs (like a relation)
- A rule or formula such as f(x) = x²
Both describe the same idea — one input gives exactly one output.
7. How Functions Are Usually Written
Functions are commonly written in the form:
f : A \to B
f(a) = b
This simply means that f takes a from A and gives b in B.