Overview
This chapter introduces Relations and Functions — fundamental language and tools of modern mathematics. Beginning with ordered pairs and Cartesian products, it defines relations on sets and classifies them (reflexive, symmetric, transitive) including equivalence relations and the connection with partitions. It then develops the concept of a function (mapping) with domain, codomain and range, and treats types of functions (one-one, onto, bijection), composition and inverse of functions, identity maps and basic binary operations. Understanding these ideas is essential for algebra, calculus and discrete mathematics because they provide the framework for describing, comparing and transforming mathematical objects. By the end of the chapter students will be able to identify and test relations, work with equivalence classes, recognize and construct various kinds of functions, compute compositions and inverses, and apply these concepts to solve problems and model simple situations.
Learning Objectives
- Define relation and function and distinguish between them with examples
- State domain, codomain and range of a function and determine them for given functions
- Represent relations and functions by ordered pairs, mapping diagrams, matrices and graphs
- Classify relations as reflexive, symmetric and transitive; determine whether a relation is an equivalence relation and find its equivalence classes
- Test whether a given correspondence is a function and verify injective, surjective and bijective properties
- Find inverse of a bijective function algebraically and graphically and verify f(f^{-1}(x)) = x
- Compose two functions, determine the domain and range of the composite and evaluate composite functions for given inputs
- Apply the vertical line test to decide if a graph represents a function and sketch graphs of basic functions (linear, polynomial, rational, modulus)
Topics in this chapter
2 topics · tap a topic title to jump straight to it.
Relations
Relations
Key Point: |A × B| = |A| · |B| (size of Cartesian product).
Definition: If A and B are two sets, their Cartesian product A × B is the set of all ordered pairs (a,b) with a ∈ A and b ∈ B. A relation R from A to B is any subset of A × B. We write R ⊆ A×B and (a,b) ∈ R to mean "a is related to b" under R.
Basic terms:
- Domain of R: Dom(R) = {a ∈ A | ∃b ∈ B with (a,b) ∈ R}.
- Range (or image) of R: Range(R) = {b ∈ B | ∃a ∈ A with (a,b) ∈ R}.
- Inverse relation: R-1 = {(b,a) | (a,b) ∈ R} (a relation from B to A).
- Composition: If R ⊆ A×B and S ⊆ B×C, then S ∘ R = {(a,c) | ∃b ∈ B with (a,b) ∈ R and (b,c) ∈ S}.
Special relations on a set A (binary relations on A) — properties:
- Reflexive: ∀a ∈ A, (a,a) ∈ R.
- Irreflexive: ∀a ∈ A, (a,a) ∉ R.
- Symmetric: if (a,b) ∈ R then (b,a) ∈ R.
- Antisymmetric: if (a,b) ∈ R and (b,a) ∈ R then a = b.
- Transitive: if (a,b) ∈ R and (b,c) ∈ R then (a,c) ∈ R.
Important classes:
- Equivalence relation: reflexive, symmetric and transitive. Equivalence relations partition A into disjoint equivalence classes.
- Partial order: reflexive, antisymmetric and transitive (example: ≤ on numbers, divisibility on integers).
Representations: Relations can be shown as (i) a set of ordered pairs, (ii) a directed graph (digraph) with vertices as elements and arrows for pairs, (iii) a 0–1 adjacency matrix (rows for elements of A, columns for elements of B), (iv) mapping/arrow diagram.
Why relations matter: Relations generalize functions and express connections between two collections — e.g., "is friend of", "is greater than", "divides". Understanding relations is the foundation for functions, equivalence classes, and order structures that appear throughout mathematics and applications.
- Example 1 (small set): Let A = {1,2,3}, B = {a,b}. A×B = {(1,a),(1,b),(2,a),(2,b),(3,a),(3,b)}. A relation R from A to B could be R = {(1,a),(2,b)}. Dom(R) = {1,2}, Range(R) = {a,b}.
- Example 2 (friendship): On set of people P, define R = "is friend of". Typically R is symmetric (if A friends B then B friends A) but not necessarily reflexive or transitive.
- Example 3 (divisibility): On natural numbers, define R = "a divides b" (a | b). This relation is reflexive (a|a), antisymmetric (if a|b and b|a then a=b for positives), and transitive — so it is a partial order.
- Example 4 (same age): On students, R = "has same age as" is reflexive, symmetric and transitive — an equivalence relation. It partitions students into age-classes.
- Example 5 (parent-child): On set of people, R = "is parent of". This is antisymmetric in the sense that if A is parent of B, B cannot be parent of A; it is not reflexive and not transitive in general (grandparent relation is composition).
- \[|A × B| = |A| · |B| (size of Cartesian product).\]
- \[Number of possible relations from A to B = 2^{|A|·|B|} (each pair may be in or out).\]
- \[If A has n elements\]\[number of binary relations on A = 2^{n^2}.\]
- \[Number of reflexive relations on an n-element set = 2^{n^2 - n} (diagonal pairs fixed).\]
- \[Number of symmetric relations on an n-element set = 2^{n + n(n-1)/2} (each diagonal pair: 2 choices\]\[each unordered off-diagonal pair: 2 choices).\]
- \[Number of antisymmetric relations on an n-element set = 2^n · 3^{n(n-1)/2} (each diagonal: 2 choices\]\[each unordered off-diagonal pair has 3 choices: neither\]\[one direction\]\[or the other).\]
Functions
Functions
Key Point: Function notation: f: A → B, f(x) ∈ B for each x ∈ A
Definition: A function (or map) f from a set A to a set B, written f: A → B, is a rule that assigns to every element x in A exactly one element f(x) in B. A is the domain, B the codomain, and the set of actual outputs {f(x): x ∈ A} is the range (or image).
Notation and basic concepts: For x ∈ A, f(x) is called the image of x. If y = f(x), then x is a preimage of y. Two functions f and g are equal if they have the same domain and f(x) = g(x) for all x in the domain.
Types of functions: (i) Injective (one–one): distinct inputs give distinct outputs. (ii) Surjective (onto): range = codomain. (iii) Bijective: both injective and surjective; bijections have inverses. (iv) Constant functions, identity function I(x)=x, polynomial, rational, exponential, logarithmic, trigonometric, piecewise functions, etc.
Operations on functions: Given f and g with same domain, (f+g)(x)=f(x)+g(x), (f g)(x)=f(x) g(x), (f/g)(x)=f(x)/g(x) (where denominator ≠ 0). Scalar multiple: (c f)(x)=c·f(x).
Composite and inverse: The composite g ∘ f maps x to g(f(x)). Domain of g ∘ f consists of x in domain(f) for which f(x) is in domain(g). An inverse function f^{-1} exists only for bijections and satisfies f^{-1}(f(x))=x for all x in domain(f) and f(f^{-1}(y))=y for all y in range(f). To find inverse algebraically: set y=f(x), solve for x in terms of y, then swap x and y.
Graphs and tests: A function f: R→R can be represented by its graph {(x,f(x))}. Vertical line test: a curve in the plane is the graph of a function if and only if every vertical line meets it at most once. Horizontal line test: a function is injective (hence invertible on its image) if every horizontal line meets the graph at most once.
Domain restrictions: Arise from denominators (≠0), even roots (argument ≥ 0 for real-valued square root), and logarithms (argument > 0). Always specify domain before finding range or inverse.
- Temperature conversion: f(C)= (9/5)C + 32 maps Celsius to Fahrenheit. This is bijective on R; inverse is C = (5/9)(F − 32).
- Vending machine: input = coin code, output = selected snack. If each code selects exactly one snack, this is a function from codes to snacks. It may not be injective (different codes could give same snack) or surjective (some snacks unavailable by code).
- Employee database: f(ID) = employee name. Usually injective (distinct IDs), but not onto if codomain lists names not employed.
- Cost function: C(q) = p·q + F (price per unit p, fixed cost F) maps quantity q to cost. Domain typically q ≥ 0.
- Reciprocal function: f(x)=1/x with domain R \ {0}. Graph has two branches; not defined at x=0, not continuous across 0.
- Sign (step) function: s(x)= {−1 if x<0, 0 if x=0, 1 if x>0} is a piecewise function; many real systems use piecewise rules (e.g., tax slabs).
- \[Function notation: f: A → B\]\[f(x) ∈ B for each x ∈ A\]
- \[Image (range): Im(f) = {y ∈ B | ∃x ∈ A\]\[y = f(x)}\]
- \[Operations: (f+g)(x)=f(x)+g(x)\]\[(f·g)(x)=f(x)g(x)\]\[(f/g)(x)=f(x)/g(x) where g(x)≠0\]
- \[Composite: (g ∘ f)(x) = g(f(x))\]\[Domain(g∘f) = {x ∈ Domain(f) | f(x) ∈ Domain(g)}\]
- \[Inverse (if bijective): f^{-1}(f(x)) = x and f(f^{-1}(y)) = y\]\[to find inverse: set y=f(x)\]\[solve x in terms of y\]\[then swap x↔y\]
- \[Linear inverse example: if f(x)=mx + c (m≠0) then f^{-1}(x) = (x − c)/m\]
Key Concepts
- Relation
- A relation R from set A to set B is any subset of the Cartesian product A × B (a set of ordered pairs).
- Domain
- The domain of a relation or function is the set of all first components (inputs) of its ordered pairs.
- Codomain
- The codomain is the set in which all outputs of a relation or function are considered to lie (the target set).
- Range (Image)
- The range (image) of a relation or function is the set of actual outputs — the set of second components that appear.
- Cartesian Product
- The Cartesian product A × B is the set of all ordered pairs (a,b) with a∈A and b∈B.
- Binary Relation
- A binary relation on sets A and B is any subset of A × B; if A = B it is a relation on A.
- Reflexive Relation
- A relation R on A is reflexive if (x,x) ∈ R for every x ∈ A.
- Symmetric Relation
- R on A is symmetric if whenever (x,y) ∈ R then (y,x) ∈ R for all x,y ∈ A.
- Transitive Relation
- R on A is transitive if whenever (x,y) ∈ R and (y,z) ∈ R then (x,z) ∈ R for all x,y,z ∈ A.
- Equivalence Relation
- An equivalence relation on A is a relation that is reflexive, symmetric and transitive.
- Partial Order
- A partial order on A is a relation that is reflexive, antisymmetric and transitive.
- Function (Mapping)
- A function f from A to B is a relation in which each element of A is related to exactly one element of B.
- Well-defined Function
- A rule defines a well-defined function if every input has a single, unambiguous output (independent of representation).
- Injective (One-one)
- A function f:A→B is injective if different inputs map to different outputs: f(x1)=f(x2) implies x1=x2.
- Surjective (Onto)
- f:A→B is surjective if every element of B is the image of at least one element of A.
- Bijective
- A function that is both injective and surjective; it establishes a one-to-one correspondence between A and B.
- Composition of Functions
- If f:A→B and g:B→C, the composition g∘f is the function A→C defined by (g∘f)(x)=g(f(x)).
- Inverse Function
- For a bijective f:A→B, the inverse f^{-1}:B→A satisfies f^{-1}(f(x))=x and f(f^{-1}(y))=y.
- Identity Function
- The identity function id_A on A maps each element to itself: id_A(x)=x for all x∈A.
- Constant Function
- A function that maps every element of the domain to the same single element of the codomain.
Practice Questions
-
Define a relation from set A to set B and state how many relations are possible if |A| = 2 and |B| = 3. / समुच्चय A से समुच्चय B तक एक संबंध को परिभाषित कीजिए और बताइए कि यदि |A| = 2 और |B| = 3 हो तो कितने संबंध संभव हैं।
Show answer
A relation R from A to B is any subset of the Cartesian product A × B. Since |A × B| = 2 × 3 = 6, the number of relations is 2^6 = 64. / A से B तक संबंध R, कार्तीय गुणनफल A × B का कोई भी उपसमुच्चय है। चूँकि |A × B| = 2 × 3 = 6, संबंधों की संख्या 2^6 = 64 है।
-
Distinguish between the codomain and the range of a function with an example. / एक फलन के सहप्रांत और परिसर के बीच एक उदाहरण के साथ अंतर बताइए।
Show answer
The codomain is the target set in which outputs are considered to lie, while the range is the set of actual outputs. For f: R → R, f(x) = x², the codomain is R but the range is [0, ∞). / सहप्रांत वह लक्ष्य समुच्चय है जिसमें निर्गत माने जाते हैं, जबकि परिसर वास्तविक निर्गतों का समुच्चय है। f: R → R, f(x) = x² के लिए सहप्रांत R है परंतु परिसर [0, ∞) है।
-
Show that the relation 'has the same age as' on a set of students is an equivalence relation. / छात्रों के एक समुच्चय पर 'समान आयु का है' संबंध को तुल्यता संबंध सिद्ध कीजिए।
Show answer
It is reflexive (everyone has the same age as themselves), symmetric (if A has B's age then B has A's age), and transitive (if A=B in age and B=C in age then A=C). Being reflexive, symmetric and transitive, it is an equivalence relation. / यह स्वतुल्य है (हर कोई अपनी ही आयु का है), सममित है (यदि A की आयु B जैसी है तो B की A जैसी), और संक्रमणीय है (यदि A=B और B=C आयु में तो A=C)। स्वतुल्य, सममित और संक्रमणीय होने से यह तुल्यता संबंध है।
-
Test whether f: R → R defined by f(x) = 2x + 3 is injective and surjective. / जाँचिए कि f: R → R, f(x) = 2x + 3 द्वारा परिभाषित फलन एकैकी और आच्छादक है या नहीं।
Show answer
If f(x₁) = f(x₂) then 2x₁+3 = 2x₂+3 gives x₁ = x₂, so it is injective. For any y ∈ R, x = (y−3)/2 gives f(x) = y, so it is surjective; hence it is bijective. / यदि f(x₁) = f(x₂) तो 2x₁+3 = 2x₂+3 से x₁ = x₂, अतः यह एकैकी है। किसी भी y ∈ R के लिए x = (y−3)/2 से f(x) = y, अतः यह आच्छादक है; इसलिए यह एकैकी आच्छादक है।
-
Find the inverse of the bijective function f(x) = 3x − 5. / एकैकी आच्छादक फलन f(x) = 3x − 5 का प्रतिलोम ज्ञात कीजिए।
Show answer
Let y = 3x − 5, solve for x: x = (y + 5)/3, then swap to get f⁻¹(x) = (x + 5)/3. / मान लीजिए y = 3x − 5, x के लिए हल करें: x = (y + 5)/3, फिर बदलकर f⁻¹(x) = (x + 5)/3।
-
If f(x) = x + 1 and g(x) = 2x, find (g ∘ f)(3) and (f ∘ g)(3). / यदि f(x) = x + 1 और g(x) = 2x, तो (g ∘ f)(3) और (f ∘ g)(3) ज्ञात कीजिए।
Show answer
(g ∘ f)(3) = g(f(3)) = g(4) = 8; (f ∘ g)(3) = f(g(3)) = f(6) = 7. They differ, showing composition is not commutative. / (g ∘ f)(3) = g(f(3)) = g(4) = 8; (f ∘ g)(3) = f(g(3)) = f(6) = 7। ये भिन्न हैं, जो दर्शाता है कि संयोजन क्रमविनिमेय नहीं है।
-
Explain the vertical line test and use it to decide whether the circle x² + y² = 1 is a function. / ऊर्ध्वाधर रेखा परीक्षण समझाइए और इसका उपयोग करके तय कीजिए कि वृत्त x² + y² = 1 एक फलन है या नहीं।
Show answer
By the vertical line test, a curve represents a function if every vertical line meets it at most once. A vertical line through x = 0 meets the circle at (0,1) and (0,−1), so the circle is not a function. / ऊर्ध्वाधर रेखा परीक्षण के अनुसार, कोई वक्र फलन है यदि प्रत्येक ऊर्ध्वाधर रेखा उसे अधिकतम एक बार काटती है। x = 0 पर ऊर्ध्वाधर रेखा वृत्त को (0,1) और (0,−1) पर काटती है, अतः वृत्त फलन नहीं है।
-
State the difference between a reflexive relation and a symmetric relation on a set A. / समुच्चय A पर स्वतुल्य संबंध और सममित संबंध के बीच अंतर बताइए।
Show answer
A relation is reflexive if (a, a) ∈ R for every a ∈ A, while it is symmetric if (a, b) ∈ R implies (b, a) ∈ R for all a, b ∈ A. Reflexivity concerns each element with itself; symmetry concerns ordered pairs both ways. / संबंध स्वतुल्य है यदि प्रत्येक a ∈ A के लिए (a, a) ∈ R, जबकि सममित है यदि (a, b) ∈ R से (b, a) ∈ R सभी a, b ∈ A के लिए। स्वतुल्यता प्रत्येक अवयव का स्वयं से संबंध है; सममितता क्रमित युग्मों का दोनों दिशाओं में संबंध है।
Related Laws & Principles
Explore allFoundational laws & principles connected to this chapter — tap to open in the Laws Explorer.