Maths Week 1: Sets, Relations, and Functions
This guide covers the foundational topics for the first week of Mathematics for Data Science I. We will build a strong understanding of sets, the relationships between their elements (relations), and the special rules that govern these relationships (functions).
π Table of Contents
- Fundamental Concepts
- Question Pattern Analysis
- Detailed Solutions by Pattern
- Practice Exercises
- Visual Learning: Mermaid Diagrams
- Common Pitfalls & Traps
- Quick Refresher Handbook
1. Fundamental Concepts
π’ Number Systems
- Natural Numbers (β): (Counting numbers)
- Integers (β€): (Whole numbers and their negatives)
- Rational Numbers (β): Numbers that can be written as a fraction , where are integers and . They are either terminating or repeating decimals (e.g., ).
- Irrational Numbers: Numbers that cannot be written as a simple fraction. Their decimal representation is non-terminating and non-repeating (e.g., ).
- Real Numbers (β): The set of all rational and irrational numbers combined.
π Set Theory
- Set: A collection of distinct objects (elements).
- Cardinality : The number of elements in a set A.
- Set Operations:
- Union (): All elements in A, or in B, or in both.
- Intersection (): Elements that are in both A and B.
- Difference (): Elements that are in A but not in B.
- Symmetric Difference (): Elements in A or B, but not both. .
- Principle of Inclusion-Exclusion: A formula to find the number of elements in the union of two or more sets. For two sets:
π Relations
A relation R from a set A to a set B is a collection of ordered pairs where and . Itβs a subset of the Cartesian product .
- Properties of a Relation on a Set A:
- Reflexive: For every element , the pair is in the relation. (Everyone is related to themselves).
- Symmetric: If is in the relation, then must also be in it. (If A is related to B, then B is related to A).
- Transitive: If and are in the relation, then must be in it. (If A is a friend of B, and B is a friend of C, then A is a friend of C).
- Equivalence Relation: A relation that is reflexive, symmetric, AND transitive.
βοΈ Functions
A function is a special relation where every element in the domain (Set A) is mapped to exactly one element in the codomain (Set B).
- Domain: The input set .
- Codomain: The set of all possible outputs .
- Range: The set of all actual outputs. The range is always a subset of the codomain.
- Types of Functions:
- Injective (One-to-One): Different inputs produce different outputs. If , then .
- Surjective (Onto): Every element in the codomain is mapped to by at least one element from the domain. (Range = Codomain).
- Bijective: The function is both injective and surjective (one-to-one and onto).
2. Question Pattern Analysis
Based on your assignment files, here are the common question patterns for Week 1.
π― Pattern 1: Irrational Number Identification
- Frequency: Medium
- Description: You are given expressions involving square roots and asked to identify which ones simplify to an irrational number.
- Example:
Maths/Week_1_Graded_Assignment_1...md, Q1.
π― Pattern 2: Function Domain & Cardinality
- Frequency: High
- Description: You are given a function with a denominator and/or a square root and asked to find the set of integers that are not in its domain.
- Example:
Maths/Week_1_Graded_Assignment_1...md, Q2.
π― Pattern 3: Cardinality of Set Relations
- Frequency: Medium
- Description: Relations are defined on a set of natural numbers using mathematical rules (e.g., ). You need to find the number of elements in set operations like set difference or union.
- Example:
Maths/Week_1_Graded_Assignment_1...md, Q3.
π― Pattern 4: Venn Diagram Word Problems
- Frequency: High
- Description: Real-world scenarios involving overlapping groups (e.g., surveys, tigers in a zoo) that require the use of set theory principles.
- Example:
Maths/Week_1_Graded_Assignment_1...md, Q4.
π― Pattern 5: Identifying Relation Properties
- Frequency: High
- Description: A relation is defined on a set, and you must determine if it is reflexive, symmetric, and/or transitive.
- Example:
Maths/Week_1_Graded_Assignment_1...md, Q5.
π― Pattern 6: Classifying Functions
- Frequency: High
- Description: You are given a function (defined by a formula, table, or rule) and asked to classify it as injective, surjective, or bijective.
- Example:
Maths/Week_1_Graded_Assignment_1...md, Q6, Q9.
3. Detailed Solutions by Pattern
π― Pattern 1: Irrational Number Identification
Example (from Graded Assignment Q1):
Which of the following are irrational numbers? a) b)
Step-by-Step Solution:
Part a)
- Simplify the radicals:
- Substitute the simplified forms into the expression:
- Combine like terms inside the parentheses:
- Multiply the terms:
- Conclusion: Since 6 is not a perfect square, is irrational. Therefore, is irrational.
Part b)
- Simplify the radicals in the expression:
- Combine like terms in the numerator and denominator:
- Cancel the common term ():
- Conclusion: The result is 3, which is a rational number.
π‘ Key Insight: The first step is always to simplify radicals (e.g., ) and then combine like terms before performing multiplication or division.
π― Pattern 2: Function Domain & Cardinality
Example (from Graded Assignment Q2):
Suppose is a function defined by , where . Let be the set of integers which are not in the domain of , then find the cardinality of the set .
Step-by-Step Solution:
-
Identify Domain Restrictions: A valid input must satisfy two conditions:
- The expression inside the square root must be non-negative:
- The denominator cannot be zero:
-
Solve the First Condition: This inequality holds true if or . So, integers that are allowed by this rule are .
-
Solve the Second Condition:
-
Combine the Conditions: The domain consists of all integers such that ( or ) AND (). This means the domain is the set of integers .
-
Find the Integers NOT in the Domain: The question asks for the integers that are excluded from the domain. These are the integers that violate the conditions.
- The integers between -4 and 4 are excluded by the first condition: .
- The integer is excluded by the second condition.
- The set of excluded integers is: .
-
Find the Cardinality: Count the number of elements in set .
π‘ Key Insight: Systematically list all restrictions. Then, find the set of numbers that violate at least one of these restrictions.
π― Pattern 5: Identifying Relation Properties
Example (from Graded Assignment Q5):
Define a relation on a set of 525 ponds such that two ponds are related if both are polluted by fertilisers and pharmaceutical products . Is this relation reflexive, symmetric, or transitive?
Step-by-Step Solution:
Let be the set of all 525 ponds. Let the relation be . Two ponds, Pond A and Pond B, are related, i.e., , if βA is polluted by F and Phβ AND βB is polluted by F and Phβ.
-
Reflexive?
- Condition: Is for every pond A in the set ?
- Test: Letβs say Pond A is polluted only by pesticides. Then the statement βA is polluted by F and Phβ is false. Therefore, the condition for is not met for this pond.
- Conclusion: The relation is not reflexive. It only holds for the subset of ponds that are polluted by both F and Ph.
-
Symmetric?
- Condition: If , does it imply ?
- Test: Assume . This means: (βA is polluted by F and Phβ) AND (βB is polluted by F and Phβ).
- The condition for is: (βB is polluted by F and Phβ) AND (βA is polluted by F and Phβ).
- Since the logical βANDβ is commutative, these two statements are identical. If the first is true, the second must be true.
- Conclusion: The relation is symmetric.
-
Transitive?
- Condition: If and , does it imply ?
- Test: Assume and .
- From , we know: (A is polluted by F & Ph) AND (B is polluted by F & Ph).
- From , we know: (B is polluted by F & Ph) AND (C is polluted by F & Ph).
- From these assumptions, we know for sure that A is polluted by F & Ph, and C is polluted by F & Ph.
- The condition for is: (βA is polluted by F and Phβ) AND (βC is polluted by F and Phβ). This is true based on our assumptions.
- Conclusion: The relation is transitive.
π‘ Key Insight: The properties of a relation often mirror the properties of the logical operators used to define it. The relation βshares property Xβ is always symmetric and transitive. It is only reflexive if all elements in the base set have property X.
4. Practice Exercises
Exercise 1: Venn Diagrams
In a class of 100 students, 70 play football, 50 play cricket, and 30 play both. a) How many students play at least one of the two sports? b) How many students play exactly one sport?
Hint
Use the Inclusion-Exclusion Principle for part (a). For part (b), find the number of students who play only football and only cricket, then add them.Solution
Let F be the set of football players and C be the set of cricket players. Given: $|F|=70$, $|C|=50$, $|F \cap C|=30$. a) **At least one sport** is the union $|F \cup C|$: $$ |F \cup C| = |F| + |C| - |F \cap C| = 70 + 50 - 30 = 90 $$ b) **Exactly one sport:** * Only Football: $|F| - |F \cap C| = 70 - 30 = 40$ * Only Cricket: $|C| - |F \cap C| = 50 - 30 = 20$ * Total playing exactly one: $40 + 20 = 60$ **Answers:** a) 90, b) 60.Exercise 2: Classifying Functions
Classify the function defined by .
Hint
Check if different integer inputs give different outputs (injective). Check if you can generate any integer output by choosing an appropriate integer input (surjective).Solution
1. **Injective (One-to-One)?** Assume $f(x_1) = f(x_2)$. $x_1 + 5 = x_2 + 5$. Subtracting 5 from both sides gives $x_1 = x_2$. Since $f(x_1) = f(x_2)$ implies $x_1 = x_2$, the function **is injective**.-
Surjective (Onto)? Let be any integer in the codomain . Can we find an integer in the domain such that ? Since is an integer, is also always an integer. So, for any target integer , we can find a corresponding input integer . The function is surjective.
-
Bijective? Since the function is both injective and surjective, it is bijective.
5. Visual Learning: Mermaid Diagrams
Number System Hierarchy
graph TD A[Real Numbers β] --> B[Rational Numbers β]; A --> C[Irrational Numbers]; B --> D[Integers β€]; D --> E[Natural Numbers β];
Function Classification Flowchart
graph LR A[Start with f: A -> B] --> B{Is it Injective?}; B -- Yes --> C{Is it Surjective?}; B -- No --> D[Not Injective]; C -- Yes --> E[Bijective]; C -- No --> F[Injective but not Surjective]; D --> G{Is it Surjective?}; G -- Yes --> H[Surjective but not Injective]; G -- No --> I[Neither];
6. Common Pitfalls & Traps
- Domain of Functions: Forgetting to check all domain restrictions. A function like has two restrictions: from the square root and from the denominator, making the domain .
- Venn Diagrams: When given β|A|=50β, this represents the entire circle A, including its overlaps. The region for βonly Aβ is .
- Reflexivity: A common trap is to show a relation holds for some pairs. It must hold for every element in the set to be reflexive.
- Rationalizing: Assuming the sum or product of two irrational numbers is always irrational. This is false: , which is rational.
7. Quick Refresher Handbook
| Concept | Formula / Key Idea |
|---|---|
| Set Union | $ |
| Set Difference | : Everything in A that is NOT in B. |
| Relation Check: R | Reflexive: Is for all ? |
| Relation Check: S | Symmetric: If , is ? |
| Relation Check: T | Transitive: If and , is ? |
| Function: Injective | One-to-one. Different inputs give different outputs. Test: . |
| Function: Surjective | Onto. Range equals Codomain. Test: Can you find an for any given ? |
| Domain Restrictions | 1. Denominator . 2. Inside square root . |
| Irrational Check | Simplify fully. If a remains (where n is not a perfect square), itβs irrational. |