More About Relations

Chapter 4: Relations

Learning objectives

  • Define reflexive, symmetric, transitive, and antisymmetric
  • Decide whether a given relation has each property
  • Compose two relations and compute the result
  • Use counterexamples to disprove a property

Why classify relations at all? Because once you know which properties a relation has, you instantly know how it behaves. Reflexive + symmetric + transitive forces a partition (equivalence classes, Β§4.5). Reflexive + antisymmetric + transitive forces an ordering (Β§4.4). The three or four small properties below recur everywhere in algebra, logic, computer science, and database design. Getting fluent at spotting these properties, and at building counterexamples when one fails, is the core skill of this chapter.

The four properties

Let RR be a relation on a set AA. We say RR is:

  • reflexive if βˆ€a∈A, aRa\forall a \in A,, aRa, everyone is connected to themselves.
  • symmetric if βˆ€a,b∈A, aRbβ‡’bRa\forall a, b \in A,, aRb \Rightarrow bRa, arrows come in pairs.
  • transitive if βˆ€a,b,c∈A, (aRb∧bRc)β‡’aRc\forall a, b, c \in A,, (aRb \wedge bRc) \Rightarrow aRc, chains shortcut.
  • antisymmetric if βˆ€a,b∈A, (aRb∧bRa)β‡’a=b\forall a, b \in A,, (aRb \wedge bRa) \Rightarrow a = b, the only two-way arrows are self-loops.

To prove a property holds, show the universal statement for all relevant elements. To disprove it, exhibit a single counterexample, one bad pair (or chain) is enough.

Composition of relations

Given RβŠ†AΓ—BR \subseteq A \times B and SβŠ†BΓ—CS \subseteq B \times C, the composition S∘RβŠ†AΓ—CS \circ R \subseteq A \times C is

S∘R={(a,c)βˆ£βˆƒb∈B, aRb∧bSc}.S \circ R = \{(a, c) \mid \exists b \in B,\, aRb \wedge bSc\}.

To get an (a,c)(a, c) pair in S∘RS \circ R, you need a "stepping-stone" bb that links aa to cc in two hops. Composition is associative: T∘(S∘R)=(T∘S)∘RT \circ (S \circ R) = (T \circ S) \circ R. It is generally not commutative. A useful identity: (S∘R)βˆ’1=Rβˆ’1∘Sβˆ’1(S \circ R)^{-1} = R^{-1} \circ S^{-1}, the order reverses, just like for inverse functions.

f : A β†’ BAB1234abcd

Pause and think: The "is parent of" relation on a set of people. Is it reflexive? Symmetric? Antisymmetric? Transitive? Build a single counterexample for each property that fails. (Hint: a person is not their own parent; parents don’t parent their parents; if A parents B and B parents C, is A automatically a parent of C?)

Try it

  • For R={(1,1),(2,2),(3,3),(1,2),(2,1)}R = {(1,1),(2,2),(3,3),(1,2),(2,1)} on {1,2,3}{1,2,3}, check all four properties.
  • Show by counterexample that "is a friend of" is generally not transitive.
  • Compute R∘RR \circ R when R={(1,2),(2,3),(3,1)}R = {(1,2),(2,3),(3,1)}. Then compute R∘R∘RR \circ R \circ R.
  • Predict: if RR is symmetric, what does R∘RR \circ R look like? Test with a small example.
  • Is the relation << on Z\mathbb{Z} antisymmetric? Argue from the definition.

A trap to watch for

Many students confuse antisymmetric with asymmetric or with "not symmetric." Antisymmetric does not mean "no pairs come in both directions", it allows the pair (a,a)(a, a) (since trivially a=aa = a). So the equality relation {(1,1),(2,2),(3,3)}{(1,1),(2,2),(3,3)} is both symmetric and antisymmetric. The two properties are not opposites, both can hold. The condition is: if you ever have both aRbaRb and bRabRa, then aa must equal bb. (For the record: an asymmetric relation requires aRb⇒¬bRaaRb \Rightarrow \neg bRa, which forbids self-loops; that is strictly stronger than antisymmetric.)

What you now know

You can list the four basic properties of relations, prove each one with a universal argument, disprove each with a single counterexample, and compose two relations to chain their reach. Section 4.4 specialises to relations that are reflexive + antisymmetric + transitive, orderings, and Β§4.5 to relations that are reflexive + symmetric + transitive, equivalences.

References

  • Velleman, D. J. (2019). How to Prove It (3rd ed.). Cambridge University Press, Β§4.3.
  • Hammack, R. (2018). Book of Proof, ch. 11.
  • Bloch, E. D. (2011). Proofs and Fundamentals (2nd ed.). Springer, ch. 5.
  • Cormen, T. H., Leiserson, C. E., Rivest, R. L., Stein, C. (2009). Introduction to Algorithms (3rd ed.). MIT Press, Β§25.2 (transitive closure).

This page is prerendered for SEO and accessibility. The interactive widgets above hydrate on JavaScript load.