MatheramaMatherama
← Relations and Functions
Relations and Functions·Section 3·68 min read

Relations

Intuition§

To understand the concept of a relation, let's consider both a real-world example and a mathematical one.

Example 1: Actors and Movies

Suppose we have two sets:

  • Set AA: Names of well-known actors,

    A={Daniel Radcliffe,Emma Watson,Brad Pitt,Meryl Streep,Leonardo DiCaprio}A = \{\text{Daniel Radcliffe}, \text{Emma Watson}, \text{Brad Pitt}, \text{Meryl Streep}, \text{Leonardo DiCaprio}\}
  • Set BB: Titles of popular movies,

    B={Harry Potter,Inception,Fight Club,The Devil Wears Prada,Little Women,Titanic}B = \{\text{Harry Potter}, \text{Inception}, \text{Fight Club}, \text{The Devil Wears Prada}, \text{Little Women}, \text{Titanic}\}

The Cartesian product A×BA \times B includes all possible pairs of actors with these movie titles, creating pairs like:

A×B={(Daniel Radcliffe, Harry Potter),(Brad Pitt, Inception),…,(Leonardo DiCaprio, Titanic)}A \times B = \{(\text{Daniel Radcliffe, Harry Potter}), (\text{Brad Pitt, Inception}), \ldots, (\text{Leonardo DiCaprio, Titanic})\}

This set contains every possible pairing, even if most don't make sense, like "Emma Watson in Fight Club" or "Brad Pitt in Harry Potter."

To define a relation, we select only pairs in which the actor actually starred in the movie. For instance:

{(Daniel Radcliffe, Harry Potter),(Emma Watson, Harry Potter),(Brad Pitt, Fight Club),(Meryl Streep, The Devil Wears Prada),(Emma Watson, Little Women),(Leonardo DiCaprio, Titanic),(Leonardo DiCaprio, Inception)}\{(\text{Daniel Radcliffe, Harry Potter}), (\text{Emma Watson, Harry Potter}), (\text{Brad Pitt, Fight Club}), (\text{Meryl Streep, The Devil Wears Prada}), (\text{Emma Watson, Little Women}), (\text{Leonardo DiCaprio, Titanic}), (\text{Leonardo DiCaprio, Inception})\}

This subset of pairs represents the true relationship between actors and movies they starred in.

Example 2: Prime Numbers and Divisibility

Now, let’s look at a mathematical example of a relation based on divisibility.

Suppose we have two sets:

  • Set AA: The first five prime numbers,

    A={2,3,5,7,11}A = \{2, 3, 5, 7, 11\}
  • Set BB: A set of composite numbers,

    B={6,10,15,21,22,33}B = \{6, 10, 15, 21, 22, 33\}

The Cartesian product A×BA \times B includes all possible pairs of primes and composite numbers:

A×B={(2,6),(2,10),(2,15),…,(11,33)}A \times B = \{(2, 6), (2, 10), (2, 15), \ldots, (11, 33)\}

However, we’re only interested in pairs where the prime number from AA divides the composite number from BB. This gives us the subset:

{(2,6),(2,10),(2,22),(3,6),(3,15),(3,21),(3,33),(7,21),(11,22),(11,33)}\{(2, 6), (2, 10), (2, 22), (3, 6), (3, 15), (3, 21), (3, 33), (7, 21), (11, 22), (11, 33)\}

This subset represents a relation where each prime number in AA is related to a composite number in BB if it divides that number exactly.

Definition of a Relation§

A relation from a set AA to a set BB is a subset of the Cartesian product A×BA \times B. It includes pairs (a,b)(a, b) where each a∈Aa \in A is associated with a particular b∈Bb \in 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.

Image, Preimage, Domain and Range§

Consider a relation RR from the set A={1,2,3,4,5,6,7}A = \{1, 2, 3, 4, 5, 6, 7\} to the set B={1,2,3,4,5,6,7,8,9}B = \{1, 2, 3, 4, 5, 6, 7, 8, 9\}, defined by xRyx R y if and only if x+y=6x + y = 6. The relation RR is explicitly given as:

R={(1,5),(2,4),(3,3),(4,2),(5,1)}.R = \{(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)\}.

mapping of the above relation

Definitions:

Consider a relation RR from the set A={1,2,3,4,5,6,7}A = \{1, 2, 3, 4, 5, 6, 7\} to the set B={1,2,3,4,5,6,7,8,9}B = \{1, 2, 3, 4, 5, 6, 7, 8, 9\}, defined by xRyx R y if and only if x+y=6x + y = 6. The relation RR is explicitly given as:

R={(1,5),(2,4),(3,3),(4,2),(5,1)}.R = \{(1, 5), (2, 4), (3, 3), (4, 2), (5, 1)\}.
  1. Image:

    If xx is related to yy under the relation RR, then yy is called the image of xx. In this example:

    • The image of 11 is 55, as (1,5)∈R(1, 5) \in R.
    • The image of 22 is 44, as (2,4)∈R(2, 4) \in R.
    • Similarly, the image of 33 is 33, the image of 44 is 22, and the image of 55 is 11.
  2. Preimage:

    If yy is related to xx under the relation RR, then xx is called the preimage of yy. In this example:

    • The preimage of 55 is 11, as (1,5)∈R(1, 5) \in R.
    • The preimage of 44 is 22, the preimage of 33 is 33, the preimage of 22 is 44, and the preimage of 11 is 55.
  3. Domain:

    The domain of a relation RR is the set of all elements in AA that have at least one image in BB.
    From the given relation, the domain is:

    Domain of R={1,2,3,4,5}.\text{Domain of } R = \{1, 2, 3, 4, 5\}.
  4. Codomain:

    The codomain of a relation RR is the entire set BB, irrespective of whether all its elements are images of elements in AA.
    For this example, the codomain is:

    Codomain of R={1,2,3,4,5,6,7,8,9}.\text{Codomain of } R = \{1, 2, 3, 4, 5, 6, 7, 8, 9\}.
  5. Range:

    The range of a relation RR is the set of all elements in BB that are images of elements in AA. It is the set of all yy-values in the ordered pairs of RR:

    Range of R={5,4,3,2,1}.\text{Range of } R = \{5, 4, 3, 2, 1\}.

Ways of Representing a Relation§

  1. Set-Builder Form:

    A relation can be defined in set-builder form like in the following example. Consider a relation RR from the set AA to the set BB (take AA and BB as before). An element in set AA, say xx, is related to an element in set BB, say yy, under relation RR if and only if y=±x2y = \pm x^2. We can write this concisely as:
    RR is a relation from set AA to set BB such that for all x∈Ax \in A and y∈By \in B, xRyx R y (x,y)∈R(x, y) \in R if and only if y=±x2y = \pm x^2.

    We can also express this in set-builder form as:

    R={(x,y)∈A×B:y=±x2}.R = \{(x, y) \in A \times B : y = \pm x^2\}.
  2. 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 RR in roster form becomes:

    R={(1,1),(1,−1),(2,4),(3,9)}.R = \{(1, 1), (1, -1), (2, 4), (3, 9)\}.
  3. Mappings:

    Relations defined on finite sets can be visually represented using mappings. A mapping diagram displays the elements of set AA on the left and those of set BB on the right. Arrows are drawn from each element of AA to its related element(s) in BB as per the relation.
    For instance, consider the above example. The mapping diagram is illustrated as follows:

    mapping diagram

    These mappings clearly represent the connections between elements of sets AA and BB.

    Mapping diagrams are particularly useful for understanding relations at a glance, making them a preferred choice in visualizing finite relations.

  4. 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 (AA).

    • Columns: Represent the elements of the second set (BB).

    • Entries: At the intersection of a row (corresponding to an element x∈Ax \in A) and a column (corresponding to an element y∈By \in B), the value is:

      • 11, if (x,y)∈R(x, y) \in R (i.e., xx is related to yy), or
      • 00, if (x,y)∉R(x, y) \notin R.

    Explanation:

    • For x=1x = 1, y=0y = 0 satisfies y=x−1y = x - 1, so a 11 is placed in the row for 11 and column for 00.
    • For x=2x = 2, y=1y = 1 satisfies the condition, so a 11 is placed in the corresponding row and column.
    • This process is repeated for all pairs in RR.

    General Rule:

    If MM is the relation matrix of RR, then for any element xi∈Ax_i \in A and yj∈By_j \in B:

    Mij={1,if (xi,yj)∈R0,if (xi,yj)∉R.M_{ij} = \begin{cases} 1, & \text{if } (x_i, y_j) \in R \\ 0, & \text{if } (x_i, y_j) \notin R \end{cases}.

    This method provides a structured way to capture the relationship between elements of the two sets.

  5. 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}A = \{1, 2, 3, 4, 5\} and B={3,4,5}B = \{3, 4, 5\}. The Cartesian product A×BA \times B represents all ordered pairs (x,y)(x, y), forming a lattice of points in the Cartesian plane.
    Now, define a relation TT as xTy  ⟺  x<yx T y \iff x < y.
    The relation TT is a subset of A×BA \times B, consisting of all points where the xx-coordinate is less than the yy-coordinate.

    For A={1,2,3,4,5}A = \{1, 2, 3, 4, 5\} and B={3,4,5}B = \{3, 4, 5\}:

    T={(1,3),(1,4),(1,5),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)}.T = \{(1, 3), (1, 4), (1, 5), (2, 3), (2, 4), (2, 5), (3, 4), (3, 5), (4, 5)\}.

    In the Cartesian plane, these points form part of the lattice and can be plotted as individual dots where x<yx < y.

    Relation T on carteian coordinate system


    Example 2: Intervals

    Let A=[2,5]A = [2, 5] and B=[4,6]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×BA \times B is a rectangle in the Cartesian plane, with AA as the range for the xx-coordinate and BB as the range for the yy-coordinate.

    Now, define a relation SS as xSy  ⟺  y=x+2x S y \iff y = x + 2.
    The relation SS consists of all points (x,y)(x, y) in A×BA \times B that satisfy y=x+2y = x + 2. This is a straight line passing through the rectangle, as it satisfies the equation of a line.

    relation on cartesian coordinate system

    For example:

    • If x=3x = 3, then y=3+2=5y = 3 + 2 = 5, so (3,5)∈S(3, 5) \in S.
    • Similarly, for other values of xx in AA, their corresponding yy values form a line.

    The graphical representation of SS is a diagonal line cutting through the rectangular region A×BA \times B, as shown in the figure.

    1. For Finite Sets: The relation is represented as a subset of lattice points, making it easy to see which elements of AA are related to elements of BB.
    2. For Intervals: The relation is a continuous line, curve, or other geometrical shape within the region defined by A×BA \times B, depending on the rule defining the relation.

Number of Relations (Finite Sets)§

If set AA has mm elements and set BB has nn elements, then the Cartesian product A×BA \times B contains m⋅nm \cdot n ordered pairs. A relation RR from AA to BB is a subset of A×BA \times B. Therefore, the total number of relations that can be defined from AA to BB is equal to the number of subsets of A×BA \times B, which is 2mn2^{mn}.

Example:

Let A={1,2}A = \{1, 2\} and B={a,b,c}B = \{a, b, c\}.

  • The set AA has m=2m = 2 elements, and the set BB has n=3n = 3 elements.

  • The Cartesian product A×BA \times B consists of m⋅n=2⋅3=6m \cdot n = 2 \cdot 3 = 6 ordered pairs:

    A×B={(1,a),(1,b),(1,c),(2,a),(2,b),(2,c)}.A \times B = \{(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)\}.
  • A relation RR from AA to BB is any subset of A×BA \times B.

  • The total number of subsets of A×BA \times B is 2mn=26=642^{mn} = 2^6 = 64.

Thus, there are 6464 different relations that can be defined from AA to BB.

Relation on a Set§

A relation on a set refers to a situation where the relation is defined between elements of the same set. Formally, if a relation RR is defined from a set AA to itself, then RR is a subset of the Cartesian product A×AA \times A. In other words, every ordered pair in RR consists of elements that both belong to AA. Such a relation is said to be defined on the set AA.

Example:

Let A={1,2,3}A = \{1, 2, 3\}, and consider a relation RR given by:

R={(1,2),(2,3),(1,1)}.R = \{(1, 2), (2, 3), (1, 1)\}.

mapping

Here:

  • A×AA \times A is the set of all possible ordered pairs of AA:

    A×A={(1,1),(1,2),(1,3),(2,1),(2,2),(2,3),(3,1),(3,2),(3,3)}.A \times A = \{(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3), (3, 1), (3, 2), (3, 3)\}.
  • The relation RR is a subset of A×AA \times A because all the ordered pairs in RR, namely (1,2)(1, 2), (2,3)(2, 3), and (1,1)(1, 1), belong to A×AA \times A.

Types of Relations§

Relations between two sets AA and BB can be categorized based on how elements of AA are related to elements of BB. Below are the main types:


  1. One-to-One Relation (Injective Relation)

    A relation RR is called one-to-one if each element of AA is related to a unique element in BB, and no two elements of AA are related to the same element in BB.

    Example:
    Let A={1,2,3}A = \{1, 2, 3\} and B={a,b,c}B = \{a, b, c\}, and the relation R={(1,a),(2,b),(3,c)}R = \{(1, a), (2, b), (3, c)\}.
    Here, each element of AA is related to exactly one unique element of BB, and no two elements in AA share the same image.

    alt text


  2. Many-to-One Relation

    A relation RR is many-to-one if multiple elements of AA are related to the same element in BB.

    Example:

    Let A={1,2,3}A = \{1, 2, 3\} and B={a,b}B = \{a, b\}, and the relation R={(1,a),(2,a),(3,b)}R = \{(1, a), (2, a), (3, b)\}.
    Here, 11 and 22 are both related to aa, which makes the relation many-to-one.

    alt text


  3. One-to-Many Relation

    A relation RR is one-to-many if a single element of AA is related to multiple elements in BB. Such a relation does not represent a function, as a function requires every element in AA to be related to at most one element in BB.

    Example:

    Let A={1,2}A = \{1, 2\} and B={a,b,c}B = \{a, b, c\}, and the relation R={(1,a),(1,b),(2,c)}R = \{(1, a), (1, b), (2, c)\}.
    Here, 11 is related to both aa and bb, making the relation one-to-many.

    alt text


  4. Many-to-Many Relation

    A relation RR is many-to-many if multiple elements in AA are related to multiple elements in BB.

    Example:

    Let A={1,2}A = \{1, 2\} and B={a,b}B = \{a, b\}, and the relation R={(1,a),(1,b),(2,a),(2,b)}R = \{(1, a), (1, b), (2, a), (2, b)\}.
    Here, both 11 and 22 are related to both aa and bb, making it a many-to-many relation.

    alt text


Summary Table:

Type Description Example
One-to-One Each a∈Aa \in A relates to a unique b∈Bb \in B. R={(1,a),(2,b),(3,c)}R = \{(1, a), (2, b), (3, c)\}
Many-to-One Multiple a∈Aa \in A relate to the same b∈Bb \in B. R={(1,a),(2,a),(3,b)}R = \{(1, a), (2, a), (3, b)\}
One-to-Many A single a∈Aa \in A relates to multiple b∈Bb \in B. R={(1,a),(1,b),(2,c)}R = \{(1, a), (1, b), (2, c)\}
Many-to-Many Multiple a∈Aa \in A relate to multiple b∈Bb \in B. R={(1,a),(1,b),(2,a),(2,b)}R = \{(1, a), (1, b), (2, a), (2, b)\}

Empty and Universal Relations§

Relations can also be classified as empty or universal based on whether they include no pairs or all possible pairs from the Cartesian product A×BA \times B.


Empty Relation

A relation RR from set AA to set BB is an empty relation if no ordered pair from A×BA \times B satisfies the given condition. In this case, R=∅R = \emptyset.

Example:

Let A={1,2,3}A = \{1, 2, 3\} and B={2,3,4,5}B = \{2, 3, 4, 5\}. Define a relation RR as:

xRy  ⟺  x+y=1.x R y \iff x + y = 1.

For x∈Ax \in A and y∈By \in B, observe that:

  • 1+2=31 + 2 = 3, not 11,
  • 1+3=41 + 3 = 4, not 11, and similarly for all other pairs.

No ordered pair satisfies x+y=1x + y = 1. Hence:

R=∅.R = \emptyset.

In this case, RR is an empty relation as it contains no elements.


Universal Relation

A relation RR from set AA to set BB is a universal relation if every ordered pair in A×BA \times B satisfies the given condition. In this case, R=A×BR = A \times B.

Example:

Let A={1,2,3}A = \{1, 2, 3\} and B={2,3,4,5}B = \{2, 3, 4, 5\}. Define a relation RR as:

xRy  ⟺  x+y>1.x R y \iff x + y > 1.

For all x∈Ax \in A and y∈By \in B:

  • 1+2=3>11 + 2 = 3 > 1,
  • 1+3=4>11 + 3 = 4 > 1, and so on for all pairs in A×BA \times B.

Every pair satisfies x+y>1x + y > 1. Hence:

R=A×B={(1,2),(1,3),(1,4),(1,5),(2,2),(2,3),…,(3,5)}.R = A \times B = \{(1, 2), (1, 3), (1, 4), (1, 5), (2, 2), (2, 3), \dots, (3, 5)\}.

In this case, RR is a universal relation as it includes all possible pairs from A×BA \times B.

Types of Relations on a set§

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.

Reflexive Relation§

Let AA be a set, and RR be a relation on AA. The relation RR is called reflexive if every element of AA is related to itself.
This means that for all a∈Aa \in A, aRaa R a (i.e., (a,a)∈R(a, a) \in 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 RR on a set AA 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∈Aa \in A is not related to itself (i.e., (a,a)∉R(a, a) \notin R).
This single counterexample is enough to conclude that the relation is not reflexive.

Symmetric Relation§

Consider a relation RR defined on a set AA. The relation RR is said to be symmetric if:

If xRy, then yRx.\text{If } x R y, \text{ then } y R x.

In other words, if (x,y)∈R(x, y) \in R, then (y,x)∈R(y, x) \in R as well. This property ensures that the relation is "bidirectional" — whenever xx is related to yy, yy must also be related to xx.

To understand the exact meaning of the above definition, consider the following illustration:

Let RR be a relation defined on A={1,2,3,4}A = \{1, 2, 3, 4\} as:

R={(1,1),(1,2),(2,1),(3,4),(4,3)}.R = \{(1, 1), (1, 2), (2, 1), (3, 4), (4, 3)\}.

This relation is symmetric, as for every pair (x,y)∈R(x, y) \in R, the pair (y,x)(y, x) is also in RR. Let’s verify this:

  • The pair (1,1)(1, 1) is symmetric because reversing the order gives the same pair (1,1)(1, 1), with no change.
  • The pair (1,2)(1, 2) has its reverse pair (2,1)(2, 1) also present in RR, ensuring symmetry.
  • Similarly, (3,4)(3, 4) and (4,3)(4, 3) form a symmetric pair.

Hence, this RR satisfies the condition of symmetry.

Now, suppose we remove (4,3)(4, 3) from RR, leaving:

R={(1,1),(1,2),(2,1),(3,4)}.R = \{(1, 1), (1, 2), (2, 1), (3, 4)\}.

In this case, the relation is no longer symmetric because (3,4)∈R(3, 4) \in R, but its reverse pair (4,3)(4, 3) is not present. This absence violates the symmetry condition.

Another example of a symmetric relation is S={(1,1),(2,2)}S = \{(1, 1), (2, 2)\} on the same set AA. Here, every pair is symmetric because reversing the pairs (1,1)(1, 1) and (2,2)(2, 2) has no effect. Thus, SS satisfies symmetry.

Interestingly, the empty relation, R1=∅R_1 = \emptyset, is also symmetric. Since there are no pairs in R1R_1, 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)}R_2 = \{(1, 2)\}. This relation is not symmetric because the reverse pair (2,1)(2, 1) is not present in R2R_2. 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 R2R_2. Meanwhile, both the empty relation and relations where all pairs satisfy the reverse condition, like RR and SS, maintain symmetry.

Transitive Relation§

Consider a relation RR defined on a set AA. The relation RR is said to be transitive if:

If xRy and yRz, then xRz.\text{If } x R y \text{ and } y R z, \text{ then } x R z.

In other words, if under a given relation RR, xx is related to yy, and yy is related to zz, then xx must also be related to zz. 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}A = \{1, 2, 3, 4, 5\}, and the following relations defined on AA:

1. Relation R={(1,1),(1,2),(2,3),(1,3)}R = \{(1, 1), (1, 2), (2, 3), (1, 3)\}

We check whether RR is transitive by analyzing the pairs:

  • (1,2)∈R(1, 2) \in R and (2,3)∈R(2, 3) \in R.
  • By the condition for transitivity, if 1R21 R 2 and 2R32 R 3, then 1R31 R 3 must also hold.
  • Since (1,3)∈R(1, 3) \in R, the condition is satisfied.

Thus, RR is a transitive relation because it contains all required pairs to maintain transitivity.


2. Relation R1={(1,2),(2,3),(4,5)}R_1 = \{(1, 2), (2, 3), (4, 5)\}

Here, we again check for transitivity:

  • (1,2)∈R1(1, 2) \in R_1 and (2,3)∈R1(2, 3) \in R_1.
  • For transitivity, 1R21 R 2 and 2R32 R 3 should imply 1R31 R 3, but (1,3)∉R1(1, 3) \notin R_1.
  • This absence violates the transitivity condition.

Thus, R1R_1 is not transitive, as it lacks the pair (1,3)(1, 3).


3. Relation R2=∅R_2 = \emptyset

The relation R2R_2 contains no pairs. For a relation to be non-transitive, there must exist pairs (x,y)(x, y) and (y,z)(y, z) such that (x,z)(x, z) is not in the relation. However, since R2R_2 contains no pairs at all, there is no sequence of pairs that could violate transitivity.

By the principle of vacuous truth, R2R_2 is transitive because it does not fail the transitivity condition.


4. Relation R4={(1,2)}R_4 = \{(1, 2)\}

This relation contains only a single pair. For transitivity, there must exist pairs (x,y)(x, y) and (y,z)(y, z) such that (x,z)(x, z) needs to be checked. Since R4R_4 has only one pair, no such sequence exists, and hence transitivity is not violated.

Thus, R4R_4 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 xRyx R y and yRzy R z in the relation, where xRzx R z 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 xRyx R y and yRzy R z in the relation to make sure that xRzx R z 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 xRyx R y and yRzy R z hold, and then use the definition of the relation to logically deduce whether xRzx R z also holds. If this works for any arbitrary xx, yy, and zz, the relation is transitive.

For example, if a relation RR is defined as xRy  ⟺  f(x,y) holdsx R y \iff f(x, y) \text{ holds}, you use the properties of f(x,y)f(x, y) to show that xRyx R y and yRzy R z imply xRzx R z.

Equivalence Relation§

An equivalence relation on a set AA is a relation R⊆A×AR \subseteq A \times A that satisfies the following three properties for all a,b,c∈Aa, b, c \in A:

  1. Reflexive: Every element is related to itself. That is, aRaa R a for all a∈Aa \in A.
  2. Symmetric: If aRba R b, then bRab R a. In other words, if one element is related to another, the reverse must also hold.
  3. Transitive: If aRba R b and bRcb R c, then aRca R c. 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 RR that satisfies all three of these properties is called an equivalence relation. Equivalence relations partition the set AA into disjoint subsets called equivalence classes, where all elements in the same class are related to each other under RR.

Inverse Relation§

Let RR be a relation defined from a set AA to a set BB. The inverse relation of RR, denoted as R−1R^{-1}, is obtained by swapping the positions of the elements in each ordered pair of RR. Formally, it is defined as:

R−1={(b,a):(a,b)∈R}.R^{-1} = \{(b, a) : (a, b) \in R\}.

This means that if (a,b)(a, b) is in RR, then (b,a)(b, a) will be in R−1R^{-1}. The inverse relation is useful when reversing the direction of the relationship between elements in AA and BB.


Examples:

  1. Finite Relation:

    Let R={(1,2),(1,3),(2,4),(3,2)}R = \{(1, 2), (1, 3), (2, 4), (3, 2)\}.
    To find R−1R^{-1}, swap each pair:

    R−1={(2,1),(3,1),(4,2),(2,3)}.R^{-1} = \{(2, 1), (3, 1), (4, 2), (2, 3)\}.

    This means that if 11 is related to 22 in RR, then 22 is related to 11 in R−1R^{-1}.

  2. Relation on R2\mathbb{R}^2:

    Consider S={(x,y)∈R2:3x+4y=1}S = \{(x, y) \in \mathbb{R}^2 : 3x + 4y = 1\}.
    For R−1R^{-1}, interchange xx and yy in the equation:

    S−1={(x,y)∈R2:3y+4x=1}.S^{-1} = \{(x, y) \in \mathbb{R}^2 : 3y + 4x = 1\}.

    This means the inverse relation reverses the roles of xx and yy in the original equation.

  3. Graphical Relation:

    Consider T={(x,y)∈R2:x=sin⁡y}T = \{(x, y) \in \mathbb{R}^2 : x = \sin y\}.

    To find T−1T^{-1}, swap xx and yy in the relation:

    T−1={(x,y)∈R2:y=sin⁡x}.T^{-1} = \{(x, y) \in \mathbb{R}^2 : y = \sin x\}.

    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 RR represents "is the parent of," then R−1R^{-1} would represent "is the child of."
  • If RR is a line equation, its inverse flips the roles of xx and yy, altering its interpretation geometrically.

Composition of Relations§

A relation RR between two sets AA and BB is a subset of the Cartesian product A×BA \times B, defined as R⊆A×BR \subseteq A \times B. Similarly, a relation SS between sets BB and CC is a subset of B×CB \times C, defined as S⊆B×CS \subseteq B \times C.

The composition of relations, denoted as S∘RS \circ R, is a relation between AA and CC such that:

S∘R={(a,c)∈A×C:∃b∈B such that (a,b)∈R and (b,c)∈S}.S \circ R = \{(a, c) \in A \times C : \exists b \in B \text{ such that } (a, b) \in R \text{ and } (b, c) \in S\}.

In simpler terms, the composition S∘RS \circ R relates an element a∈Aa \in A to an element c∈Cc \in C if there exists an intermediate element b∈Bb \in B such that aa is related to bb through RR, and bb is related to cc through SS.

Take a look at the following example to understand the above definition:

Consider the sets:

  • A={Richard,Robert,Alexander,Amelia}A = \{\text{Richard}, \text{Robert}, \text{Alexander}, \text{Amelia}\}: representing individuals in the first generation.
  • B={John,Max,Jimmy,Sophia,Justin}B = \{\text{John}, \text{Max}, \text{Jimmy}, \text{Sophia}, \text{Justin}\}: representing individuals in the second generation.
  • C={June,Kyle,Eden,Billie,Tim}C = \{\text{June}, \text{Kyle}, \text{Eden}, \text{Billie}, \text{Tim}\}: representing individuals in the third generation.

Define two relations:

  1. RR: "is the father of," which relates elements in AA to BB:

    R={(Richard,John),(Richard,Jimmy).(Robert,Max),(Alexander,Sophia),(Amelia,Justin)}.R = \{(\text{Richard}, \text{John}), (\text{Richard}, \text{Jimmy}). (\text{Robert}, \text{Max}), (\text{Alexander}, \text{Sophia}), (\text{Amelia}, \text{Justin})\}.
  2. SS: "is the father of," which relates elements in BB to CC:

    S={(John,Kyle),(John,Eden),(Max,Billie),(Jimmy,June),(Jimmy,Tim)}.S = \{(\text{John}, \text{Kyle}), (\text{John}, \text{Eden}), (\text{Max}, \text{Billie}), (\text{Jimmy}, \text{June}), (\text{Jimmy}, \text{Tim})\}.

alt text

Now, the composite relation S∘RS \circ R is defined as "is the grandfather of," directly relating elements of AA to CC.

We compute S∘RS \circ R by looking for pairs (a,c)(a, c) where a∈Aa \in A, c∈Cc \in C, and there exists b∈Bb \in B such that (a,b)∈R(a, b) \in R and (b,c)∈S(b, c) \in S.

  1. From (Richard,John)∈R(\text{Richard}, \text{John}) \in R and (John,Kyle)∈S(\text{John}, \text{Kyle}) \in S, we get: (Richard,Kyle)∈S∘R(\text{Richard}, \text{Kyle}) \in S \circ R.

  2. From (Richard,John)∈R(\text{Richard}, \text{John}) \in R and (John,Eden)∈S(\text{John}, \text{Eden}) \in S, we get: (Richard,Eden)∈S∘R(\text{Richard}, \text{Eden}) \in S \circ R.

  3. From (Richard,Jimmy)∈R(\text{Richard}, \text{Jimmy}) \in R and (Jimmy,June)∈S(\text{Jimmy}, \text{June}) \in S, we get: (Richard,June)∈S∘R(\text{Richard}, \text{June}) \in S \circ R.

  4. From (Richard,Jimmy)∈R(\text{Richard}, \text{Jimmy}) \in R and (Jimmy,Tim)∈S(\text{Jimmy}, \text{Tim}) \in S, we get: (Richard,Tim)∈S∘R(\text{Richard}, \text{Tim}) \in S \circ R.

  5. From (Robert,Max)∈R(\text{Robert}, \text{Max}) \in R and (Max,Billie)∈S(\text{Max}, \text{Billie}) \in S, we get:(Robert,Billie)∈S∘R(\text{Robert}, \text{Billie}) \in S \circ R.
    Similarly, (Robert,Billie)∈S∘R(\text{Robert}, \text{Billie}) \in S \circ R because (Max,Billie)∈S(\text{Max}, \text{Billie}) \in S.

Thus, the composite relation is:

S∘R={(Richard,Kyle),(Richard,Eden),(Richard,June),(Richard,Tim),(Robert,Billie)}S \circ R = \{(\text{Richard}, \text{Kyle}), (\text{Richard}, \text{Eden}), (\text{Richard}, \text{June}), (\text{Richard}, \text{Tim}),(\text{Robert}, \text{Billie})\}

The composition of relations S∘RS \circ R combines two consecutive relationships into one, bypassing the intermediate set. In this example, S∘RS \circ R defines "is the grandfather of" by combining two "is the father of" relations.

Equivalence Classes§

Consider a set CC, which consists of all circles in a plane. Define a relation RR on CC such that c1Rc2c_1 R c_2 if and only if the circle c1c_1 is concentric to the circle c2c_2. In this context, c1c_1 and c2c_2 are concentric if they share the same center.

The relation RR is an equivalence relation because it satisfies the properties of reflexivity, symmetry, and transitivity:

  • Reflexivity: For any circle c∈Cc \in C, cRcc R c, because every circle is concentric to itself.
  • Symmetry: If c1Rc2c_1 R c_2, then c2Rc1c_2 R c_1, because if c1c_1 is concentric to c2c_2, then c2c_2 must also be concentric to c1c_1.
  • Transitivity: If c1Rc2c_1 R c_2 and c2Rc3c_2 R c_3, then c1Rc3c_1 R c_3, because if c1c_1 and c2c_2 share the same center, and c2c_2 and c3c_3 also share the same center, then c1c_1 and c3c_3 must have the same center.

Thus, RR is an equivalence relation.

An interesting property of equivalence relations is that they partition the set CC 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∈Cc_1 \in C. All circles that are concentric to c1c_1 form one equivalence class. Let us call this class "Class 1." Similarly, if there is another circle c2∉Class 1c_2 \notin \text{Class 1}, all circles concentric to c2c_2 form a different equivalence class, say "Class 2." This process continues, and each equivalence class represents a distinct group of concentric circles.

Circles in Equivalence Classes

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 c1c_1.
  • Class 2 contains all circles concentric to a circle c2c_2, which is not concentric with c1c_1.

Within each equivalence class, any circle can be chosen as the representative of the class. For instance, c1c_1 may represent Class 1, and c2c_2 may represent Class 2. We denote the equivalence class of c1c_1 as [c1][c_1], which is defined as:

[c1]={c∈C:cRc1}.[c_1] = \{c \in C : c R c_1\}.

This definition implies that [c1][c_1] contains all circles in CC that are concentric to c1c_1. Similarly, the equivalence class of c2c_2 is [c2][c_2], containing all circles concentric to c2c_2.

In conclusion, the set CC is partitioned into equivalence classes by the relation RR, 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][a] is the equivalence class containing aa, then aa is a natural choice as a representative. However, any other element b∈[a]b \in [a] can also serve as a representative, because if b∈[a]b \in [a], it implies bRab R a, meaning bb is equivalent to aa. Thus, the equivalence class [a][a] can be referred to as [b][b], as long as bb belongs to [a][a].

If two elements a,b∈Aa, b \in A are related, i.e., aRba R b, then their equivalence classes are the same, [a]=[b][a] = [b]. This follows from the definition of equivalence classes, as aRba R b ensures that every element related to aa is also related to bb, and vice versa. In contrast, if aR̸ba \not R b, their equivalence classes [a][a] and [b][b] are distinct and disjoint. That is, no element can belong to both [a][a] and [b][b], and the intersection of these classes is empty, [a]∩[b]=∅[a] \cap [b] = \emptyset.

This disjointness arises naturally from the properties of an equivalence relation. If any element xx belonged to both [a][a] and [b][b], it would mean xRax R a and xRbx R b, which implies aRba R b. This contradicts the assumption that aR̸ba \not R b. Therefore, the equivalence classes partition the set AA into non-overlapping subsets, ensuring that each element of AA belongs to exactly one equivalence class.

In summary, an equivalence class is defined as the set of all elements related to a specific element aa. These classes partition the set AA 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 AA based on the equivalence relation RR.

Partitioning a Set§

A partition of a set SS is a collection of non-empty subsets S1,S2,…,SnS_1, S_2, \dots, S_n such that:

  1. The subsets are pairwise disjoint, meaning Si∩Sj=∅S_i \cap S_j = \emptyset for all i≠ji \neq j, and
  2. The union of all subsets equals the entire set, S1∪S2∪⋯∪Sn=SS_1 \cup S_2 \cup \dots \cup S_n = S.

partition of set S

In other words, a partition divides SS into distinct pieces where every element of SS belongs to exactly one subset SiS_i.


Theorem: Equivalence Relation Induces a Partition

If we have an equivalence relation RR defined on a set SS, then the set of all equivalence classes formed by RR is a partition of SS.

Proof:

Each element a∈Sa \in S belongs to an equivalence class [a][a]. By the properties of equivalence relations:

  1. Pairwise Disjointness: If [a]≠[b][a] \neq [b], then [a]∩[b]=∅[a] \cap [b] = \emptyset. This is because if there is any overlap between two classes, their representatives aa and bb would be related, implying [a]=[b][a] = [b].
  2. Exhaustiveness: The union of all equivalence classes covers the entire set SS, as every element a∈Sa \in S is in its own equivalence class [a][a].

Thus, the set of equivalence classes {[a]:a∈S}\{[a] : a \in S\} forms a partition of SS.


Converse: Does Every Partition Create an Equivalence Relation?

Yes, every partition of a set SS creates an equivalence relation.

Proof:

Suppose the set SS is partitioned into subsets S1,S2,…,SnS_1, S_2, \dots, S_n, where:

  1. Si∩Sj=∅S_i \cap S_j = \emptyset for i≠ji \neq j, and
  2. S1∪S2∪⋯∪Sn=SS_1 \cup S_2 \cup \dots \cup S_n = S.

Define a relation RR on SS as:

xRy  ⟺  x and y belong to the same subset Si for some i.x R y \iff x \text{ and } y \text{ belong to the same subset } S_i \text{ for some } i.
  1. Reflexivity: For any x∈Sx \in S, xx belongs to some SiS_i. Since xx is in the same subset as itself, xRxx R x.
  2. Symmetry: If xRyx R y, then xx and yy are in the same subset SiS_i. This means yRxy R x.
  3. Transitivity: If xRyx R y and yRzy R z, then xx and yy are in the same subset SiS_i, and yy and zz are also in SiS_i. Thus, xx and zz are in SiS_i, and xRzx R z.

Therefore, RR is an equivalence relation. This shows that any partition of SS naturally defines an equivalence relation on SS.

Counting Total Number of Equivalence Relations on a Set§

The total number of equivalence relations on a set AA is equal to the number of partitions that can be formed on AA. 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 AA is a collection of non-empty, disjoint subsets such that every element of AA belongs to exactly one subset. For a set of size nn, the number of partitions is given by the Bell number, BnB_n.


Example: Partitions of A={a,b,c,d}A = \{a, b, c, d\}

Here are the 15 possible partitions of A={a,b,c,d}A = \{a, b, c, d\}:

  1. {a},{b,c,d}\{a\}, \{b, c, d\}
  2. {b},{a,c,d}\{b\}, \{a, c, d\}
  3. {c},{a,b,d}\{c\}, \{a, b, d\}
  4. {d},{a,b,c}\{d\}, \{a, b, c\}
  5. {a,b},{c,d}\{a, b\}, \{c, d\}
  6. {a,c},{b,d}\{a, c\}, \{b, d\}
  7. {a,d},{b,c}\{a, d\}, \{b, c\}
  8. {a},{b},{c,d}\{a\}, \{b\}, \{c, d\}
  9. {a},{c},{b,d}\{a\}, \{c\}, \{b, d\}
  10. {a},{d},{b,c}\{a\}, \{d\}, \{b, c\}
  11. {b},{c},{a,d}\{b\}, \{c\}, \{a, d\}
  12. {b},{d},{a,c}\{b\}, \{d\}, \{a, c\}
  13. {c},{d},{a,b}\{c\}, \{d\}, \{a, b\}
  14. {a},{b},{c},{d}\{a\}, \{b\}, \{c\}, \{d\}
  15. {a,b,c,d}\{a, b, c, d\}

Conclusion

For the set A={a,b,c,d}A = \{a, b, c, d\}, there are 15 distinct partitions. Each partition corresponds to a unique equivalence relation on AA. 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.