Relations and Functions
🎧 First, listen to the class discussion audio of Relations and Functions:
🎧 Real-Life Use of Relations and Functions
Hello everyone! Welcome to today's class. I know topics like relations and functions can feel a bit abstract when you first look at them in your textbook. But trust me, once you picture how things connect in real life, everything clicks into place. Today, we are going to break down sets, pairs, mappings, and inverse ideas step-by-step so you can ace your exams without any stress. Grab your notebooks, and let us get started!
1. Introduction to Relations and Functions
📘 Learn this topic
Definition
Think about your daily life. You have friends, family, favorite foods, and school subjects. In math, whenever we talk about how one object relates to another, we enter the world of relations and functions.
Explanation
- Relation: Put simply, a relation is just any connection between two sets of items. For example, if Set A is a group of students and Set B is their assigned lockers, pairing a student to their locker is a relation.
- Function: A function is a special, well-behaved type of relation where every input has one and only one output. If you press the number 1 on a vending machine, you expect exactly one specific snack to drop out, not three different ones. That predictable pairing is what a function is all about.
2. Types of Relations
📘 Learn this topic
Definition
A relation in mathematics is a subset of the Cartesian product of two sets. When working with a single set, a relation describes how elements of that set connect among themselves.
Standard Definitions:
1. "A relation R on a set A is a subset of A cross A. If every element is related to itself, it is reflexive." - Standard Abstract Algebra Definition.
2. "Relations provide a formal framework for studying the way objects of a set interact, forming the foundation upon which functions are built." - Modern Mathematical Foundations Text.
Explanation
- Reflexive: Every element must be related to itself. (x relates to x)
- Symmetric: If element x relates to y, then y must relate back to x.
- Transitive: If x relates to y, and y relates to z, then x must relate to z.
- Equivalence Relation: A relation that is reflexive, symmetric, and transitive all at once.
Examples
- Reflexive Example: In the set of all people, the relation "has the same height as" is reflexive because every person has the exact same height as themselves.
- Symmetric Example: On the set of lines in a plane, the relation "is perpendicular to" is symmetric. If line L1 is perpendicular to line L2, then line L2 is definitely perpendicular to line L1.
Real-Life Uses
- Database Management Systems: In relational databases like SQL, a primary key and foreign key relationship uses reflexive and transitive properties to link tables together. If user A manages user B, and user B manages user C, transitive queries help HR departments figure out the entire reporting chain instantly.
- Social Network Connections: Think of the "is a friend of" relation on platforms. If user A is friends with user B, user B is friends with user A. That is symmetry in action.
Common Misconceptions & Corrections
Misconception: Students often think that if a relation is symmetric, it must also be reflexive.
Correction: Not at all! Take the relation "is a sibling of." If John is a sibling of Mary, Mary is a sibling of John (symmetric). But John is not a sibling of himself (not reflexive).
Concise Takeaway
Always test relations using literal elements from your set. Check every single element for reflexivity, pick pairs for symmetry, and look for chain links for transitivity.
3. One to One and Onto Functions
📘 Learn this topic
Definition
Functions describe a rule of correspondence where elements from a domain set are mapped to elements in a codomain set. One-to-one and onto describe how crowded or sparse those mappings are.
Standard Definitions:
1. "A function is one-to-one (injective) if distinct elements in the domain map to distinct elements in the codomain." - Mathematical Analysis Principles.
2. "A function is onto (surjective) if every element in the codomain has at least one pre-image in the domain." - Advanced Calculus Handbook.
Explanation
- One-to-One (Injective): f(a) = f(b) always implies a = b. No two inputs share an output.
- Onto (Surjective): Range equals Codomain. No element in the target set is left out.
- Bijective: Both one-to-one and onto.
Examples
- One-to-One Example: f(x) = 2x from real numbers to real numbers. Different x values give different 2x values.
- Onto Example: f(x) = x + 3 from real numbers to real numbers. For any target y, you can always find an input x = y - 3.
Real-Life Uses
- Encryption and Cryptography: Secure communication relies heavily on one-to-one functions. When you send a password, it gets hashed. A good hashing algorithm must be one-to-one so that two different passwords never produce the exact same secure token, preventing security breaches.
- Seat Assignment Systems: Booking a flight ticket uses an onto function where every single passenger maps to a distinct seat, ensuring no double bookings occur.
Common Misconceptions & Corrections
Misconception: Students think that if a function is not one-to-one, it cannot be a function at all.
Correction: A function simply requires every input to have *an* output. It does not forbid two different inputs from landing on the same output (like f(x) = x squared where -2 and 2 both map to 4).
4. Composite Functions
📘 Learn this topic
Definition
A composite function is the chaining together of two separate functions where the output of the first function becomes the input of the second function.
Standard Definitions:
1. "Given functions f and g, the composite function denoted by fog is defined by (fog)(x) = f(g(x))." - College Algebra Standard.
2. "Function composition is an associative operation that allows complex systems of transformation to be built from simpler behavioral blocks." - Systems Theory Text.
Explanation
- Notation: (fog)(x) means apply g first, then apply f to that result.
- Order Matters: Generally, (fog)(x) is not equal to (gof)(x).
- Domain Requirement: The range of the inner function must fit inside the domain of the outer function.
Examples
- Example 1: Let f(x) = x + 2 and g(x) = 3x. Then (fog)(x) = f(g(x)) = f(3x) = 3x + 2.
- Example 2: Let f(x) = x squared and g(x) = x + 1. Then (fog)(x) = (x + 1) squared.
Real-Life Uses
- Currency Conversion Software: Imagine function g converts US Dollars to Euros, and function f converts Euros to Japanese Yen. To convert US Dollars directly to Yen, your banking app runs a composite function (f o g)(x).
- Computer Graphics Rendering: Rotating an object in a 3D video game and then scaling its size uses composite transformation matrices running frame by frame.
Common Misconceptions & Corrections
Misconception: Writing (fog)(x) as f(x) multiplied by g(x).
Correction: Composition is substitution, not multiplication! You are plugging the entire rule of g into the variable slot of f.
5. Inverse of a Function
📘 Learn this topic
Definition
The inverse of a function undoes whatever the original function did. If a function takes you from point A to point B, its inverse takes you right back from point B to point A.
Standard Definitions:
1. "Let f be a bijective function from A to B. An inverse function f inverse is a function from B to A such that if f(x) = y, then f inverse(y) = x." - Modern Mathematical Text.
2. "Inversion reflects a function across the line y = x, swapping the roles of independent and dependent variables." - Calculus Fundamentals.
Explanation
- Only bijective (one-to-one and onto) functions have inverses.
- Domain of f becomes the range of f inverse, and vice versa.
- Graphically, the inverse is a reflection across the line y = x.
Examples
- Example 1: If f(x) = x + 5, the inverse is f inverse(x) = x - 5.
- Example 2: If f(x) = 3x, the inverse is f inverse(x) = x / 3.
Real-Life Uses
- Temperature Conversion: Converting Celsius to Fahrenheit is a function C = (5/9)(F - 32). The inverse function lets meteorologists convert Fahrenheit back to Celsius seamlessly.
- GPS Navigation & Reverse Geocoding: Taking latitude and longitude coordinates and translating them back into a street address relies on inverse lookup algorithms in mapping databases.
6. Binary Operations
📘 Learn this topic
Definition
A binary operation is a rule that combines two elements from a set to produce a third element within the same set.
Standard Definitions:
1. "A binary operation on a set A is a mapping from A cross A into A." - Abstract Algebra Manual.
2. "An operation is closed over a set if performing the operation on elements of the set always yields an element belonging to that same set." - Algebraic Structures Guide.
Explanation
- Closure: The result must stay inside the set.
- Commutative: a * b = b * a (like ordinary addition).
- Associative: (a * b) * c = a * (b * c).
- Identity Element: An element 'e' where a * e = a.
- Inverse Element: An element where operating it with a gives the identity.
Examples
- Example 1: Addition on natural numbers is a binary operation.
- Example 2: Matrix multiplication on square matrices of the same size.
Real-Life Uses
- Digital Logic Gates: In computer processors, binary operations like AND, OR, and XOR combine binary states (0 and 1) to execute CPU calculations.
- E-commerce Basket Calculations: Combining item prices using shopping cart rules is modeled through binary operations on monetary values.
7. Inverse Trigonometric Functions
📘 Learn this topic
Definition
Trigonometric functions take an angle and give us a ratio. Inverse trigonometric functions do the reverse: they take a ratio and give us the corresponding angle.
Standard Definitions:
1. "Inverse trigonometric functions are the inverses of the restricted trigonometric functions, designed to be bijective over specific principal value branches." - Trigonometry Essentials.
2. "These functions allow mathematicians to calculate unknown angles in right-angled and non-right-angled triangles given side lengths." - Geometric Analysis.
Explanation
Normally, if you know an angle is 30 degrees, you find sin(30) = 0.5. But what if you are an architect and you know the side lengths give a ratio of 0.5, and you need to find out what angle to cut your beam at? That is when you use arcsin(0.5) to get 30 degrees.
Domain, Range, and Graphs Table
| Function | Domain | Principal Range (Branch) |
|---|---|---|
| y = sin inverse(x) | [-1, 1] | [-pi/2, pi/2] |
| y = cos inverse(x) | [-1, 1] | [0, pi] |
| y = tan inverse(x) | (-infinity, infinity) | (-pi/2, pi/2) |
| y = cosec inverse(x) | (-infinity, -1] U [1, infinity) | [-pi/2, pi/2] excluding 0 |
| y = sec inverse(x) | (-infinity, -1] U [1, infinity) | [0, pi] excluding pi/2 |
| y = cot inverse(x) | (-infinity, infinity) | (0, pi) |
Elementary Properties
- sin inverse(-x) = -sin inverse(x)
- cos inverse(-x) = pi - cos inverse(x)
- tan inverse(x) + cot inverse(x) = pi/2 for all x in R
Real-Life Uses
- Robotics and Robotic Arms: Calculating joint angles for robotic welding arms based on target coordinates uses inverse trigonometric functions.
- Video Game Physics: Calculating pitch and yaw angles for player view movement in 3D game engines uses arctan functions.
8. Numerical Problems with Step-by-Step Solutions
📘 Learn this topic
Problem 1
Question: Check whether the relation R on the set of real numbers R defined by R = {(a, b) : a <= b squared} is reflexive, symmetric, or transitive.
Solution:
Step 1: Check Reflexivity.
We need to check if a <= a squared for all real numbers a.
Let a = 0.5. Then 0.5 squared = 0.25. Is 0.5 <= 0.25? No!
Therefore, the relation is not reflexive.
Step 2: Check Symmetry.
If a <= b squared, does b <= a squared?
Let a = 1 and b = 2.
1 <= 2 squared (1 <= 4) is true.
Now check reverse: does 2 <= 1 squared (2 <= 1)? False!
Therefore, the relation is not symmetric.
Step 3: Check Transitivity.
If a <= b squared and b <= c squared, does a <= c squared?
Let a = 2, b = -2, c = 1.
2 <= (-2) squared (2 <= 4) is true.
-2 <= 1 squared (-2 <= 1) is true.
Check a and c: 2 <= 1 squared (2 <= 1)? False!
Therefore, the relation is not transitive.
Conclusion: The relation R is neither reflexive, symmetric, nor transitive.
Problem 2
Question: Find the inverse of the function f(x) = (4x + 3) / (6x - 4), where x is not equal to 2/3.
Solution:
Step 1: Replace f(x) with y.
y = (4x + 3) / (6x - 4)
Step 2: Swap x and y to find the inverse formula.
x = (4y + 3) / (6y - 4)
Step 3: Solve for y in terms of x.
x(6y - 4) = 4y + 3
6xy - 4x = 4y + 3
6xy - 4y = 4x + 3
y(6x - 4) = 4x + 3
y = (4x + 3) / (6x - 4)
Conclusion: f inverse(x) = (4x + 3) / (6x - 4). (This function is its own inverse, known as an involution!)
9. Comprehensive Case Study
📘 Learn this topic
Title: Designing Secure Access Control for Cloud Infrastructure
Background:
At Apex Cloud Solutions, lead systems architect Sarah was tasked with building an internal identity and access management (IAM) dashboard for over five thousand enterprise employees. The system needed to map employees securely to assigned workstations, cloud repository servers, and specific database permission levels without any security overlap or privilege escalation vulnerabilities.
Application of Relations:
Sarah started by defining employee access using formal relations. Let set E be the set of all employees and set S be the set of cloud servers. She established a relation R where (e, s) means employee e has administrative access to server s. To ensure compliance audits passed, Sarah verified whether the authorization relation was reflexive, symmetric, or transitive. She noted that administrative privileges must be transitive: if senior engineer Alex manages tech lead Ben, and tech lead Ben manages junior developer Chris, permission policies required careful boundary checks so that transitive access did not inadvertently expose master root servers to junior staff.
Application of Functions and Inverses:
Next, Sarah looked at user credential mapping. Each employee was assigned a unique badge identification number mapped through function F from employees to badge IDs. To prevent fraud, F had to be a one-to-one (injective) and onto (surjective) bijection. When employees clocked in, badge scanners executed the inverse function F inverse to retrieve employee records instantly from the database. Because the mapping was bijective, there was never a collision where two different employees shared the same badge record.
Composite Workflows:
For automated provisioning, Sarah used composite functions. When a new hire joined, onboarding script G assigned their department role, and provisioning script F assigned their hardware permissions. The complete automated onboarding pipeline was modeled as the composite function (F o G)(new_hire), which took raw HR candidate records and directly outputted fully configured workstation credentials across global company hubs.
Outcome:
By applying rigorous mathematical principles of relations, bijections, and composite mappings, Apex Cloud Solutions successfully deployed an unbreachable access control framework, passing all international security audits with zero downtime.
Multiple Choice Questions
📝 Practice MCQs
-
Let A = {1, 2, 3}. Number of equivalence relations containing (1, 1) and (2, 2) is:
A) 1
B) 2
C) 3
D) 4
Answer: B
Explanation: To be an equivalence relation containing (1,1) and (2,2), we must include reflexivity elements (3,3). Depending on whether we add symmetric pairs like (1,2) and (2,1), exactly 2 valid equivalence relations can be formed. -
The function f: R -> R defined by f(x) = x cubed is:
A) One-to-one and onto
B) One-to-one but not onto
C) Onto but not one-to-one
D) Neither one-to-one nor onto
Answer: A
Explanation: Cubic functions produce unique outputs for unique inputs (one-to-one) and cover every real number from negative to positive infinity (onto). Thus, it is bijective. -
If f(x) = 3x + 4 and g(x) = x - 2, what is (fog)(5)?
A) 13
B) 15
C) 19
D) 21
Answer: A
Explanation: First evaluate g(5) = 5 - 2 = 3. Then evaluate f(3) = 3(3) + 4 = 9 + 4 = 13. -
The principal value branch of cos inverse(x) is:
A) [-pi/2, pi/2]
B) (0, pi)
C) [0, pi]
D) [-pi/2, pi/2] excluding 0
Answer: C
Explanation: By definition, the restricted range for inverse cosine to ensure uniqueness is closed interval from 0 to pi radians. -
Which of the following relations on set {1, 2, 3} is symmetric?
A) {(1,1), (2,2), (1,2)}
B) {(1,2), (2,1), (2,3)}
C) {(1,2), (2,1), (1,3), (3,1)}
D) {(1,1), (2,3), (3,2), (1,3)}
Answer: C
Explanation: Symmetry requires that if (a,b) is present, (b,a) must also be present. In option C, both (1,2),(2,1) and (1,3),(3,1) pairs exist. -
If f: R -> R is defined by f(x) = x squared + 1, then f inverse(10) is:
A) {3, -3}
B) 3
C) -3
D) Does not exist
Answer: D
Explanation: The function f(x) = x squared + 1 is not one-to-one (since both 3 and -3 map to 10), so it is not invertible over the real numbers. -
What is the value of tan(tan inverse(5))?
A) 1
B) 0
C) 5
D) Undefined
Answer: C
Explanation: The composition of a function with its inverse returns the original input, provided the input lies within the domain. Here, 5 is in the domain of tan inverse. -
A relation R on set A is called reflexive if:
A) (a, b) in R implies (b, a) in R
B) (a, a) in R for all a in A
C) (a, b) and (b, c) in R implies (a, c) in R
D) (a, b) in R implies a = b
Answer: B
Explanation: Reflexivity means every element relates to itself. -
The domain of sin inverse(2x) is:
A) [-1, 1]
B) [-1/2, 1/2]
C) [0, 1]
D) [-2, 2]
Answer: B
Explanation: The argument of arcsin must lie between -1 and 1. So -1 <= 2x <= 1, which means -1/2 <= x <= 1/2. -
If a binary operation * on Z is defined by a * b = a + b - 3, find the identity element.
A) 0
B) 3
C) -3
D) 1
Answer: B
Explanation: Let e be the identity element such that a * e = a. Then a + e - 3 = a, which simplifies to e - 3 = 0, giving e = 3.
Exam-Oriented Questions with Answers
📊 Important Questions
-
Q1. Show that the relation R in the set A = {1, 2, 3, 4, 5} given by R = {(a, b) : absolute value of (a - b) is even} is an equivalence relation.
Answer:- Reflexivity: For any a in A, absolute value of (a - a) = 0, which is even. So (a, a) is in R.
- Symmetry: If (a, b) in R, absolute value of (a - b) is even, which means absolute value of (b - a) is also even. So (b, a) is in R.
- Transitivity: If (a, b) and (b, c) are in R, then (a - b) is even and (b - c) is even. The sum of two even numbers is even, so (a - c) is even, meaning (a, c) is in R. Thus, R is an equivalence relation.
-
Q2. Prove that the function f: R -> R defined by f(x) = 2x + 3 is invertible and find its inverse.
Answer:- Injectivity: Let f(x1) = f(x2). Then 2x1 + 3 = 2x2 + 3, which gives 2x1 = 2x2, so x1 = x2. (One-to-one)
- Surjectivity: Let y be any real number in codomain. Then y = 2x + 3 gives x = (y - 3) / 2, which is a valid real number for any y. (Onto)
- Inverse: Replacing variables gives f inverse(x) = (x - 3) / 2.
-
Q3. Evaluate: sin(pi/3 - sin inverse(-1/2)).
Answer:- We know sin inverse(-1/2) = -pi/6.
- Expression becomes sin(pi/3 - (-pi/6)) = sin(pi/3 + pi/6) = sin(pi/2) = 1.
-
Q4. If f(x) = (4x + 3) / (3x - 4), show that (fof)(x) = x for all x not equal to 4/3.
Answer:- (fof)(x) = f(f(x)) = f((4x + 3) / (3x - 4)).
- Substitute into rule: [4((4x + 3) / (3x - 4)) + 3] / [3((4x + 3) / (3x - 4)) - 4].
- Simplify numerators and denominators by multiplying through by (3x - 4), yielding (16x + 12 + 9x - 12) / (12x + 9 - 12x + 16) = 25x / 25 = x. Proved!
-
Q5. Prove that tan inverse(1/2) + tan inverse(1/3) = pi/4.
Answer:- Use identity: tan inverse(x) + tan inverse(y) = tan inverse((x + y) / (1 - xy)).
- Substitute x = 1/2 and y = 1/3: tan inverse((1/2 + 1/3) / (1 - (1/2)(1/3))) = tan inverse((5/6) / (5/6)) = tan inverse(1) = pi/4.
-
Q6. Let f: N -> N be defined by f(n) = n + 1 if n is odd, and f(n) = n - 1 if n is even. Show that f is invertible.
Answer:- Check one-to-one and onto. If n is odd, n+1 is even. If n is even, n-1 is odd. Every odd number maps uniquely to an even number and vice versa. The function is its own inverse, making it bijective and invertible.
-
Q7. Find the domain of the function f(x) = sin inverse(x - 3).
Answer:- For arcsin, the input must lie between -1 and 1.
- So -1 <= x - 3 <= 1.
- Adding 3 to all parts gives 2 <= x <= 4. Domain is [2, 4].
-
Q8. Give an example of a relation which is symmetric and transitive, but not reflexive.
Answer:- Let A = {1, 2}. Let R = {(1, 1)}.
- It is symmetric and transitive trivially, but not reflexive because (2, 2) is missing from R.
-
Q9. Prove that 2 tan inverse(1/2) + tan inverse(1/7) = tan inverse(31/17).
Answer:- First use 2 tan inverse(x) = tan inverse(2x / (1 - x squared)). For x = 1/2, this gives tan inverse(4/3).
- Now add tan inverse(1/7): tan inverse(4/3) + tan inverse(1/7) = tan inverse((4/3 + 1/7) / (1 - 4/21)) = tan inverse(31/17). Proved!
-
Q10. If A = {1, 2, 3}, find the total number of reflexive relations on set A.
Answer:- A set with 3 elements has 9 diagonal elements (a, a) and 6 off-diagonal elements. For a relation to be reflexive, all 3 diagonal elements must be present. The remaining 6 pairs can either be in the relation or not. Thus, total reflexive relations = 2 raised to the power of 6 = 64.