Courses / Computer Science I
Discrete Mathematics

Relations

Computer Science I 219 words Free to read

Binary Relations

A binary relation RR is a subset of ordered pairs from a set, written aRba\,R\,b to show elements are "related." They underlie databases, graphs, and ordering.

Three core properties classify relations:

PropertyDefinitionExample
ReflexiveaRaa\,R\,a for all aa"is equal to"
SymmetricIf aRba\,R\,b, then bRab\,R\,a"is a sibling of"
TransitiveIf aRba\,R\,b and bRcb\,R\,c, then aRca\,R\,c"is less than"

Common pitfall: Do not confuse symmetric with transitive. Symmetry reverses a single pair, while transitivity chains two pairs. "Is one mile from" is symmetric, but walking one mile twice doesn't put you two miles away from the start.

Reflexive, symmetric, transitive -- tested with an actual ruler

Special Relations

Abstract properties let us reason without knowing the specific items. Two combinations matter most:

Pitfall: A relation can easily possess one property without the others. Never assume a reflexive relation is also symmetric or transitive.

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

10practice questions
2interactive scenes

Discrete Mathematics