Registry Synced

Relations and Functions

447 words
2 min read

Reading compass

Now ยท ๐ŸŽฏ Learning Objectives

Relations and Functions

๐ŸŽฏ Learning Objectives

  • Define relations as sets of ordered pairs
  • Identify properties: reflexive, symmetric, transitive, antisymmetric
  • Distinguish equivalence relations from partial orders
  • Classify functions as injective/surjective/bijective
  • Compose functions and find inverses

6.1 Relations

A relation RR from AA to BB is a subset of Aร—BA \times B. We write aRbaRb for (a,b)โˆˆR(a,b) \in R.

Properties

PropertyDefinitionExample on Z\mathbb{Z}
Reflexiveโˆ€a:aRa\forall a: aRaaโ‰คaa \leq a
SymmetricaRbโ€…โ€ŠโŸนโ€…โ€ŠbRaaRb \implies bRaa=ba = b
TransitiveaRbโˆงbRcโ€…โ€ŠโŸนโ€…โ€ŠaRcaRb \land bRc \implies aRca<b<ca < b < c
AntisymmetricaRbโˆงbRaโ€…โ€ŠโŸนโ€…โ€Ša=baRb \land bRa \implies a = baโ‰คba \leq b

6.2 Equivalence Relations

A relation that is reflexive, symmetric, and transitive is an equivalence relation. Partitions: An equivalence relation partitions the set into equivalence classes. Example: aโ‰กb(modn)a \equiv b \pmod{n} (congruence mod nn). Equivalence classes: {0},{1},โ€ฆ,{nโˆ’1}\{0\}, \{1\}, \dots, \{n-1\} modulo nn.

6.3 Partial Orders

A relation that is reflexive, antisymmetric, and transitive is a partial order.
  • Total order: Every pair is comparable (โ‰ค\leq on R\mathbb{R})
  • Partial order: Some pairs incomparable (โІ\subseteq on sets)

Hasse Diagrams

A graphical representation of a partial order.

6.4 Functions

A function f:Aโ†’Bf: A \to B is a relation where each aโˆˆAa \in A relates to exactly one bโˆˆBb \in B.

Types

TypeDefinitionExample
Injective (one-to-one)f(a1)=f(a2)โ€…โ€ŠโŸนโ€…โ€Ša1=a2f(a_1) = f(a_2) \implies a_1 = a_2f(x)=3xf(x) = 3x
Surjective (onto)โˆ€bโˆˆBย โˆƒaโˆˆA:f(a)=b\forall b \in B \ \exists a \in A: f(a) = bf(x)=x3f(x) = x^3
BijectiveBoth injective and surjectivef(x)=x+1f(x) = x+1

Composition

(gโˆ˜f)(x)=g(f(x))(g \circ f)(x) = g(f(x))

Inverse

fโˆ’1(y)=xf^{-1}(y) = x iff f(x)=yf(x) = y. Exists only if ff is bijective.

โœ… Practice Questions

Q1: Determine if R={(1,1),(1,2),(2,1),(2,2),(3,3)}R = \{(1,1), (1,2), (2,1), (2,2), (3,3)\} on {1,2,3}\{1,2,3\} is an equivalence relation.
Solution
Reflexive? Need (1,1),(2,2),(3,3)(1,1), (2,2), (3,3) โ€” all present. โœ“ Symmetric? Check every pair: (1,2)(1,2) has (2,1)(2,1) โœ“, (2,1)(2,1) has (1,2)(1,2) โœ“, all self-pairs are symmetric. โœ“ Transitive? (1,2)(1,2) and (2,1)โ†’(1,1)(2,1) \to (1,1) โœ“; (2,1)(2,1) and (1,2)โ†’(2,2)(1,2) \to (2,2) โœ“. Yes, it's an equivalence relation. Classes: {1,2}\{1,2\} and {3}\{3\}. Q2: Is f(x)=x2f(x) = x^2 on R\mathbb{R} injective? Surjective? Solution
Not injective: f(โˆ’2)=f(2)=4f(-2) = f(2) = 4 but โˆ’2โ‰ 2-2 \neq 2. Not surjective: f(x)โ‰ฅ0f(x) \geq 0, so negative numbers have no preimage. If defined as f:R+โ†’R+f: \mathbb{R}^+ \to \mathbb{R}^+, it is bijective. Q3: Find the inverse of f(x)=3x+2f(x) = 3x + 2. Solution
y=3x+2โ€…โ€ŠโŸนโ€…โ€Šyโˆ’2=3xโ€…โ€ŠโŸนโ€…โ€Šx=yโˆ’23y = 3x + 2 \implies y - 2 = 3x \implies x = \frac{y-2}{3}. So fโˆ’1(y)=yโˆ’23f^{-1}(y) = \frac{y-2}{3}. Join Discord PreviousSet Operation ProofsNextNumber Theory
Document outline

Keep your place and jump directly to a heading.

Table of contents

No note selected

Open a chapter to see its outline, backlinks, and sources here.