Advanced Lecture Notes on Functions Part 1:
The Formal Language of Mappings
For the Serious Aspirant
Contents
1 A Note to the Aspirant 1
2 Sets: A Rigorous Recapitulation 1
2.1 Operations on Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
3 The Cartesian Product: Building the Space for Relations 2
4 Relations: The Precursor to Functions 3
5 Functions: A Special Kind of Relation 4
6 Problems for the Adept: Part 1 5
7 Answer Key 8
Part 1: The Formal Language of Mappings Advanced Functions
1 A Note to the Aspirant
These notes are not intended as a first introduction to functions. They are designed for students
who have a solid grasp of the JEE Mains syllabus and are aiming for mastery at the Advanced level
and beyond. A casual understanding of a function as a ”rule” or a ”machine” is insufficient for the
problems you will face. True mastery comes from understanding a function for what it is: a specific,
well-behaved construct in the language of sets.
Our approach will be grounded in rigor. We will build concepts from the ground up, starting with
sets and relations. This is not a mere academic exercise; a deep, formal understanding provides the
clarity and flexibility needed to deconstruct novel and complex problems. We will prove key results that
are often taken for granted and explore the nuances that separate a good student from a top-ranker.
Prepare to be challenged.
2 Sets: A Rigorous Recapitulation
All of mathematics is built upon the foundation of set theory. We briefly formalize the key concepts.
Definition 2.1. Set
A set is a well-defined collection of distinct objects, considered as an object in its own right.
The objects that make up the set are called its elements or members.
Remark 2.1. Notation
• If an object x is an element of a set A, we write x ∈ A.
• If A and B are sets such that every element of A is also an element of B, we say A is a
subset of B, denoted A ⊆ B.
• If A ⊆ B and A ̸= B, we say A is a proper subset of B, denoted A ⊂ B.
• Two sets A and B are equal, A = B, if and only if A ⊆ B and B ⊆ A.
• The set with no elements is the empty set, denoted by ∅.
For the Curious
The phrase ”well-defined” in the definition of a set is of profound importance. In the early 20th
century, Bertrand Russell discovered a paradox in naive set theory by considering the set of all
sets that do not contain themselves. Let R = {S | S ∈ / S}. He then asked: is R ∈ R?
• If R ∈ R, then by its own definition, R must not contain itself, so R ∈
/ R. A contradiction.
• If R ∈/ R, then it satisfies the condition for being a member of R, so R ∈ R. A
contradiction.
This paradox, known as Russell’s Paradox, led to the development of more rigorous axiomatic
set theories (like ZFC) to prevent such contradictions. This serves as a reminder that even the
most fundamental concepts in mathematics have deep and subtle complexities.
2.1 Operations on Sets
Let A and B be subsets of a universal set U .
1
Part 1: The Formal Language of Mappings Advanced Functions
Definition 2.2. Set Operations
• Union: A ∪ B = {x ∈ U | x ∈ A or x ∈ B}
• Intersection: A ∩ B = {x ∈ U | x ∈ A and x ∈ B}
• Complement: Ac = A′ = U \ A = {x ∈ U | x ∈
/ A}
• Set Difference: A \ B = A − B = {x ∈ U | x ∈ A and x ∈
/ B} = A ∩ B c
• Symmetric Difference: A∆B = (A \ B) ∪ (B \ A) = (A ∪ B) \ (A ∩ B)
Definition 2.3. Power Set
The power set of a set A, denoted P(A), is the set of all subsets of A.
P(A) = {S | S ⊆ A}
If A is a finite set with n elements (denoted |A| = n), then the number of elements in its power
set is |P(A)| = 2n .
Example 2.1. Power Set
If A = {1, 2}, then its subsets are ∅, {1}, {2}, {1, 2}. Therefore, P(A) = {∅, {1}, {2}, {1, 2}}.
We have |A| = 2 and |P(A)| = 22 = 4.
3 The Cartesian Product: Building the Space for Relations
To discuss relationships between elements of two sets, we first need a way to pair them up in an ordered
fashion.
Definition 3.1. Ordered Pair
An ordered pair (a, b) is a pair of objects where one is designated as the first element and the
other as the second. Two ordered pairs (a, b) and (c, d) are equal if and only if a = c and b = d.
Note the crucial difference from a set: in an ordered pair, the order matters ((a, b) ̸= (b, a) if
a ̸= b), whereas for a set, order is irrelevant ({a, b} = {b, a}).
Definition 3.2. Cartesian Product
Let A and B be two sets. The Cartesian Product of A and B, denoted A × B, is the set of
all possible ordered pairs (a, b) where a ∈ A and b ∈ B.
A × B = {(a, b) | a ∈ A, b ∈ B}
2
Part 1: The Formal Language of Mappings Advanced Functions
Remark 3.1. Properties of the Cartesian Product
• In general, A × B ̸= B × A. They are only equal if A = B, or if one or both sets are
empty.
• If |A| = m and |B| = n, then the number of elements in the Cartesian product is
|A × B| = mn.
• The Cartesian product R×R, often denoted R2 , is the set of all points in the 2-dimensional
Cartesian plane.
Example 3.1. A Discrete Product
Let A = {1, 2, 3} and B = {p, q}. Then A × B = {(1, p), (1, q), (2, p), (2, q), (3, p), (3, q)}.
Note that |A| = 3, |B| = 2, and |A × B| = 6.
4 Relations: The Precursor to Functions
Now that we have the space of all possible pairings, a ‘relation‘ is simply a specific selection of those
pairings that share a common property.
Definition 4.1. Relation
A relation R from a set A to a set B is any subset of the Cartesian product A × B.
R⊆A×B
If (a, b) ∈ R, we say that ”a is related to b” and often write this as aRb. A relation from a set
A to itself is called a relation on A.
This definition is powerful in its simplicity. Any collection of ordered pairs is a relation.
Example 4.1. Factor Relation
Let A = {2, 3, 4, 5} and B = {8, 9, 10}. Let R be the relation ”is a factor of” from A to B.
This means aRb if a divides b. We identify the pairs (a, b) ∈ A × B that satisfy this condition:
• 2 is a factor of 8 and 10. =⇒ (2, 8), (2, 10) ∈ R
• 3 is a factor of 9. =⇒ (3, 9) ∈ R
• 4 is a factor of 8. =⇒ (4, 8) ∈ R
• 5 is a factor of 10. =⇒ (5, 10) ∈ R
So, the relation R is the set: R = {(2, 8), (2, 10), (3, 9), (4, 8), (5, 10)}.
3
Part 1: The Formal Language of Mappings Advanced Functions
Definition 4.2. Domain and Range of a Relation
Let R be a relation from A to B.
• The Domain of R is the set of all first components of the ordered pairs in R.
Dom(R) = {a ∈ A | ∃b ∈ B such that (a, b) ∈ R}
• The Range of R is the set of all second components of the ordered pairs in R.
Ran(R) = {b ∈ B | ∃a ∈ A such that (a, b) ∈ R}
Note that Dom(R) ⊆ A and Ran(R) ⊆ B.
For the ‘Factor Relation‘ example above: Dom(R) = {2, 3, 4, 5} = A. Ran(R) = {8, 9, 10} = B.
5 Functions: A Special Kind of Relation
We are now ready to define a function with the precision required for advanced mathematics. A
function is not just a formula; it is a relation with two very specific, restrictive properties.
Definition 5.1. Function
A relation f from a set A to a set B is called a function (or a mapping) if it satisfies the
following two conditions:
1. Existence of Image: Every element in the set A is the first component of at least one
ordered pair in f . Formally:
∀a ∈ A, ∃b ∈ B such that (a, b) ∈ f
This is equivalent to saying that Dom(f ) = A.
2. Uniqueness of Image: No element in the set A is the first component of more than one
ordered pair in f . Formally:
If (a, b1 ) ∈ f and (a, b2 ) ∈ f, then b1 = b2
Remark 5.1. Connecting to Familiar Notation
• The set A is called the Domain of the function f .
• The set B is called the Co-domain of the function f .
• The unique element b ∈ B such that (a, b) ∈ f is called the image of a under f , and we
write b = f (a).
• The Range of f is the set of all images, Ran(f ) = {f (a) | a ∈ A}. It’s crucial to
remember that Ran(f ) ⊆ B. The range and co-domain are not always equal.
• The condition of Uniqueness is the formal statement of the ”Vertical Line Test”. For a
given x, there can be only one y.
Let’s revisit our relations to see why this definition is so important.
4
Part 1: The Formal Language of Mappings Advanced Functions
Example 5.1. Identifying Functions
Let A = {1, 2, 3} and B = {p, q, r}.
• R1 = {(1, p), (2, q), (3, p)}.
– Existence: Dom(R1 ) = {1, 2, 3} = A. (Condition 1 is met)
– Uniqueness: No first element is repeated. (Condition 2 is met)
– Conclusion: R1 is a function. We can write f (1) = p, f (2) = q, f (3) = p.
• R2 = {(1, p), (3, q)}.
– Existence: Dom(R2 ) = {1, 3} ̸= A. The element 2 ∈ A is not mapped to anything.
(Condition 1 fails)
– Conclusion: R2 is not a function from A to B.
• R3 = {(1, p), (2, q), (1, r), (3, p)}.
– Existence: Dom(R3 ) = {1, 2, 3} = A. (Condition 1 is met)
– Uniqueness: The element 1 is mapped to both p and r. Since p ̸= r, this fails
uniqueness. (Condition 2 fails)
– Conclusion: R3 is not a function.
Example 5.2. A Continuous Non-Example
Consider the relation on R defined by R = {(x, y) ∈ R2 | y 2 = x}. Is this a function from
A = [0, ∞) to B = R?
Let’s check the conditions for an element a ∈ A, say a = 4. The pairs in R with first component
4 are (4, 2) and (4, −2), since 22 = 4 and (−2)2 = 4. Since the element 4 from the domain is
mapped to two different elements, 2 and −2, in the co-domain, the Uniqueness condition is
violated. Therefore, the relation y 2 = x does not
√ define a function. √
However, the relation f = {(x, y) ∈ R | y = x} *is* a function, as the symbol · is defined
2
to return only the non-negative square root, ensuring uniqueness. This highlights how a careful
definition is essential.
6 Problems for the Adept: Part 1
The following problems are designed to test your understanding of the formal definitions presented.
An answer key is provided on the final page.
5
Part 1: The Formal Language of Mappings Advanced Functions
Problem 6.1. prob:P1
Let A = {1, 2, 3, 4} and B = {a, b, c}. Which of the following relations from A to B is a
function?
(A) {(1, a), (2, b), (3, c)}
(B) {(1, a), (2, b), (3, c), (4, a), (2, c)}
(C) {(1, b), (2, b), (3, b), (4, b)}
(D) {(a, 1), (b, 2), (c, 3)}
Problem 6.2. prob:P2
Let A be a set with |A| = m and B be a set with |B| = n.
1. What is the total number of relations from A to B?
2. What is the total number of functions from A to B?
Express your answers in terms of m and n.
Problem 6.3. prob:P3
A relation R on the set of integers Z is defined by aRb if and only if a2 = b2 . Which of the
following properties does this relation have?
(I) Reflexive
(II) Symmetric
(III) Transitive
(IV) Is a function
(A) I and II only (B) I, II, and III only (C) II and III only (D) All four
Problem 6.4. prob:P4
Consider the relation f on R given by f = {(x, y) | sin(y) = x}. The domain A and co-domain
B for which this relation can be considered a function f : A → B are: (A) A = R, B = R
(B) A = [−1, 1], B = R
(C) A = [−1, 1], B = [−π/2, π/2]
(D) A = R, B = [−1, 1]
Problem 6.5. prob:P5
{
−1 for − 2 ≤ x ≤ 0
Let f (x) be defined on [−2, 2] as f (x) = . The range of f (x) is:
x − 1 for 0 < x ≤ 2
(A) [−1, 1] (B) [−1, 1) (C) [−1, 1] excluding 0 (D) (−1, 1]
6
Part 1: The Formal Language of Mappings Advanced Functions
Problem 6.6. prob:P6
Let A = {x ∈ Z | 1 ≤ x ≤ 10}. A relation R on A is defined as R = {(x, y) | y =
2x − 1 and y ∈ A}. The number of elements in the range of R is: (A) 10 (B) 9 (C) 5
(D) 4
7
Part 1: The Formal Language of Mappings Advanced Functions
7 Answer Key
Solutions
1. (C).
(A) Not a function because the domain is {1, 2, 3}, which is not all of A (element 4 ∈ A
is not mapped).
(B) Not a function because the element 2 ∈ A maps to both b and c (violates uniqueness).
(D) This is a relation from B to A, not from A to B. Even if considered as such, if
A ̸= B, it’s not directly comparable. If A = B, it would likely fail the existence
criterion for elements of A.
(C) This is a function. Every element of A (1, 2, 3, 4) maps to a unique element in B
(specifically, all map to b).
2. 1. Total Relations: 2mn . A relation is any subset of A × B. The size of A × B is mn.
The number of subsets of a set with k elements is 2k . Therefore, the number of relations
is 2mn .
2. Total Functions: nm . For each of the m elements in A, we must choose exactly
one image from the n available elements in B. Since the choice for each element in A is
independent, the total number of ways is n × n × · · · × n (m times), which is nm .
3. (B).
(I) Reflexive: a2 = a2 is true for all a ∈ Z. So, R is reflexive.
(II) Symmetric: If aRb, then a2 = b2 . This implies b2 = a2 , so bRa. Thus, R is
symmetric.
(III) Transitive: If aRb and bRc, then a2 = b2 and b2 = c2 . This implies a2 = c2 , so aRc.
Thus, R is transitive.
(IV) Is a function: For a = 2 ∈ Z, we have a2 = 4. Both b = 2 and b = −2 satisfy
b2 = 4. So, (2, 2) ∈ R and (2, −2) ∈ R. Since the element 2 from the domain maps
to two different elements 2 and −2, R is not a function.
Thus, R is an equivalence relation (reflexive, symmetric, and transitive) but not a function.
4. (C). For f = {(x, y) | sin(y) = x} to define a function f : A → B, for each x ∈ A, there
must be a unique y ∈ B. The range of the sine function is [−1, 1]. Thus, for sin(y) = x
to have a solution for y, x must be in [−1, 1]. So, A = [−1, 1]. For uniqueness, if we
take B = R, for x = 0, y could be 0, π, 2π, . . . , −π, . . . . To ensure a unique y for
each x ∈ [−1, 1], we restrict B to a principal value interval for arcsine, which is typically
[−π/2, π/2].
5. (A). For −2 ≤ x ≤ 0, f (x) = −1. The set of outputs is {−1}. For 0 < x ≤ 2,
f (x) = x − 1. As x → 0+ , f (x) → −1. At x = 2, f (2) = 2 − 1 = 1. So, for this
interval, the outputs are (−1, 1]. The range of f (x) is the union of these sets of outputs:
{−1} ∪ (−1, 1] = [−1, 1].
6. (C). The domain is A = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}. The relation is R = {(x, y) | y =
2x − 1 and y ∈ A}. We list the images for each x ∈ A and check if y ∈ A:
• x = 1 =⇒ y = 2(1) − 1 = 1 ∈ A. Pair: (1, 1).
8
Part 1: The Formal Language of Mappings Advanced Functions
• x = 2 =⇒ y = 2(2) − 1 = 3 ∈ A. Pair: (2, 3).
• x = 3 =⇒ y = 2(3) − 1 = 5 ∈ A. Pair: (3, 5).
• x = 4 =⇒ y = 2(4) − 1 = 7 ∈ A. Pair: (4, 7).
• x = 5 =⇒ y = 2(5) − 1 = 9 ∈ A. Pair: (5, 9).
• x = 6 =⇒ y = 2(6) − 1 = 11 ∈
/ A.
• For x > 5, y will be greater than 9 and thus not in A.
The pairs in R are {(1, 1), (2, 3), (3, 5), (4, 7), (5, 9)}. The range of R is the set of second
components: {1, 3, 5, 7, 9}. The number of elements in the range is 5.