A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Relations as Subsets of Cartesian Products

College Depth 60 in the knowledge graph I know this Set as goal
1,861topics build on this
282prerequisites beneath it
See this on the map →
Cartesian Product and Ordered PairsCategories and MorphismsFirst-Order Logic Syntax+2 more
relations binary-relations formal-definition

Core Idea

A relation R from A to B is any subset of the Cartesian product A × B. This formalization treats all relational structures—ordering relations, equivalence relations, correspondence—as mathematical objects. Key properties include reflexivity, symmetry, transitivity, and totality, which characterize important relation types.

Explainer

You already know that the Cartesian product A × B is the set of all ordered pairs (a, b) where a ∈ A and b ∈ B. A relation is simply a selection from that pool — a subset R ⊆ A × B that picks exactly the pairs you want to declare "related." Writing (a, b) ∈ R is equivalent to saying "a is related to b under R," often written aRb. The key insight is that this definition requires nothing more than set membership: a relation is not a rule or a formula, just a collection of ordered pairs.

Consider the "less than" relation on the integers. Instead of defining it as a rule, we can think of it as the infinite set {(1,2), (1,3), (2,3), (1,4), (2,4), ...} — every pair (m, n) where m is less than n. Similarly, a family tree "is a parent of" relation is the set of ordered pairs (person, child) for every parent-child connection in the family. By reducing relations to sets of pairs, we can reason about them using the tools of set theory: union, intersection, complement, and composition.

Properties of relations are properties of these subsets relative to the underlying sets. Reflexivity means (a, a) ∈ R for every a in the domain — the relation includes all "self-pairs." Symmetry means if (a, b) ∈ R then (b, a) ∈ R — the relation looks the same in both directions. Transitivity means if (a, b) ∈ R and (b, c) ∈ R then (a, c) ∈ R — the relation chains through intermediate elements. An equivalence relation satisfies all three; it carves the set into disjoint classes of mutually related elements (called equivalence classes). A partial order is reflexive, antisymmetric, and transitive — it captures the structure of "no larger than" without requiring every pair to be comparable.

The payoff of this formalism is uniformity: functions, orderings, equivalences, and graphs are all special cases of the same structure. A function from A to B is a relation where every element of A appears as a left coordinate exactly once — adding a uniqueness constraint to the general relation definition. This builds directly toward the formal treatment of functions you will encounter next. Seeing functions as a subtype of relations, rather than a separate concept, lets you apply everything you know about sets to understand when functions exist, when they can be inverted, and how composition of relations generalizes function composition.

Mastering this definition means training yourself to think set-theoretically about structure. Whenever you encounter a relationship between objects — "divides," "is a subset of," "has the same remainder as" — the formal move is to ask: what are the two sets involved, what is A × B, and which ordered pairs belong to the relation? That translation from intuitive relationship to explicit subset is the foundation of all subsequent work in logic, algebra, and theoretical computer science.

Practice Questions 5 questions

Prerequisite Chain

Understanding ZeroThe Number ZeroCounting to FiveCounting to 10Counting to 20Counting a Set of Objects Up to 20Cardinality: The Last Number CountedMatching Numerals to QuantitiesSubitizing Small QuantitiesAddition Within 10Making 10 as an Addition StrategyAddition Within 20Doubles and Near DoublesDoubles Facts Within 10Near Doubles Facts Within 20Mental Math Strategies for AdditionMental Math: Adding and Subtracting TensAddition Within 100Repeated Addition as MultiplicationMultiplication as Equal GroupsMultiplication: ArraysBasic Multiplication Facts Through 10Multiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Multiplication and Division Fact FamiliesRelationship Between Multiplication and DivisionDivision Facts as Inverse of MultiplicationRemainders and Quotients in DivisionDivision Word ProblemsMulti-Step Word ProblemsSolving Multi-Step Word ProblemsMultiplication Word ProblemsDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueIntegers and the Number LineOpposites and Additive InversesAbsolute ValueAdding IntegersSubtracting IntegersMultiplying IntegersIntroduction to ExponentsOrder of OperationsInteger Order of OperationsVariable ExpressionsVariables in LogicSet Notation BasicsSet Membership and NotationCartesian Product and Ordered PairsRelations as Subsets of Cartesian Products

Longest path: 61 steps · 282 total prerequisite topics

Prerequisites (1)

Leads To (4)