Binary Relation

Context: FIT1058_MOC Β· a subset of a Cartesian Product Β· generalises the function Β· classified by Properties of Binary Relations

Quick Revision

  • 🎯 Objective: a subset recording which elements are related βž” pairs, not single-valued.
  • πŸ“¦ Core Components: domain/codomain βž” forward/backward lookup βž” inverse relation.
  • ⚑ Key Constraint: a function is the single-valued + total special case; the inverse relation always exists.

πŸ“ Core

1. The Relation (Subset of a Product)

  • Definition βž” , a set of ordered pairs recording β€œrelated”.
  • On βž” the case ().
  • Notation βž” .

2. Function as Special Case

  • Functional constraint βž” for every , exactly one with .
  • General relation βž” an element relates to zero, one, or many.
  • Every function is a relation βž” not conversely.

3. Operations

  • Active domain/image βž” first/second coordinates actually used.
  • Lookups βž” ; .
  • Inverse βž” swaps every pair β€” always exists.

Key identities:

βš–οΈ Core Decision Matrix

ObjectConstraintCount ()
relation none
function single-valued + total
inverse relationswap pairsalways exists
inverse functionbijection requiredconditional

When It Flips: relations model orders (), graph edges, and database rows; they are sets of pairs, so , apply. The Function (Mathematics) is the single-valued, total specialisation.

πŸ“Š Exam Execution Trace

Manual Execution Trace

, (""):

Step / StateQueryResult
0 (Init)β€”β€”
1
2
3

⚠️ Common Mistakes

  • πŸ’‘ Inverse relation β‰  inverse function βž” exists for any relation (swap pairs); it’s a function only if is a bijection.

🧠 Active Recall