Prerequisite: review 2.1 Sets and set operations first, because functions and relations are defined using sets.
What a function is
Definition
A function
A function from to is a subset of such that every x in
is paired with exactly one y in .
That is the set-theoretic definition used in the local notes.
Read the basic language
- The domain is the set of inputs.
- The target is the set of possible outputs.
- The graph of the function is the set of pairs
(x, y). - The image of a set is the set of outputs it reaches.
- The preimage of a set is the set of inputs that land there.
Common mistake
A function must not send one input to two outputs
A relation may connect one input to many outputs. A function cannot. Every input must have exactly one output.
A first example
Worked example
Read a function from its rule
Take the rule .
The inputs and 2 both map to 4, so two different inputs may share the
same output.
What is not allowed is one input producing two different outputs.
Solution
Image and preimage
Injective, surjective, bijective
Definition
Three useful words
- Injective means different inputs never collide.
- Surjective means every target value is hit.
- Bijective means both injective and surjective.
The local notes also use this language to describe when an inverse function can exist.
Relations
Definition
A relation
A relation on and is any subset of .
If , we speak of a relation on one set.
Relations may be read with properties such as:
- reflexive
- symmetric
- antisymmetric
- transitive
Two especially important special cases are:
- an equivalence relation
- a partial order
A short example of relation language
Worked example
Equality classes are built from a relation
When a relation is reflexive, symmetric, and transitive, it is an equivalence relation.
Then the equivalence classes group the set into non-overlapping blocks.
Solution
What to remember
Quick check
Quick check
Is on the real numbers a relation? Is it a function?
Separate the two questions. First ask whether it is a subset of , then ask whether each input is paired with exactly one output.
Solution