Why care about sets, relations and functions?
Ever wondered how a vending machine knows which snack to drop when you press a button? That's a real‑life function at work – a rule that pairs one thing with exactly one outcome.
💡 In Simple Words: A set is just a collection of objects, like a basket of apples. A relation tells you how two sets talk to each other, like matching each student with their roll number. A function is a special relation that gives each input exactly one output, just like a vending machine giving one snack per button.
What is a Set?
A set (think of it as a bag) is a well‑defined collection of distinct items called elements. We write a set with curly braces: {1, 2, 3} means the bag contains the numbers 1, 2 and 3.
Basic Operations
- Union (∪): puts two bags together, keeping every item only once. Example: {1,2} ∪ {2,3} = {1,2,3}.
- Intersection (∩): keeps only the items both bags share. Example: {1,2} ∩ {2,3} = {2}.
- Difference (\): removes the second bag’s items from the first. Example: {1,2,3} \ {2} = {1,3}.
- Complement: all items in the universal set that are not in the given set.
Worked Example
Let A = {x | x is a vowel in English} = {a, e, i, o, u} and B = {a, e, i, o, u, y}. Find A ∪ B and A ∩ B.
Union: {a, e, i, o, u, y}. Intersection: {a, e, i, o, u} – just the common vowels.
Understanding Relations
A relation is a rule that links elements of one set (the domain) with elements of another set (the codomain). Think of a school roster: each student (from set S) is linked to a roll number (from set R). Mathematically we write a relation as a set of ordered pairs, like {(Alice,1), (Bob,2), (Cara,3)}.
Types of Relations
- Reflexive: every element relates to itself. Example: {(1,1), (2,2)} on set {1,2}.
- Symmetric: if a relates to b, then b relates to a. Example: {(a,b), (b,a)}.
- Transitive: if a relates to b and b to c, then a relates to c. Example: {(1,2), (2,3), (1,3)}.
Comparison Table
| Property | Definition (in plain words) | Example |
|---|---|---|
| Reflexive | Each item pairs with itself | {(x,x) | x∈{1,2,3}} |
| Symmetric | Swap the pair and you still have a pair in the set | {(a,b),(b,a)} |
| Transitive | Chain two pairs and you get a third pair | {(1,2),(2,3),(1,3)} |
Functions – The Heart of Mapping
A function is a special kind of relation where every input (from the domain) gets exactly one output (in the codomain). No input can have two different outputs – just like a vending machine won’t spit out two snacks for one button press.
Key Vocabulary
- Domain: the set of all possible inputs.
- Codomain: the set where outputs live; may contain extra elements not actually used.
- Range: the actual set of outputs that appear.
- One‑to‑One (Injective): different inputs give different outputs.
- Onto (Surjective): every element of the codomain is hit by some input.
- Bijective: both one‑to‑one and onto; perfect pairing.
Simple Example
Define f : {1,2,3} → {a,b,c} by f(1)=a, f(2)=b, f(3)=c. Here, domain = {1,2,3}, codomain = {a,b,c}, range = {a,b,c}. The function is bijective because each input has a unique output and every output is used.
Graphical View
If you plot the pairs on a coordinate grid, each vertical line cuts the graph at most once – that’s the “one output per input” rule.
Worked Problem
Let g : ℝ → ℝ be defined by g(x) = 2x + 3. Find the domain, codomain, and state whether g is one‑to‑one.
Domain: all real numbers (ℝ). Codomain: also ℝ (we usually choose the same set). Since 2x+3 is a straight line with non‑zero slope, different x’s give different y’s, so g is one‑to‑one. It’s not onto ℝ because there’s no x that makes g(x)=2 (actually there is; solve 2x+3=2 → x=-0.5, so it is onto ℝ as well). Hence g is bijective.
Quick Revision Summary
- Set – a bag of distinct objects; use { } to write.
- Relation – set of ordered pairs linking two sets; can be reflexive, symmetric, transitive.
- Function – relation with exactly one output per input; know domain, codomain, range.
- Injective (one‑to‑one) – no two inputs share the same output.
- Surjective (onto) – every possible output appears.
- Bijective – both injective and surjective; perfect match.
📝 Likely Exam Questions
- Define a set and give two examples of union and intersection.
- State the three properties of a relation and illustrate each with a small set.
- For the function f(x)=x^2, determine the domain, codomain (ℝ), and range. Is f one‑to‑one? Explain.
- Explain the difference between ‘range’ and ‘codomain’ with a diagram.
- Given the relation R = {(1,2),(2,3),(1,3)} on {1,2,3}, test whether R is transitive.
Model Answers:
- Set: collection of distinct elements, e.g., {2,4,6} or {red, blue}.
- Union combines all elements; intersection keeps only common ones.
- Properties: reflexive – (a,a) present; symmetric – (a,b) ⇒ (b,a); transitive – (a,b) & (b,c) ⇒ (a,c).
- f(x)=x^2: domain ℝ, codomain ℝ, range [0,∞). Not one‑to‑one because f(2)=f(-2).
- Range is the set of actual outputs; codomain is the set we allow outputs to belong to.
- R is transitive because (1,2) and (2,3) imply (1,3), which is indeed in R.