Skip to main content
Discrete Math
CHAPTER 09 Beginner

Relations and Their Properties

Updated: May 17, 2026
15 min read

# CHAPTER 9

Relations and Their Properties

1. Introduction

If Set Theory is about grouping data, Relations are about connecting data. In a software application, data never exists in isolation. A "User" is connected to an "Account". A "Student" is connected to a "Course". A "City" is connected by a highway to another "City". In Discrete Mathematics, we formalize these connections using Binary Relations. By analyzing the exact geometric properties of these connections (Are they one-way? Two-way? Circular?), we lay the mathematical groundwork for Graph Theory, Database Foreign Keys, and Algorithm routing.

2. Learning Objectives

By the end of this chapter, you will be able to:
  • Generate a Cartesian Product ($A \times B$) to map all possible combinations.
  • Define a Binary Relation as a structural subset of a Cartesian Product.
  • Evaluate relations for Reflexive, Symmetric, and Transitive properties.
  • Map relations visually using Directed Graphs.

3. The Cartesian Product ($A \times B$)

Before we can establish a specific connection between two sets, we must map *every single possible connection* that could theoretically exist. This is the Cartesian Product. It creates a set of "Ordered Pairs" $(x, y)$.
  • Example:
Set $A$ (Users) = $\{Alice, Bob\}$ Set $B$ (Servers) = $\{Server1, Server2\}$ $A \times B$ = $\{(Alice, Server1), (Alice, Server2), (Bob, Server1), (Bob, Server2)\}$

If Set $A$ has 3 items and Set $B$ has 4 items, the Cartesian Product contains exactly $3 \times 4 = 12$ ordered pairs. (This is the mathematical representation of an $O(N^2)$ double-nested loop!).

4. What is a Binary Relation?

A Binary Relation (let's call it $R$) is simply any subset of a Cartesian Product. Instead of taking *every* possible connection, we filter them based on a specific logical rule.
  • Rule: $R =$ "User has access to Server".
  • Result: $R = \{(Alice, Server1), (Bob, Server2)\}$
*(Alice is only connected to Server 1. Bob is only connected to Server 2).* Because $R$ is a subset of $A \times B$ ($R \subseteq A \times B$), it is a valid mathematical Relation.

5. Properties of Relations (Evaluating the Grid)

When a Set relates to *itself* (e.g., $A \times A$, mapping numbers to numbers, or friends to friends), the Relation can possess specific structural properties.

#### 1. Reflexive Property Every element must relate to itself.

  • Rule: For every $x \in A$, the pair $(x, x)$ must exist in $R$.
  • *Example:* The "Is Equal To" relation ($=$). $5$ is equal to $5$. $10$ is equal to $10$. It is perfectly Reflexive.

#### 2. Symmetric Property If a connection goes one way, it must legally go the reverse way.

  • Rule: If $(x, y) \in R$, then $(y, x)$ MUST also exist in $R$.
  • *Example:* The "Is Friends With" relation on Facebook. If Alice is friends with Bob, Bob is mathematically mandated to be friends with Alice. It is a two-way bridge.

#### 3. Transitive Property The chain-reaction rule. If A connects to B, and B connects to C, A must implicitly connect to C.

  • Rule: If $(x, y) \in R$ and $(y, z) \in R$, then $(x, z)$ MUST exist in $R$.
  • *Example:* The "Is Greater Than" relation ($>$). If $10 > 5$, and $5 > 2$, then mathematically, $10 > 2$. The logic transfers flawlessly.

6. Equivalence Relations

If a specific Relation is miraculously Reflexive AND Symmetric AND Transitive simultaneously, it attains the highest rank in discrete mathematics: an Equivalence Relation. It perfectly chunks a massive Set into isolated, identical blocks (called "Equivalence Classes"). The mathematical operator "Equals" ($=$) is the ultimate Equivalence Relation.

7. Directed Graphs (Digraphs)

The easiest way to analyze a relation is to draw it.
  • Elements are drawn as Nodes (circles).
  • The ordered pairs $(x, y)$ are drawn as Arrows pointing from $x$ to $y$.
If you see an arrow pointing from Node A to Node B, and an arrow pointing back from Node B to Node A, you instantly have visual confirmation of the Symmetric property!

8. Common Mistakes

  • Confusing Symmetric with "All connected": A relation can be perfectly Symmetric even if it is completely empty! If $(x, y)$ doesn't exist, the rule doesn't care if $(y, x)$ exists. The rule only triggers *IF* an initial bridge is built.

9. Exercises

  1. 1. Set $A = \{1, 2\}$. Generate the complete Cartesian Product $A \times A$.
  1. 2. Analyze the Relation "Is Ancestor Of" among a set of humans. Is it Reflexive? Symmetric? Transitive?

10. MCQs with Answers

Q1. What explicit mathematical geometric matrix is generated when executing a "Cartesian Product" ($A \times B$) between two distinct Sets? a) An array of random numbers. b) A comprehensive set populated exclusively by Ordered Pairs $(x, y)$, rigorously mapping every single conceivable interactive combination between the isolated elements of Set A against Set B. c) The union of Set A and Set B. d) A single overlapping Venn diagram. Answer: b) A comprehensive set populated exclusively by Ordered Pairs $(x, y)$, rigorously mapping...

Question 2

In relation to the Cartesian Product, what constitutes the formal mathematical definition of a "Binary Relation" ($R$)?

Question 3

If an algorithmic matrix maps user data connections ($A \times A$), what strict architectural parameter defines a "Reflexive" relation?

Question 4

When analyzing the architecture of the Twitter "Follower" algorithm, if User A follows User B, User B is NOT mathematically mandated to follow User A. What property does this Relation violently fail?

Question 5

Which universally ubiquitous mathematical operator is the flawless, textbook embodiment of the "Transitive" property?

Question 6

If a specific discrete Relation miraculously satisfies the Reflexive, Symmetric, and Transitive properties simultaneously, what supreme hierarchical classification is it awarded?

Question 7

When utilizing a "Directed Graph" (Digraph) to visually render a mathematical Relation, what specific geometric anomaly physically confirms the presence of the Reflexive property?

Question 8

If Set A possesses exactly 5 elements, and Set B possesses exactly 10 elements, what is the mathematically finalized Cardinality of their baseline Cartesian Product ($|A \times B|$)?

Question 9

Is the biological relation "Is the Biological Sibling Of" a formally Symmetric mathematical relation?

Q10. True or False: A mathematical Relation can be structurally valid even if it evaluates to the Empty Set ($\emptyset$). a) True. Because the Empty Set is formally recognized as a universal subset to all overarching sets ($\emptyset \subseteq A \times B$), a relation mapping absolutely zero localized pairs remains entirely mathematically legal. b) False. A relation must contain at least one ordered pair. Answer: a) True. Because the Empty Set is formally recognized as a universal subset to all overarching...

11. Interview Preparation

Top Interview Questions:
  • *Algorithmic Routing:* "In a Relational Database, you have a massive table of 'Employees' and a table of 'Departments'. The bridging table holding the Foreign Keys is 10 Million rows long. What discrete mathematical structure is this bridging table replicating?" *(Answer: A Binary Relation! It is a filtered, localized subset of the absolute Cartesian Product connecting Set A (Employees) specifically to Set B (Departments) based on the logical constraint of employment!)*

12. Summary

Relations mathematically formalize how distinct data entities communicate. By bridging Set Theory with geometric pathways, we establish the absolute foundation for Relational Databases, AI mapping, and Network Routing. Mastering the Reflexive, Symmetric, and Transitive rules allows software engineers to predict cascading logical impacts across massive interconnected systems.

13. Next Chapter Recommendation

Relations are flexible; an employee can map to five different departments simultaneously. But what if we need extreme mathematical discipline? What if we mandate that an input MUST generate exactly one singular, predictable output? In Chapter 10: Functions and Types of Functions, we will introduce the most critical architectural structure in programming.

Finish this Chapter

Save your progress on your learning path and prepare for coding interview challenges.

Discussion

Join the discussion

Log in or create a free account to participate.

Sort: ·