Welcome to the next step in our exploration of mathematical structures. In our previous lessons, we've built a solid foundation. We started with the logic of propositions, learned how to handle collections of objects using set theory, and saw how the Cartesian product allows us to form the universe of all possible pairs between elements of sets.
Today, we'll build directly on that foundation to study relations. A relation is just a way of formalizing a relationship between objects, and mathematically, it's defined as a specific subset of a Cartesian product. But simply defining a relation isn't enough. The real power comes from classifying them based on their internal structure. Your goal for this lesson is to learn how to determine if a relation has four key properties: being reflexive, symmetric, antisymmetric, or transitive. Understanding these properties is crucial, as they form the basis for important concepts in computer science like ordering, sorting algorithms, and data partitioning.
What is a Relation?
Let's begin by firming up our core concept. As we've touched upon, a relation on a set is simply a subset of the Cartesian product .
If an ordered pair is in the set , we say that " is related to " and can write this as .
For example, let . The relation "less than" on this set would be the set of pairs . Since , we can say .
The Four Fundamental Properties
Now, let's dive into the four properties that are the focus of today's lesson. For a relation to be useful, we need to know what rules it follows. These properties are the rules.
The following reading from "A Spiral Workbook for Discrete Mathematics" provides the formal definitions for each property. As you read, pay close attention to the precise logical structure. For a property to hold, the condition must be true for all elements specified.
This reading provides the concise, formal definitions that we will use throughout the lesson. Note how each property is defined using both set membership notation (e.g., (a,a) \in R) and the relational notation (e.g., a \, R \, a).
Please read the definitions provided in the text. Focus on the section that starts with "A relation R on A is said to be" and review both the set notation and relational notation versions. You can stop reading at the "Remark". The key phrases are the definitions.
Let's break these down with some intuition and examples.
1. Reflexive: Is every element related to itself?
A relation on a set is reflexive if for every element .
- Intuition: Every element has a "self-loop".
- Canonical Example: The relation on the set of integers. For any integer , it is true that .
- Non-Example: The relation on integers. It is not true that .
2. Symmetric: Is it a two-way street?
A relation is symmetric if whenever , it must also be that .
- Intuition: If there's an arrow from to , there must be one from to .
- Canonical Example: The relation "is a sibling of" on the set of people. If Alice is a sibling of Bob, then Bob is a sibling of Alice.
- Non-Example: The relation on integers. We know , but it is not true that .
3. Antisymmetric: Is it at most a one-way street?
A relation is antisymmetric if whenever and , it must be that .
- Intuition: The only time you can have arrows going both ways is if it's a self-loop. Between two distinct elements, the relation can only go in one direction, or not at all.
- Canonical Example: The divisibility relation on positive integers. If and , it must be that . For example, but .
- Non-Example: The relation on integers where if is even. We have (since ) and (since ), but .
This is the most commonly confused property. It's essential to understand that antisymmetric is not the opposite of symmetric.
Let's return to our reading to clarify this point.
The author of this text gives an excellent explanation of why antisymmetry is not the opposite of symmetry and provides a helpful way to think about it using its contrapositive form.
Read the two "Remark" sections just below the definitions you read earlier. Focus on the explanation of symmetry and antisymmetry, particularly the part that begins with this sentence and ends with the key insight.
As the text highlights, a relation can be:
- Symmetric and not antisymmetric (e.g., "is a co-worker of").
- Antisymmetric and not symmetric (e.g., ).
- Both symmetric and antisymmetric (e.g., the identity relation is a great example of this).
- Neither symmetric nor antisymmetric (e.g., a relation on given by . It's not symmetric because is missing. It's not antisymmetric because you have both and .)
4. Transitive: Can you chain relationships together?
A relation is transitive if whenever and , it must also be that .
- Intuition: If you can get from to and from to , there must be a "shortcut" directly from to .
- Canonical Example: The relation on integers. If and , we can conclude that .
- Non-Example: The relation "is a friend of". Alice may be friends with Bob, and Bob may be friends with Charlie, but Alice and Charlie might be complete strangers.
Seeing the Properties in Action
Definitions are essential, but seeing them applied is what builds true understanding. The following video by Kimberly Brehm is an excellent, clear walkthrough of checking these properties for several relations defined on integers.
Discrete Math - 9.1.2 Properties of Relations
Watch how the presenter systematically tests each property for a set of four different relations. She uses a combination of direct reasoning and searching for counterexamples, which is exactly the process you'll need to master.
For reflexivity, watch from the beginning. For symmetry, watch the segment from here. For antisymmetry, a particularly tricky topic, pay close attention to her reasoning from this section. Notice how she handles implications where the premise is false (vacuously true). Finally, watch her analysis of transitivity from here, where finding a single counterexample is enough to disprove the property.
A Systematic Check on a Finite Set
When a relation is given on a small, finite set as an explicit list of pairs, we can check the properties exhaustively. This is a common type of problem and a great way to solidify the definitions. The same video continues with a perfect example of this.
Discrete Math - 9.1.2 Properties of Relations
The presenter now takes a specific relation on the set {1, 2, 3} and checks all four properties, one by one. This demonstrates the methodical process required for this kind of problem.
Please watch the final example in the video, from this point onward. Observe how she has to check every relevant pair to confirm or deny a property.
Visualizing Relations
For relations on finite sets, drawing a directed graph can provide powerful visual intuition. Let the elements of the set be the vertices (nodes) of the graph. Draw a directed edge (an arrow) from to if and only if .
With this visual model, the properties have clear graphical interpretations:
- Reflexive: Every vertex has a loop (an edge pointing to itself).
- Symmetric: Every edge between two different vertices is a two-way street; if there's an arrow from to , there must be one from to .
- Antisymmetric: There are no two-way streets between distinct vertices.
- Transitive: If there is a path from to and then to , there must be a direct "shortcut" edge from to .
The math.libretexts article you read earlier has a great summary of these graphical tests at the end of its "Example ". You can refer back to it if you find this visualization helpful.
Practice Problems
Let's test your understanding. For each relation defined on the set of integers , determine which of the four properties (reflexive, symmetric, antisymmetric, transitive) it possesses.
- Relation : if and only if .
- Relation : if and only if .
- Relation : if and only if divides (written ). Assume we are on the set of positive integers for this one.
Check your answers
-
- Not Reflexive: For it to be reflexive, we'd need for all integers . This is only true for . Since it's not true for , it's not reflexive.
- Symmetric: Yes. If , then by commutativity of addition, .
- Not Antisymmetric: We have and , but . This is a clear counterexample.
- Not Transitive: Consider and . If it were transitive, we would need . But , so is not in the relation.
-
- Reflexive: Yes. For any integer , .
- Symmetric: Yes. If , then .
- Not Antisymmetric: We have and , so and . But .
- Transitive: Yes. If and , then by the transitive property of equality on real numbers, .
-
on
- Reflexive: Yes. Any positive integer divides itself, since .
- Not Symmetric: , but .
- Antisymmetric: Yes. If and for positive integers, then must equal .
- Transitive: Yes. If and , then and for some integers . Substituting, we get , which means .
A Computational Perspective
Given your background in Python, we can make these abstract definitions very concrete by expressing them as code. This forces us to be perfectly precise, just like a computer requires.
Imagine we have a set A and a relation R represented as a set of tuples.
# Our base set
A = {1, 2, 3}
# A relation R on A. Let's use the one from the video.
R = {(1, 1), (1, 2), (2, 1), (2, 2), (3, 3)}
# --- Function Definitions ---
def is_reflexive(relation, base_set):
# For EVERY element x in the base_set...
for x in base_set:
# ...is the pair (x, x) in the relation?
if (x, x) not in relation:
return False
return True
def is_symmetric(relation, base_set):
# For EVERY pair (a, b) in the relation...
for a, b in relation:
# ...is the pair (b, a) also in the relation?
if (b, a) not in relation:
return False
return True
def is_antisymmetric(relation, base_set):
# For EVERY pair (a, b) in the relation...
for a, b in relation:
# If a and b are different...
if a != b:
# ...is the reverse pair (b, a) also present?
if (b, a) in relation:
return False # If so, it fails the test.
return True
def is_transitive(relation, base_set):
# For EVERY pair (a, b) and (b, c)...
for a, b1 in relation:
for b2, c in relation:
if b1 == b2: # We found a chain a -> b -> c
# Is the shortcut (a, c) in the relation?
if (a, c) not in relation:
return False
return True
# --- Testing our relation R ---
print(f"Is R reflexive? {is_reflexive(R, A)}")
print(f"Is R symmetric? {is_symmetric(R, A)}")
print(f"Is R antisymmetric? {is_antisymmetric(R, A)}")
print(f"Is R transitive? {is_transitive(R, A)}")
# Expected output:
# Is R reflexive? True
# Is R symmetric? True
# Is R antisymmetric? False
# Is R transitive? True
Notice how each function is a direct translation of the formal definition. The logical quantifiers ("for all", "there exists") and implications ("if...then") in the definitions map directly to loops and conditional statements in the code.
Conclusion
In this lesson, you've learned to analyze and classify relations using the fundamental properties of reflexivity, symmetry, antisymmetry, and transitivity. This is a significant step, moving us from simply describing sets to understanding the rich structures that can be built upon them.
Key Takeaways:
- A relation on a set is a subset of .
- Reflexive: Every element is related to itself. ()
- Symmetric: If is related to , then must be related to . ()
- Antisymmetric: The only way is related to and to is if and are the same element. ()
- Transitive: If you can get from to and from to , there must be a direct path from to . ()
These properties are not just abstract labels. When a relation is reflexive, symmetric, and transitive, it has a special name: an equivalence relation. These are incredibly powerful tools for partitioning sets into disjoint subsets, a concept used everywhere from modular arithmetic in cryptography to classifying objects in data science. In our next lesson, we will explore exactly how to use an equivalence relation to partition a set into its equivalence classes.