Relations and functions describe connections between sets. Functions are a special type of relation with unique mapping.
Relations:
- A relation R from set A to B is a subset of A × B.
- Types: Reflexive, Symmetric, Transitive, Equivalence relation.
Functions:
- A function f: A → B assigns each element of A exactly one element of B.
- Types:
- One-to-One (Injective): Different inputs → different outputs
- Onto (Surjective): Every element of B is mapped
- Bijective: Both injective and surjective
- Notation: f(x) = y
Example Problem:
Let f(x) = 2x + 1, x ∈ {1,2,3}
- f(1)=3, f(2)=5, f(3)=7 → function is one-to-one and onto if codomain = {3,5,7}