Undergraduate → Set Theory and Logic ↓
Relations and Functions
In undergraduate mathematics, set theory and logic form the basis for understanding various mathematical concepts, including relations and functions, which are crucial for understanding complex structures and operations. This document provides a comprehensive guide to these concepts with many examples.
Introduction to sets
A set is a well-defined collection of distinct objects. These objects are called elements or members of the set. A set can contain numbers, letters, symbols, or even other sets. For example:
A = {1, 2, 3, 4}
Here, A is a set containing the elements 1, 2, 3, and 4. The order of the elements does not matter, and sets do not contain duplicate elements.
Sets are written with curly braces. If the set is empty, it is called the empty set, and is represented by {}
or ∅
.
Relationship
A relation is an association between the elements of two sets. It is usually represented as a subset of the Cartesian product of these sets. If there are two sets, A and B, then the Cartesian product A × B is the set of all possible ordered pairs (a, b), where a ∈ A
and b ∈ B
.
For example, let us consider the following sets:
A = {1, 2, 3} B = {4, 5}
The Cartesian product A × B is:
A × B = {(1, 4), (1, 5), (2, 4), (2, 5), (3, 4), (3, 5)}
A relation R from a set A to a set B is a subset of A × B. For example, let us define a relation R such that an element of A is related to an element of B if the sum of the two elements is greater than 5:
R = {(1, 5), (2, 4), (2, 5), (3, 4), (3, 5)}
Visually, we can represent relationships using a type of graph called a directed graph or arrow diagram.
Properties of relations
Relations may have certain special properties such as reflexivity, symmetry, transitivity, etc., especially when the relation is defined on a set together with itself (a relation from A to A).
- Reflexive: A relation R on a set A is reflexive if every element belongs to itself. Formally,
(a, a) ∈ R
for alla ∈ A
- Symmetric: A relation R on a set A is symmetric if
(a, b) ∈ R
implies that(b, a) ∈ R
for alla, b ∈ A
- Transitive: A relation R on a set A is transitive if whenever
(a, b) ∈ R
and(b, c) ∈ R
, then(a, c) ∈ R
.
Work
A function is a specific type of relationship between two sets A and B, where each element of set A is related to exactly one element of set B. Functions can be represented using expressions, graphs, and ordered pairs.
Symbolically, a function f
from a set A
to a set B
is represented as f: A → B
We say that f(x)
is the image of x
under f
.
f: A → B f(x) = x^2 A = {1, 2, 3} B = {1, 4, 9}
In the above example, we see that each element of A is mapped to an element of B, specifically its class.
Types of tasks
- One-to-one (injective) function: A function is injective if distinct elements in the domain correspond to distinct elements in the range. Formally,
f(a) = f(b)
impliesa = b
. - Inner (surveyor) function: A function is surveyor if every element of the codomain is the image of at least one element of the domain.
- Bijective: A function is bijective if it is both injective and surjective, meaning that it establishes a perfect "pairing" between the domain and codomain.
Formal definitions and examples
A formal definition provides the rigor and basis on which real-world applications can be evaluated.
One-to-one (injective) example
Consider the function f: R → R
defined by f(x) = 2x + 3
Let us prove that this function is injective.
Suppose f(x1) = f(x2). Then, 2x1 + 3 = 2x2 + 3. Subtract 3 from both sides, 2x1 = 2x2. Divide by 2, x1 = x2.
Since we have proved x1 = x2
, the function is injective.
Onto (surjective) example
Consider the function f: R → R
defined by f(x) = x^3
. We need to show that the function is omniprojective.
Let y be a real number such that y = x^3. Then, x = y^(1/3) satisfies this.
Thus, for any y
in the codomain, there exists an x
in the domain such that f(x) = y
. This makes the function omniscient.
Bifurcation example
Consider the function f: R → R
defined by f(x) = x^2
. Let us determine whether it is bijective.
f(x1) = f(x2), implies x1^2 = x2^2, thus x1 = x2 or x1 = -x2. Not one-to-one (injective is false). The range of f(x) = x^2 is only non-negative real numbers. Hence it's not onto (surjective is false).
Therefore, f(x) = x^2
is not a double bond.
Important concepts in works
- Domain: The set of all input values (elements from the set A) for which the function is defined.
- Codomain: the set of all possible output values (not all may be mapped from the domain by the function).
- Range: The set of all actual output values generated by the function from the input values in the domain.
Function composition and inverses
Function composition: The combination of two functions where the output of one function becomes the input of the other function. If two functions f: A → B
and g: B → C
, then the composition (g ∘ f): A → C
is defined by (g ∘ f)(x) = g(f(x))
.
Inverse function: If f: A → B
is a bijection, then its inverse f -1 : B → A
reverses the mapping and holds f(f -1 (x)) = x
for all x ∈ B
, and f -1 (f(y)) = y
for all y ∈ A
Consider the example function:
Let f(x) = 2x - 3 and g(x) = x + 3/2. Result of (g ∘ f)(x) = g(f(x)). f(f -1 (x)) should map back original value.
With the above explanations and examples, we have tried to cover the essence of relations and functions in the context of set theory and mathematical logic. Understanding these concepts forms the basis for more advanced mathematical topics, models, and real-world applications.