Relations
Relations A relation is a binary relation on a set of elements. A binary relation is a set of ordered pairs, where each pair consists of an element from...
Relations A relation is a binary relation on a set of elements. A binary relation is a set of ordered pairs, where each pair consists of an element from...
A relation is a binary relation on a set of elements. A binary relation is a set of ordered pairs, where each pair consists of an element from the set and another element.
Example:
The relation "is taller than" is a binary relation on the set of people.
The relation "is a student in Math 101" is a binary relation on the set of students in the Math 101 class.
Key properties of relations:
A relation is reflexive if for all elements a in the set, aRa holds.
A relation is symmetric if for all elements a and b in the set, if aRb, then bRa holds.
A relation is transitive if for all elements a, b, and c in the set, if aRb and bCc, then aCc holds.
Examples of relations:
The relation "is older than" is a binary relation on the set of people.
The relation "is a student in the Math 101 class" is a binary relation.
The relation "is a teacher of Math 101" is a ternary relation (since there are multiple people who are teachers of Math 101).
Applications of relations:
Relations can be used to define equivalence classes, which are sets of elements that are related to each other.
Relations can be used to define lattices, which are the smallest possible non-empty set of relations that is closed under composition and the least-upper-bound operation.
Additional points to remember:
A relation can be represented using a table, a graph, or a set of ordered pairs.
The order of the elements in the pairs in a relation is important.
A relation can be a reflexive, symmetric, and transitive relation at the same time