Loading…
Read functions and relations as subsets of products, then use that language to understand image, preimage, inverse maps, partial orders, and equivalence classes.
An ordered pair records a directed connection from an element of to an element of . A collection of such connections is therefore a subset of the Cartesian product . Some connections assign exactly one output to every input; others allow several outputs or none. The general set language lets us distinguish these possibilities.
Definition 2.2.1
(A relation)
A relation on a pair of sets and is any subset of .
If , we simply call it a relation on .
Definition 2.2.2
(A function)
A function from to is a subset of such that every is paired with exactly one .
The same information can be read in several equivalent ways:
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.
For a subset to be the graph of a function , every must occur in exactly one pair . There are two separate failure modes. A missing input has no corresponding output, so it violates existence. An input paired with two different outputs violates uniqueness. The entire stated domain must be covered exactly once.
For example, viewed as a subset of misses input , since would require . It is therefore not a graph of a function from . By contrast, is a graph from to : for each integer , the unique choice is . The set is also not a graph from to ; it misses negative inputs and has both and as pairs for input .
Common mistake
(The domain may depend on context)
The formula is not a single function unless you specify a domain. It can be a function on , on , or on another domain where division by zero is excluded.
Once functions have been defined as sets of ordered pairs, we can also make a set whose elements are functions. If and are sets, the notation
means the set of all functions from to .
This notation is not accidental. When is finite with elements and is finite with elements, a function is made by choosing one of outputs for each of the inputs. Hence there are such functions. For example, if and , then has functions. This is the same counting principle behind . If is empty there is exactly one function, the empty function, including when is empty; this count uses the combinatorial convention .
Worked example 2.2.3
(Read as a function set)
Let and . Then contains exactly four functions:
Each row is one whole function, not one value of a single function.
Worked example 2.2.4
(The square function has repeated outputs)
Take defined by .
Then and , so different inputs may share the same output. That is allowed.
What is not allowed is a single input having two different outputs.
For example, the relation “” on is not a function if you read it as a rule from to , because allows both and .
The graph of a function is a very special subset of a product: every vertical line through an allowed input hits the graph exactly once.
For a function , the course uses the word image in three related ways:
The preimage of a set is
This exists even when does not have an inverse function.
For and , composition is the function defined by
The order matters: means “first , then ”.
Let be given by , , and . Direct substitution gives
The rightmost function is applied first.
Let , , and . The image of a union satisfies
For the inclusion from left to right, take . Then for some . If , then ; if , then . Thus . Conversely, if , it has a preimage in or in , and that preimage also lies in ; hence .
For intersections only inclusion is guaranteed:
Indeed, a value obtained from an input in is obtained from an input in each of and . Equality can fail when two different inputs collide. Take , , , , and . Then , while .
Preimages preserve both unions and intersections, with full membership proofs:
For the union, means , so or ; this is exactly . Reading the same equivalence backwards proves the reverse inclusion. For the intersection, means and , which is exactly ; again both directions are the same membership equivalence.
The corresponding difference and complement laws must state their ambient sets:
For example, belongs to the first left side exactly when and , which is the condition on the right. In the complement law, is the complement inside the target , while is the complement inside the domain .
Worked example 2.2.5
(Compare image and preimage for )
Let be given by , and let
Then
Also,
Every listed point maps into . Conversely, if , then , , or . Factoring each equation gives respectively , , or . Hence there are no other real preimages.
If we instead take , then
Definition 2.2.6
(Three useful words)
Equivalent formulations are often useful:
First consider the finite map , , with values , , , and . The value is attained by two inputs, so the map is not injective. All three elements of occur, so it is surjective.
Next consider defined by . Its five values are
They are distinct, so this map is injective. It is not surjective onto , since, for example, is not among the values.
Finally, , , is not injective: with . It is not surjective either, because is always even, so no odd integer can be an output.
An arrow diagram tests unique outputs, collisions, and whether the target is covered.
Use one arrow diagram to keep domain, target, image, preimage, injectivity, surjectivity, and composition distinct.
Domain and target
A function f:X->Y is a relation where every input in X has exactly one output in the target Y.
Graph as ordered pairs
The graph stores the same arrows as ordered pairs inside X x Y, with one pair for each input.
Image and preimage
Image is read forward to reached outputs; preimage is read backward from an output set to the inputs that land there.
Injective
Injective means no collision: if two inputs have the same output, they must have been the same input.
Surjective
Surjective means the actual image equals the whole target, so no target element is missed.
Composition
For g o f, first apply f and then feed the resulting output into g.
The same arrow diagram separates the main definitions. A function gives each input exactly one output, injectivity forbids collisions, surjectivity covers the target, and composition feeds one output into the next map.
Theorem 2.2.7
(Inverse functions exist exactly for bijections)
For a function , an inverse function exists if and only if is bijective.
If is injective and surjective, then for every there is a unique with .
That uniqueness lets us define a new function by declaring to be the unique satisfying .
By construction, and , so is the inverse of .
Suppose are both inverses of . Using associativity of composition and both inverse equations,
Thus an inverse, when it exists, is unique. Composition is associative: if , , and , then for every ,
The later inverse-implications proof establishes necessity: an inverse makes bijective. The construction above gives the inverse of a bijection.
Worked example 2.2.8
(Construct injective and non-injective examples)
The function on is injective and surjective, so it is bijective.
The function on is not injective because and have the same image.
The function on is injective but not surjective onto , because it never reaches nonpositive numbers.
Common mistake
(Do not confuse preimage with inverse function)
always makes sense as a preimage. The inverse function only exists when is bijective.
For , the inverse equations have different domains:
These conditions are not the same in general.
Worked example 2.2.9
(One map with a left inverse but no right inverse)
Let and . Define
This map is injective but not surjective, because is never hit. So it can have a left inverse, but it cannot have a right inverse.
For instance, define by
Then .
The missing value rules out , so no right inverse exists.
Worked example 2.2.10
(One map with a right inverse but no left inverse)
Define by
This map is surjective but not injective, so it can have a right inverse but no left inverse.
A right inverse is given by with
Then .
The collision rules out a left inverse.
Theorem 2.2.11
(Finite self-maps: a left inverse already forces an inverse)
Let be finite and let . If there exists with , then is bijective and is also a right inverse of .
The equation says that is injective: if , then applying gives .
For a finite set, an injective map from to itself is automatically surjective. Thus has a two-sided inverse . Using ,
Therefore as well. The argument also covers the empty set, whose only self-map is the empty function.
For and , if , then implies . Thus a left inverse implies injectivity. If , each equals , so a right inverse implies surjectivity.
Conversely, suppose is injective and . Fix one . Define as the unique preimage when and as otherwise. This is a left inverse and uses no axiom of choice: one fixed fallback value suffices. For , the injection into a nonempty has no left inverse, since no map exists. When both sets are empty, the empty map is its own inverse.
For a surjection, constructing a right inverse means choosing one element from each fibre . Explicit choices or finite choices require no general choice axiom. The assertion that every arbitrary surjection has a right inverse invokes the axiom of choice. This differs from the unique preimages of a bijection, which require no such selection principle.
Worked example 2.2.12
(An infinite inclusion with a total left inverse)
Let be , with . Define by for and for . Then for every . There is no right inverse because a negative integer, such as −1, has no preimage under .
A function covers each input exactly once. Dropping that restriction allows us to compare objects by order, divisibility or a shared property, without choosing one output for each input.
We write to mean .
For a relation :
Worked example 2.2.13
(A relation need not be a function)
Let be the set of countries and the set of cities.
The relation “ is a capital city of ” is a relation on . Whether it is a function depends on the historical period and the country.
The relation on is also a relation. It is not a function when read from to , because one input may have multiple outputs.
Relations let us talk about connections without forcing uniqueness. That is exactly what we need for order relations and equivalence relations later on.
Relations are especially important.
Theorem 2.2.14
(Four properties used constantly)
A relation on may have these properties, each required for all indicated elements of :
Two special kinds of relations appear everywhere in later chapters:
The difference between symmetric and antisymmetric is easy to blur:
Worked example 2.2.15
(The divisibility relation is a partial order)
On the positive integers , write when divides .
This relation is reflexive because every number divides itself. It is antisymmetric because if and , then for positive integers. It is transitive because divisibility passes through chains.
So divisibility is a partial order.
The qualification “positive” matters. On all of , both and , although , so antisymmetry would fail there.
Posets are not just a vocabulary item. They let us organize objects by how one contains, refines, or divides another.
Let and define by . This relation is not reflexive: a nonempty set such as does not have empty intersection with itself. It is symmetric because intersection is symmetric. It is not transitive: with , , and , we have and , but not . It is not antisymmetric: and , although the two sets are different.
Now test the following relations on the integers:
These examples show why each relation property must be tested separately; a single failed property is enough to rule out equivalence.
Worked example 2.2.16
(The subset relation as a small poset)
Let and consider , the set of all subsets of . Order by inclusion.
The bottom element is , the top element is , and the two middle elements are and . The only immediate covering relations are
A Hasse diagram draws only these immediate covers; all longer comparisons are then understood by transitivity.
Worked example 2.2.17
(A simple equivalence relation)
For a positive integer , congruence modulo is an equivalence relation on : integers are related when they have the same remainder. Modulo , the three classes contain the integers congruent to , , and , and these classes partition .
Fix with . Define when . This is an equivalence relation on .
It is reflexive because and every positive divides . It is symmetric because if , then . It is transitive: if and , then divides their sum . Thus all three required properties hold.
The class of is
so the classes are exactly the residue classes modulo .
Modulo , the integers , and have the same remainder. They are different integers, but the congruence relation deliberately ignores their differences by multiples of . If that is the information we want to retain, we need one object representing all these equivalent integers.
Choosing the label is convenient, but another representative such as should identify the same object. The set of all integers related to provides that object: replacing by gives exactly the same set. An equivalence class makes this independence of the representative part of the construction.
For a general relation, the collections attached to two elements might overlap without being equal. Reflexivity, symmetry and transitivity rule out that ambiguity. The partition theorem below proves precisely why classes of an equivalence relation can be treated as separate new objects.
Definition 2.2.18
(Equivalence class)
Let be an equivalence relation on . For , the equivalence class of is
Definition 2.2.19
(Quotient set)
If is an equivalence relation on , then the set of equivalence classes is written .
Theorem 2.2.20
(Equivalence classes partition the set)
If is an equivalence relation on , then the equivalence classes cover , and any two classes are either equal or disjoint.
Reflexivity gives , hence for every . Thus the classes cover .
Suppose . Then and . If , we have ; symmetry gives , and transitivity gives and then . Hence , proving .
Conversely, if , then ; symmetry gives , so transitivity yields and then . Thus , proving . Two inclusions give equality. Therefore unequal classes cannot intersect, and the distinct classes form a partition of .
The integer construction and rational construction use this method on pairs. After forming the classes, arithmetic needs a further check: choosing a different representative must give the same output class. The partition theorem defines the objects; well-definedness makes operations on those objects legitimate.
Cardinality means size, but in set theory the correct comparison is not always ordinary counting. Two sets and have the same cardinality when there is a bijection between them:
Worked example 2.2.21
(A first bijection between and )
This corresponds to a function such as
Every integer appears exactly once in this list, so this is a bijective enumeration.
Worked example 2.2.22
(An injection from into )
One useful countability test is whether an ordered pair of natural numbers can be encoded by a single natural number. A clean answer is
This defines a function , because is a natural number for every pair .
To see that is injective, suppose
Then
Unique prime factorization says that a positive integer has only one factorization into powers of primes. Therefore the exponent of must agree on both sides, and the exponent of must agree on both sides:
So two different ordered pairs cannot be sent to the same natural number.
The later cardinality note develops these comparisons for infinite sets.
A function can also supply an operation: it takes a tuple of elements of one set and returns another element of that same set. Specifying this type records both the number of inputs and closure of the result.
Definition 2.2.23
(Operations as functions)
An -ary operation on a set is a function
For example, addition is a binary operation because it takes a pair of inputs and returns one output in the same set.
For , is the singleton containing the empty tuple. A function therefore chooses one distinguished element of ; no such function exists if is empty. Binary operations and the laws they may satisfy are studied in monoids and groups.
Common mistake
(Symmetric is not the same as antisymmetric)
On , is antisymmetric but not symmetric. Equality is both symmetric and antisymmetric, while divisibility on is antisymmetric but not symmetric.
Common mistake
(A relation can fail to be a function in several ways)
It may send one input to many outputs, or it may leave some inputs with no output at all.
Quick check
(Is on the real numbers a relation? Is it a function?)
First ask whether it is a subset of . Then ask whether every input has exactly one output.
It is a relation, because it is a subset of . It is not a function, because one input is related to many possible values of .
Quick check
(Is defined when is not bijective?)
Separate preimage notation from inverse-function notation.
Yes. The preimage always exists.
Quick check
(If has three elements and has two elements, how many functions are in ?)
Choose one output in for each input in .
There are functions.
Quick check
(If has a left inverse and is finite, what property of comes first in the proof that is invertible?)
Use the equation .
First prove that is injective. Since is finite, injective then implies surjective, so is bijective.
Quick check
(Why does define an injection from to ?)
Use the exponents of the primes and .
If , unique prime factorization forces and . Therefore equal outputs imply equal ordered pairs, so is injective.
Quick check
(If a relation is reflexive, symmetric, and transitive, what is it called?)
Recall the special name for a relation that partitions the set into classes.
It is an equivalence relation.
Work out your answer, then check it. You can revise and try again.
Loading…