A relation from a set A to a set B is a subset of the Cartesian product A×B. It includes pairs (a,b) where each a∈A is associated with a particular b∈B based on some specific condition or rule.
In both examples, we used a condition to filter pairs from the Cartesian product:
In the actor-movie example, the condition was that the actor starred in the movie.
In the prime-composite example, the condition was that the prime divides the composite number.
This idea of selecting specific pairs is the essence of defining a relation.
Consider a relation R from the set A={1,2,3,4,5,6,7} to the set B={1,2,3,4,5,6,7,8,9}, defined by xRy if and only if x+y=6. The relation R is explicitly given as:
R={(1,5),(2,4),(3,3),(4,2),(5,1)}.
Definitions:
Consider a relation R from the set A={1,2,3,4,5,6,7} to the set B={1,2,3,4,5,6,7,8,9}, defined by xRy if and only if x+y=6. The relation R is explicitly given as:
R={(1,5),(2,4),(3,3),(4,2),(5,1)}.
Image:
If x is related to y under the relation R, then y is called the image of x. In this example:
The image of 1 is 5, as (1,5)∈R.
The image of 2 is 4, as (2,4)∈R.
Similarly, the image of 3 is 3, the image of 4 is 2, and the image of 5 is 1.
Preimage:
If y is related to x under the relation R, then x is called the preimage of y. In this example:
The preimage of 5 is 1, as (1,5)∈R.
The preimage of 4 is 2, the preimage of 3 is 3, the preimage of 2 is 4, and the preimage of 1 is 5.
Domain:
The domain of a relation R is the set of all elements in A that have at least one image in B.
From the given relation, the domain is:
Domain of R={1,2,3,4,5}.
Codomain:
The codomain of a relation R is the entire set B, irrespective of whether all its elements are images of elements in A.
For this example, the codomain is:
Codomain of R={1,2,3,4,5,6,7,8,9}.
Range:
The range of a relation R is the set of all elements in B that are images of elements in A. It is the set of all y-values in the ordered pairs of R:
A relation can be defined in set-builder form like in the following example. Consider a relation R from the set A to the set B (take A and B as before). An element in set A, say x, is related to an element in set B, say y, under relation R if and only if y=±x2. We can write this concisely as: R is a relation from set A to set B such that for all x∈A and y∈B, xRy(x,y)∈R if and only if y=±x2.
We can also express this in set-builder form as:
R={(x,y)∈A×B:y=±x2}.
Roster Form:
In this method, all the elements of the relation are explicitly listed. This is useful for finite sets where listing elements is feasible.
For the above example, the relation R in roster form becomes:
R={(1,1),(1,−1),(2,4),(3,9)}.
Mappings:
Relations defined on finite sets can be visually represented using mappings. A mapping diagram displays the elements of set A on the left and those of set B on the right. Arrows are drawn from each element of A to its related element(s) in B as per the relation.
For instance, consider the above example. The mapping diagram is illustrated as follows:
These mappings clearly represent the connections between elements of sets A and B.
Mapping diagrams are particularly useful for understanding relations at a glance, making them a preferred choice in visualizing finite relations.
Relation Matrix:
A relation matrix is an efficient way to represent relations defined on finite sets. It organizes the elements of the sets involved into rows and columns to provide a clear visual representation of the relation.
Structure of the Matrix:
Rows: Represent the elements of the first set (A).
Columns: Represent the elements of the second set (B).
Entries: At the intersection of a row (corresponding to an element x∈A) and a column (corresponding to an element y∈B), the value is:
1, if (x,y)∈R (i.e., x is related to y), or
0, if (x,y)∈/R.
Explanation:
For x=1, y=0 satisfies y=x−1, so a 1 is placed in the row for 1 and column for 0.
For x=2, y=1 satisfies the condition, so a 1 is placed in the corresponding row and column.
This process is repeated for all pairs in R.
General Rule:
If M is the relation matrix of R, then for any element xi∈A and yj∈B:
Mij={1,0,if (xi,yj)∈Rif (xi,yj)∈/R.
This method provides a structured way to capture the relationship between elements of the two sets.
Graphical Representation of Relations
Relations can be effectively represented using graphs on a Cartesian coordinate system. These visual representations help in understanding the structure and properties of the relation. Let's explore this with two examples:
Example 1: Finite Sets
Let A={1,2,3,4,5} and B={3,4,5}. The Cartesian product A×B represents all ordered pairs (x,y), forming a lattice of points in the Cartesian plane.
Now, define a relation T as xTy⟺x<y.
The relation T is a subset of A×B, consisting of all points where the x-coordinate is less than the y-coordinate.
In the Cartesian plane, these points form part of the lattice and can be plotted as individual dots where x<y.
Example 2: Intervals
Let A=[2,5] and B=[4,6]. These are intervals, meaning they are sets containing infinitely many elements (all real numbers between the specified bounds). The Cartesian product A×B is a rectangle in the Cartesian plane, with A as the range for the x-coordinate and B as the range for the y-coordinate.
Now, define a relation S as xSy⟺y=x+2.
The relation S consists of all points (x,y) in A×B that satisfy y=x+2. This is a straight line passing through the rectangle, as it satisfies the equation of a line.
For example:
If x=3, then y=3+2=5, so (3,5)∈S.
Similarly, for other values of x in A, their corresponding y values form a line.
The graphical representation of S is a diagonal line cutting through the rectangular region A×B, as shown in the figure.
For Finite Sets: The relation is represented as a subset of lattice points, making it easy to see which elements of A are related to elements of B.
For Intervals: The relation is a continuous line, curve, or other geometrical shape within the region defined by A×B, depending on the rule defining the relation.
If set A has m elements and set B has n elements, then the Cartesian product A×B contains m⋅n ordered pairs. A relation R from A to B is a subset of A×B. Therefore, the total number of relations that can be defined from A to B is equal to the number of subsets of A×B, which is 2mn.
Example:
Let A={1,2} and B={a,b,c}.
The set A has m=2 elements, and the set B has n=3 elements.
The Cartesian product A×B consists of m⋅n=2⋅3=6 ordered pairs:
A×B={(1,a),(1,b),(1,c),(2,a),(2,b),(2,c)}.
A relation R from A to B is any subset of A×B.
The total number of subsets of A×B is 2mn=26=64.
Thus, there are 64 different relations that can be defined from A to B.
A relation on a set refers to a situation where the relation is defined between elements of the same set. Formally, if a relation R is defined from a set A to itself, then R is a subset of the Cartesian product A×A. In other words, every ordered pair in R consists of elements that both belong to A. Such a relation is said to be defined on the set A.
Example:
Let A={1,2,3}, and consider a relation R given by:
R={(1,2),(2,3),(1,1)}.
Here:
A×A is the set of all possible ordered pairs of A:
Relations between two sets A and B can be categorized based on how elements of A are related to elements of B. Below are the main types:
One-to-One Relation (Injective Relation)
A relation R is called one-to-one if each element of A is related to a unique element in B, and no two elements of A are related to the same element in B.
Example:
Let A={1,2,3} and B={a,b,c}, and the relation R={(1,a),(2,b),(3,c)}.
Here, each element of A is related to exactly one unique element of B, and no two elements in A share the same image.
Many-to-One Relation
A relation R is many-to-one if multiple elements of A are related to the same element in B.
Example:
Let A={1,2,3} and B={a,b}, and the relation R={(1,a),(2,a),(3,b)}.
Here, 1 and 2 are both related to a, which makes the relation many-to-one.
One-to-Many Relation
A relation R is one-to-many if a single element of A is related to multiple elements in B. Such a relation does not represent a function, as a function requires every element in A to be related to at most one element in B.
Example:
Let A={1,2} and B={a,b,c}, and the relation R={(1,a),(1,b),(2,c)}.
Here, 1 is related to both a and b, making the relation one-to-many.
Many-to-Many Relation
A relation R is many-to-many if multiple elements in A are related to multiple elements in B.
Example:
Let A={1,2} and B={a,b}, and the relation R={(1,a),(1,b),(2,a),(2,b)}.
Here, both 1 and 2 are related to both a and b, making it a many-to-many relation.
We are interested in four important types of relations defined on a set: reflexive, symmetric, transitive, and equivalence relations. These classifications form the foundation for understanding the structure and properties of relations in mathematics.
Let A be a set, and R be a relation on A. The relation R is called reflexive if every element of A is related to itself.
This means that for all a∈A, aRa (i.e., (a,a)∈R).
In simpler terms, if a relation is reflexive, then every element in the set appears as a pair with itself in the relation.
Examples of Reflexive Relations
Proving a Relation is Reflexive
To prove that a relation R on a set A is reflexive, we use the Principle of Universal Generalization.
Principle of Universal Generalization:
This principle states that to prove a property holds for all elements of a set, it is sufficient to prove the property for an arbitrary element of the set. If the property is shown to hold for an arbitrary element, it applies universally to every element of the set.
Consider the theorem: The sum of the angles of a triangle is 180°.
You did not prove this for every triangle in existence. Instead, you proved it for an arbitrary triangle using geometric properties. Since the choice of the triangle was arbitrary, the proof applies to all triangles.
Disproving Reflexivity
To disprove that a relation is reflexive, it is sufficient to find one counterexample where an element a∈A is not related to itself (i.e., (a,a)∈/R).
This single counterexample is enough to conclude that the relation is not reflexive.
Consider a relation R defined on a set A. The relation R is said to be symmetric if:
If xRy, then yRx.
In other words, if (x,y)∈R, then (y,x)∈R as well. This property ensures that the relation is "bidirectional" — whenever x is related to y, y must also be related to x.
To understand the exact meaning of the above definition, consider the following illustration:
Let R be a relation defined on A={1,2,3,4} as:
R={(1,1),(1,2),(2,1),(3,4),(4,3)}.
This relation is symmetric, as for every pair (x,y)∈R, the pair (y,x) is also in R. Let’s verify this:
The pair (1,1) is symmetric because reversing the order gives the same pair (1,1), with no change.
The pair (1,2) has its reverse pair (2,1) also present in R, ensuring symmetry.
Similarly, (3,4) and (4,3) form a symmetric pair.
Hence, this R satisfies the condition of symmetry.
Now, suppose we remove (4,3) from R, leaving:
R={(1,1),(1,2),(2,1),(3,4)}.
In this case, the relation is no longer symmetric because (3,4)∈R, but its reverse pair (4,3) is not present. This absence violates the symmetry condition.
Another example of a symmetric relation is S={(1,1),(2,2)} on the same set A. Here, every pair is symmetric because reversing the pairs (1,1) and (2,2) has no effect. Thus, S satisfies symmetry.
Interestingly, the empty relation, R1=∅, is also symmetric. Since there are no pairs in R1, it does not contain any pair that could potentially violate the symmetry condition. This makes it symmetric by default, a concept known as being vacuously symmetric.
On the other hand, consider R2={(1,2)}. This relation is not symmetric because the reverse pair (2,1) is not present in R2. Thus, symmetry fails as soon as one pair lacks its reverse.
In summary, symmetry requires every pair in the relation to have its reverse also present. A relation can fail this condition if even a single reverse pair is missing, as seen in R2. Meanwhile, both the empty relation and relations where all pairs satisfy the reverse condition, like R and S, maintain symmetry.
Consider a relation R defined on a set A. The relation R is said to be transitive if:
If xRy and yRz, then xRz.
In other words, if under a given relation R, x is related to y, and y is related to z, then x must also be related to z. This property ensures that the relation logically connects elements in a chain-like manner.
To understand in depth consider the following examples:
Examples of Transitive and Non-Transitive Relations
Consider a set A={1,2,3,4,5}, and the following relations defined on A:
1. Relation R={(1,1),(1,2),(2,3),(1,3)}
We check whether R is transitive by analyzing the pairs:
(1,2)∈R and (2,3)∈R.
By the condition for transitivity, if 1R2 and 2R3, then 1R3 must also hold.
Since (1,3)∈R, the condition is satisfied.
Thus, R is a transitive relation because it contains all required pairs to maintain transitivity.
2. Relation R1={(1,2),(2,3),(4,5)}
Here, we again check for transitivity:
(1,2)∈R1 and (2,3)∈R1.
For transitivity, 1R2 and 2R3 should imply 1R3, but (1,3)∈/R1.
This absence violates the transitivity condition.
Thus, R1 is not transitive, as it lacks the pair (1,3).
3. Relation R2=∅
The relation R2 contains no pairs. For a relation to be non-transitive, there must exist pairs (x,y) and (y,z) such that (x,z) is not in the relation. However, since R2 contains no pairs at all, there is no sequence of pairs that could violate transitivity.
By the principle of vacuous truth, R2 is transitive because it does not fail the transitivity condition.
4. Relation R4={(1,2)}
This relation contains only a single pair. For transitivity, there must exist pairs (x,y) and (y,z) such that (x,z) needs to be checked. Since R4 has only one pair, no such sequence exists, and hence transitivity is not violated.
Thus, R4 is transitive, as it does not fail the condition.
These examples illustrate how transitivity depends on the logical connections between pairs in a relation.
How to prove that a relation is transitive or non-transitive?
To prove that a relation is not transitive, look for a counterexample. Specifically, find two pairs xRy and yRz in the relation, where xRz is not included. If such a counterexample exists, the relation is not transitive. This single example is enough to show that transitivity does not hold.
To prove that a relation is transitive, check every pair xRy and yRz in the relation to make sure that xRz is also included. If this holds for all pairs, then the relation is transitive. For relations on finite sets, you can check all pairs manually since there are a limited number of pairs to verify.
For relations on infinite sets, it’s impossible to check all pairs manually. Instead, we use logical reasoning. Assume xRy and yRz hold, and then use the definition of the relation to logically deduce whether xRz also holds. If this works for any arbitrary x, y, and z, the relation is transitive.
For example, if a relation R is defined as xRy⟺f(x,y) holds, you use the properties of f(x,y) to show that xRy and yRz imply xRz.
An equivalence relation on a set A is a relation R⊆A×A that satisfies the following three properties for all a,b,c∈A:
Reflexive: Every element is related to itself. That is, aRa for all a∈A.
Symmetric: If aRb, then bRa. In other words, if one element is related to another, the reverse must also hold.
Transitive: If aRb and bRc, then aRc. This means that if an element is related to a second and the second is related to a third, then the first is related to the third.
A relation R that satisfies all three of these properties is called an equivalence relation. Equivalence relations partition the set A into disjoint subsets called equivalence classes, where all elements in the same class are related to each other under R.
Let R be a relation defined from a set A to a set B. The inverse relation of R, denoted as R−1, is obtained by swapping the positions of the elements in each ordered pair of R. Formally, it is defined as:
R−1={(b,a):(a,b)∈R}.
This means that if (a,b) is in R, then (b,a) will be in R−1. The inverse relation is useful when reversing the direction of the relationship between elements in A and B.
Examples:
Finite Relation:
Let R={(1,2),(1,3),(2,4),(3,2)}.
To find R−1, swap each pair:
R−1={(2,1),(3,1),(4,2),(2,3)}.
This means that if 1 is related to 2 in R, then 2 is related to 1 in R−1.
Relation on R2:
Consider S={(x,y)∈R2:3x+4y=1}.
For R−1, interchange x and y in the equation:
S−1={(x,y)∈R2:3y+4x=1}.
This means the inverse relation reverses the roles of x and y in the original equation.
Graphical Relation:
Consider T={(x,y)∈R2:x=siny}.
To find T−1, swap x and y in the relation:
T−1={(x,y)∈R2:y=sinx}.
The inverse switches the input and output of the sine function.
The inverse relation is obtained by interchanging the elements in each ordered pair or swapping the variables in the defining equation. This process effectively reverses the direction of the original relation. For instance:
If R represents "is the parent of," then R−1 would represent "is the child of."
If R is a line equation, its inverse flips the roles of x and y, altering its interpretation geometrically.
A relationR between two sets A and B is a subset of the Cartesian product A×B, defined as R⊆A×B. Similarly, a relation S between sets B and C is a subset of B×C, defined as S⊆B×C.
The composition of relations, denoted as S∘R, is a relation between A and C such that:
S∘R={(a,c)∈A×C:∃b∈B such that (a,b)∈R and (b,c)∈S}.
In simpler terms, the composition S∘R relates an element a∈A to an element c∈C if there exists an intermediate element b∈B such that a is related to b through R, and b is related to c through S.
Take a look at the following example to understand the above definition:
Consider the sets:
A={Richard,Robert,Alexander,Amelia}: representing individuals in the first generation.
B={John,Max,Jimmy,Sophia,Justin}: representing individuals in the second generation.
C={June,Kyle,Eden,Billie,Tim}: representing individuals in the third generation.
Define two relations:
R: "is the father of," which relates elements in A to B:
The composition of relations S∘R combines two consecutive relationships into one, bypassing the intermediate set. In this example, S∘R defines "is the grandfather of" by combining two "is the father of" relations.
Consider a set C, which consists of all circles in a plane. Define a relation R on C such that c1Rc2 if and only if the circle c1 is concentric to the circle c2. In this context, c1 and c2 are concentric if they share the same center.
The relation R is an equivalence relation because it satisfies the properties of reflexivity, symmetry, and transitivity:
Reflexivity: For any circle c∈C, cRc, because every circle is concentric to itself.
Symmetry: If c1Rc2, then c2Rc1, because if c1 is concentric to c2, then c2 must also be concentric to c1.
Transitivity: If c1Rc2 and c2Rc3, then c1Rc3, because if c1 and c2 share the same center, and c2 and c3 also share the same center, then c1 and c3 must have the same center.
Thus, R is an equivalence relation.
An interesting property of equivalence relations is that they partition the set C into distinct subsets called equivalence classes. In this case, each equivalence class consists of all circles that are concentric with a specific circle.
For example, consider a circle c1∈C. All circles that are concentric to c1 form one equivalence class. Let us call this class "Class 1." Similarly, if there is another circle c2∈/Class 1, all circles concentric to c2 form a different equivalence class, say "Class 2." This process continues, and each equivalence class represents a distinct group of concentric circles.
From the diagram, you can see multiple equivalence classes of circles. Each group of concentric circles forms one class, and no circle in one class is concentric to any circle in another class. For example:
Class 1 contains all circles concentric to a circle c1.
Class 2 contains all circles concentric to a circle c2, which is not concentric with c1.
Within each equivalence class, any circle can be chosen as the representative of the class. For instance, c1 may represent Class 1, and c2 may represent Class 2. We denote the equivalence class of c1 as [c1], which is defined as:
[c1]={c∈C:cRc1}.
This definition implies that [c1] contains all circles in C that are concentric to c1. Similarly, the equivalence class of c2 is [c2], containing all circles concentric to c2.
In conclusion, the set C is partitioned into equivalence classes by the relation R, where each equivalence class represents a unique group of concentric circles. This idea generalizes to any equivalence relation, as it always divides the set into non-overlapping equivalence classes.
Within an equivalence class, any element can act as a representative of the class. For instance, if [a] is the equivalence class containing a, then a is a natural choice as a representative. However, any other element b∈[a] can also serve as a representative, because if b∈[a], it implies bRa, meaning b is equivalent to a. Thus, the equivalence class [a] can be referred to as [b], as long as b belongs to [a].
If two elements a,b∈A are related, i.e., aRb, then their equivalence classes are the same, [a]=[b]. This follows from the definition of equivalence classes, as aRb ensures that every element related to a is also related to b, and vice versa. In contrast, if aRb, their equivalence classes [a] and [b] are distinct and disjoint. That is, no element can belong to both [a] and [b], and the intersection of these classes is empty, [a]∩[b]=∅.
This disjointness arises naturally from the properties of an equivalence relation. If any element x belonged to both [a] and [b], it would mean xRa and xRb, which implies aRb. This contradicts the assumption that aRb. Therefore, the equivalence classes partition the set A into non-overlapping subsets, ensuring that each element of A belongs to exactly one equivalence class.
In summary, an equivalence class is defined as the set of all elements related to a specific element a. These classes partition the set A into distinct groups. Any element of a class can act as its representative, and equivalence classes are either identical (if their representatives are related) or disjoint (if their representatives are not related). This structure provides a clear way to organize elements of A based on the equivalence relation R.
A partition of a set S is a collection of non-empty subsets S1,S2,…,Sn such that:
The subsets are pairwise disjoint, meaning Si∩Sj=∅ for all i=j, and
The union of all subsets equals the entire set, S1∪S2∪⋯∪Sn=S.
In other words, a partition divides S into distinct pieces where every element of S belongs to exactly one subset Si.
Theorem: Equivalence Relation Induces a Partition
If we have an equivalence relation R defined on a set S, then the set of all equivalence classes formed by R is a partition of S.
Proof:
Each element a∈S belongs to an equivalence class [a]. By the properties of equivalence relations:
Pairwise Disjointness: If [a]=[b], then [a]∩[b]=∅. This is because if there is any overlap between two classes, their representatives a and b would be related, implying [a]=[b].
Exhaustiveness: The union of all equivalence classes covers the entire set S, as every element a∈S is in its own equivalence class [a].
Thus, the set of equivalence classes {[a]:a∈S} forms a partition of S.
Converse: Does Every Partition Create an Equivalence Relation?
Yes, every partition of a set S creates an equivalence relation.
Proof:
Suppose the set S is partitioned into subsets S1,S2,…,Sn, where:
Si∩Sj=∅ for i=j, and
S1∪S2∪⋯∪Sn=S.
Define a relation R on S as:
xRy⟺x and y belong to the same subset Si for some i.
Reflexivity: For any x∈S, x belongs to some Si. Since x is in the same subset as itself, xRx.
Symmetry: If xRy, then x and y are in the same subset Si. This means yRx.
Transitivity: If xRy and yRz, then x and y are in the same subset Si, and y and z are also in Si. Thus, x and z are in Si, and xRz.
Therefore, R is an equivalence relation. This shows that any partition of S naturally defines an equivalence relation on S.
Counting Total Number of Equivalence Relations on a Set§
The total number of equivalence relations on a set A is equal to the number of partitions that can be formed on A. Each equivalence relation divides the set into disjoint equivalence classes, and these equivalence classes correspond directly to the partitions of the set.
A partition of a set A is a collection of non-empty, disjoint subsets such that every element of A belongs to exactly one subset. For a set of size n, the number of partitions is given by the Bell number, Bn.
Example: Partitions of A={a,b,c,d}
Here are the 15 possible partitions of A={a,b,c,d}:
{a},{b,c,d}
{b},{a,c,d}
{c},{a,b,d}
{d},{a,b,c}
{a,b},{c,d}
{a,c},{b,d}
{a,d},{b,c}
{a},{b},{c,d}
{a},{c},{b,d}
{a},{d},{b,c}
{b},{c},{a,d}
{b},{d},{a,c}
{c},{d},{a,b}
{a},{b},{c},{d}
{a,b,c,d}
Conclusion
For the set A={a,b,c,d}, there are 15 distinct partitions. Each partition corresponds to a unique equivalence relation on A. Hence, there are exactly 15 equivalence relations possible on a set of size 4.
Section 3 of 18 · Relations and Functions
Mark this section complete when you have worked through its proofs.
Type any topic, theorem, or concept to jump directly to the section.