Open In App

Binary Relation

Last Updated : 17 Jan, 2025
Summarize
Comments
Improve
Suggest changes
Share
Like Article
Like
Report

A binary relation is just a way to show a connection between two things, like saying "is a friend of, " "is greater than, " or "is married to." It's like drawing lines between pairs of items to show they are related in some way.

For example: imagine two groups:

  • Group A: {Alice, Bob, Charlie}
  • Group B: {Dog, Cat}

Now we can make pairs to show a relationship. For example:

  • Alice likes Dog
  • Bob likes Cat
  • Charlie likes Dog

We can write these pairs as: R = {(Alice, Dog), (Bob, Cat), (Charlie, Dog)}

Here, R is the binary relation because it shows the "likes" relationship between the two groups.

Mathematical Definition

Formally, a binary relation R between two sets A and B is a subset of the Cartesian product A × B. This means that R consists of ordered pairs (a, b), where a ∈ A and b ∈ B, and (a, b) ∈ R signifies that a is related to b.

R ⊆ X × Y is a binary relation from X to Y . We write “xRy” if (x, y) ∈ R and “not xRy” if (x, y) ∈/ R.

Note: When X = Y and R ⊆ X × X, we write R is a binary relation on X

Examples of Binary Relations

Some common examples of binary relations include:

Greater Than Relation

  • Sets: A = B = {1, 2, 3} (numbers)
  • Relation: "Is greater than"
    • R = {(2, 1), (3, 1), (3, 2)}
    • Explanation: This list pairs where the first number is greater than the second. For instance, (2, 1) means 2 is greater than 1.

Parent-Child Relation

  • Sets: A = {John, Mary, Sarah} (parents)
    • B = {Anna, Ben} (children)
  • Relation: "Is a parent of"
    • R = {(John, Anna), (Mary, Ben), (Sarah, Ben)}
    • Explanation: This shows the parent-child relationships. John is Anna’s parent, while Mary and Sarah are Ben’s parents.

Equality Relation

  • Sets: A = B = {1, 2, 3} (numbers)
  • Relation: "Is equal to"
    • R = {(1, 1), (2, 2), (3, 3)}
    • Explanation: A pair (a, b) ∈ R means a = b. For example, (2, 2) means 2 is equal to 2.

Some other examples includes:

  • Is less than
  • Is divisible by
  • Is not equal to
  • Is multiple of
  • Is subset of
  • Is coprime with

Properties of Binary Relation

Any binary operation is:

  • Reflexive if (a, a) ∈ R for all a ∈ A.
  • Symmetric if If (a, b) ∈ R, then (b, a) ∈ R.
  • Antisymmetric if If (a, b) ∈ R and (b, a) ∈ R, then a=b.
  • Transitive if If (a, b) ∈ R and (b, c) ∈ R, then (a, c) ∈ R.
  • Equivalance if If the relation is reflexive, symmetric and transitive together.

Read More,

What is an inverse of a binary relation?

The inverse of a binary relation R is defined as:

R−1 = {(b, a)∣(a, b) ∈ R}

What are applications of binary relations?

Binary relations are widely used in:

  • Databases: For defining relationships between tables (e.g., foreign keys).
  • Logic and AI: For reasoning about relationships.
  • Graph Theory: Representing directed graphs.
  • Set Theory: To study equivalence and ordering.

What is a partial order?

A partial order is a binary relation that is reflexive, antisymmetric, and transitive.

What is a total order?

A total order is a partial order where every pair of elements is comparable, i.e., ∀a, b ∈ A, either (a, b) ∈ R or (b, a) ∈ R.


Next Article

Similar Reads