Ever wondered how a vending machine knows which snack you chose?
💡 In Simple Words: A set is just a collection of objects, like a basket of apples. A relation tells you how items from one set connect to items in another, like matching each apple to its price. A function is a special relation where each input gets exactly one output, just like each button on the vending machine gives one specific snack.
What is a Set?
A set is a well‑defined group of distinct objects, called elements. "Well‑defined" means you can always tell whether an object belongs or not. For example, the set of even numbers less than 10 is {2,4,6,8}.
Key vocabulary
- Element: a single object in a set (like the number 4 in the set above).
- Roster notation: writing a set by listing its elements inside curly braces { }.
- Set‑builder notation: describing a set by a rule, e.g., {x | x is an even natural number
Think of a set like a sock drawer: you only count each pair once, and you know exactly which socks are inside.
Understanding Relations
A relation links elements of one set (called the domain) to elements of another set (called the codomain). It’s just a collection of ordered pairs (a, b) where a comes from the first set and b from the second.
Example: Let A={1,2,3} and B={a,b}. The relation R={(1,a),(2,b),(3,a)} says 1 is related to a, 2 to b, and 3 to a.
Important terms:
- Domain: the set where the first items of the pairs come from.
- Codomain: the set that supplies the second items.
- Range: the actual set of second items that appear in the relation.
Imagine a school dance where each boy (domain) picks a girl (codomain) to dance with. The list of dancing pairs is the relation.
Functions – the special kind of relation
A function is a relation with a strict rule: every element of the domain must be paired with exactly one element of the codomain. No element can be left out, and none can have two different partners.
Notation: we write f: A→B to say “function f maps set A to set B”. If f(2)=5, we read it as “f of 2 equals 5”.
Example: Let f: {1,2,3}→{a,b,c} be defined by f(1)=a, f(2)=b, f(3)=c. This is a function because each input (1,2,3) has one and only one output.
Types of functions you’ll meet:
- One‑to‑one (injective): different inputs give different outputs. Like assigning each student a unique locker.
- Onto (surjective): every element of the codomain gets hit by at least one input. Think of a teacher handing out every possible grade letter.
- One‑to‑one & onto (bijective): both properties together; it’s a perfect pairing, like matching each shoe to exactly one foot.
Quick Comparison
| Concept | What it does | Key rule |
|---|---|---|
| Set | Collects distinct objects | Elements are either in or out |
| Relation | Links elements of two sets | Can have many‑to‑many connections |
| Function | Special relation with single output | Each input → exactly one output |
Common Pitfalls to Avoid
- Don’t confuse “range” with “codomain”. The codomain is the whole set you could possibly get; the range is what you actually get.
- Remember that a function can still be many‑to‑one (different inputs giving the same output) – that’s okay.
- When checking if a relation is a function, look at every element of the domain. Missing one means it’s not a function.
📝 Likely Exam Questions
- Define a set and give two different notations for the set of natural numbers less than 5.
Answer: A set is a collection of distinct objects. Roster notation: {1,2,3,4}. Set‑builder notation: {x | x∈ℕ, x - Let A={1,2,3} and B={a,b}. Is the relation R={(1,a),(2,b),(2,a)} a function? Explain.
Answer: No. The element 2 in the domain appears in two ordered pairs (2,b) and (2,a), giving two outputs, which violates the function rule. - State the difference between injective and surjective functions with a simple example.
Answer: Injective (one‑to‑one) means different inputs give different outputs, e.g., f(x)=x+1 on ℤ. Surjective (onto) means every element of the codomain is hit, e.g., f(x)=x² from ℤ to non‑negative integers. - Find the range of the relation R={(1,2),(2,3),(3,2)} from A={1,2,3} to B={2,3,4}.
Answer: The range is {2,3} because those are the second components that actually appear. - Is the mapping f:{a,b,c}→{1,2} defined by f(a)=1, f(b)=2, f(c)=2 a function? Is it injective? Is it surjective?
Answer: Yes, it’s a function (each input has one output). It is not injective because b and c both map to 2. It is surjective because both 1 and 2 in the codomain are attained.