Relations and Functions | CBSE Class 12 Maths Notes
On this page
This Mathematics note covers relations, empty and universal relations, reflexivity, symmetry, transitivity, equivalence classes, one-one and onto functions, bijections, functions on finite sets, composition, and inverse functions, with worked proofs and calculations.
What is a relation, and how is it represented?
A relation from a set to a set is any subset of their Cartesian product. The first entry of each ordered pair belongs to the first set, and the second entry belongs to the second set.
Definition: A relation from to satisfies . A relation in satisfies . The notation means .
The order of the entries matters. Knowing that one element is related to another does not automatically tell us that the reversed pair belongs to the relation. That extra requirement is the property called symmetry.
How do roster and set-builder forms differ?
The roster form lists the ordered pairs. The set-builder form specifies a condition that the pairs must satisfy. Both describe the same mathematical object when they select exactly the same pairs from the same Cartesian product.
For the set , the rule selects pairs whose second entry is one greater than their first. The stated set remains part of the definition: both entries must belong to it.
- Take the first allowed input: . Then , giving .
- For the next input, , calculate , giving .
- For , calculate , giving .
- For , the rule gives . Since , this pair is excluded. Thus .
A function is a special kind of relation: each element of the domain has exactly one image in the codomain. General relations do not have this restriction. When classifying a relation, first identify its set and the precise membership condition.
What are empty and universal relations?
The empty relation and the universal relation are the two extreme possibilities for a relation in a set. One contains no ordered pairs; the other contains every ordered pair from the Cartesian product of the set with itself.
| Relation | Condition | Meaning |
|---|---|---|
| Empty | No element is related to any element of the set. | |
| Universal | Every element is related to every element of the set. |
These are also called trivial relations. Their classification depends on all possible pairs, rather than on whether the condition looks complicated. A numerical condition may select no pairs or may hold for every pair in the stated set.
Worked example 1. In , classify the relations defined by and by .
- For the first relation, the largest possible difference is obtained from the largest first entry and smallest second entry: .
- The required difference exceeds . No allowed ordered pair can satisfy , so this relation has no elements.
- For the second relation, an absolute value is non-negative. Therefore for every permitted choice of both entries.
- Every pair in belongs to the second relation. No permitted pair needs to be excluded.
Answer: The condition defines the empty relation; defines the universal relation.
Notice that the empty relation is still a relation. Being a relation requires being a subset of the appropriate Cartesian product, and the empty set satisfies that requirement. A rule does not need to produce an ordered pair to define a relation.
How do you test reflexive, symmetric and transitive relations?
The three properties ask different questions about membership of ordered pairs. Test each property separately. Establishing one property does not establish either of the others, and a failed test should identify precisely which required pair is absent.
| Property | Required condition | What to inspect |
|---|---|---|
| Reflexive | for every | Every element must be related to itself. |
| Symmetric | Every included pair must have its reverse. | |
| Transitive | Every two-pair chain must have the required direct pair. |
In the transitivity test, the second entry of the first pair must equal the first entry of the second pair. Pairs with no matching middle element do not form the chain required by the definition.
Worked example 2. Classify in .
- Check all self-pairs: . Every element of the stated set is related to itself, so the relation is reflexive.
- Inspect the included pair . Its reverse , so the symmetry condition fails.
- Use the chain . Transitivity would require .
- Compare that required pair with the complete roster. Since , transitivity fails.
Answer: On , this relation is reflexive, but neither symmetric nor transitive.
A counterexample disproves a universal property. One missing self-pair disproves reflexivity; one missing reverse disproves symmetry; and one chain lacking its direct pair disproves transitivity. Proving a property requires covering every relevant element or pair, not merely finding a successful instance.
Note: Do not assume that a relation must belong to just one category. It can satisfy several properties together, or fail more than one property.
When is a relation an equivalence relation?
An equivalence relation combines all three properties: reflexivity, symmetry and transitivity. A complete proof must explicitly establish each one. The final conclusion follows only after all three tests succeed on the same underlying set.
How does congruence illustrate equivalence?
Consider the relation of congruence on the set of all triangles in a plane. The elements being related are whole triangles. The relation asks whether the first triangle is congruent to the second, rather than comparing their names or positions.
- Every triangle is congruent to itself: . Hence the relation is reflexive.
- If , then . Hence the relation is symmetric.
- If and , then . Hence the relation is transitive.
- All three conditions hold, so congruence defines an equivalence relation on the set of triangles.
Worked example 3. Prove that is an equivalence relation. Here denotes the set of all integers, and means that is divisible by .
- For any integer , calculate . Thus , proving reflexivity.
- Suppose . Write for an integer . Reversing the difference gives , so .
- Suppose also . Write for an integer . Add the two differences:
- Because , the last difference is divisible by . Hence , establishing transitivity.
Answer: Divisibility of the difference by defines a reflexive, symmetric and transitive relation, so it is an equivalence relation.
The algebra explains why the proof works for arbitrary integers. Checking a few even or odd numbers would illustrate the relation, but would not replace the argument for every permitted pair and every chain of related elements.
How do equivalence classes divide a set?
An equivalence class containing an element consists of all elements related to it. For the integer relation defined by an even difference, the class containing zero consists of all even integers, while the class containing one consists of all odd integers.
These classes are mutually disjoint, and together they cover the integers. Elements within either class are related to one another. No element in the even class is related to an element in the odd class.
Property: Equivalence classes form a partition
An equivalence relation divides its set into classes with three features: members of the same class are related, members of different classes are not related, and every element of the original set belongs to a class. This division is a partition.
Using the even-difference relation, its classes can be written as and . For every integer , the same two classes are also represented by and , respectively. Different representatives can therefore name the same class.
Worked example 4. In , relate two elements when both are odd or both are even. Establish equivalence and identify the groups.
- Every element has the same parity as itself, so for every . The relation is reflexive.
- If and have the same parity, exchanging their order preserves that fact. Thus .
- If and have the same parity, and and have the same parity, then all three have the same parity. Thus .
- The odd members form , and the even members form . These groups are disjoint and their union is .
Answer: The relation is an equivalence relation with classes and .
For divisibility of an integer difference by , the corresponding partition has classes represented by , and . The organising principle remains the same: classify elements by which differences satisfy the relation.
How do one-one and onto functions differ?
A one-one function, also called an injective function, gives different images to distinct inputs. An onto function, also called a surjective function, reaches every element of its codomain. These requirements concern different aspects of the mapping.
Definition: A function is one-one if for all . It is onto if every has some satisfying .
The range consists of the images actually obtained. The codomain is the declared target set. Therefore a function is onto precisely when its range equals its codomain. An element in the codomain that has no preimage disproves surjectivity.
How do arrow diagrams show the distinction?
What the figure shows
Four types of mappings
Four arrow diagrams map elements of into target sets. In panel (i), distinct arrows reach distinct targets while and remain unreached. Panel (ii) sends and to . Panel (iii) reaches every target but combines inputs. Panel (iv) reaches every target with distinct images.
See Fig. 1.2 in your NCERT textbook
A function that is not one-one is called many-one. This means at least two distinct domain elements share an image. It does not mean one input has several images: that would violate the requirement for being a function.
| Classification | Inputs | Codomain coverage |
|---|---|---|
| One-one | Distinct inputs have distinct images. | Some target elements may remain unreached. |
| Onto | Different inputs may share an image. | Every target element is reached. |
| Bijective | Distinct inputs have distinct images. | Every target element is reached. |
A bijection satisfies both tests. When proving bijectivity, keep the two arguments visible: first establish that images do not repeat for distinct inputs, and then establish that no codomain element is missed.
Why do the domain and codomain affect a function's type?
The formula alone does not determine whether a function is one-one or onto. Its declared domain and codomain are essential. The same doubling rule gives different surjectivity conclusions when applied to natural numbers and to real numbers.
Worked example 5. Classify , defined by , where is the set of natural numbers.
- Assume two natural-number inputs have equal images: .
- Substitute the rule: . Dividing by gives , so the function is one-one.
- Choose from the codomain. To reach it, an input would need to satisfy , hence .
- Since , that codomain element has no allowed preimage. The function is not onto.
Answer: on the natural numbers is one-one but not onto.
Worked example 6. Classify , defined by , where is the set of all real numbers.
- Assume . Then , and division by gives .
- Take an arbitrary real target . Solving gives the candidate input .
- The candidate belongs to the domain because whenever .
- Verify it by substitution: Every real target is reached.
Answer: from the reals to the reals is one-one and onto, hence bijective.
The injectivity argument is unchanged in these two examples. The surjectivity argument changes because a candidate preimage must belong to the actual domain. Solving the equation is insufficient unless this membership condition is checked.
How do you prove a function is many-one or not onto?
To disprove injectivity, exhibit two distinct inputs with the same image. To disprove surjectivity, exhibit an element of the codomain that cannot be an image. These are separate counterexamples, even when both properties fail for the same function.
Worked example 7. Classify , defined by .
- Evaluate the function at the two inputs and : and .
- The inputs are distinct, since , but their images agree. Therefore the function is many-one.
- Select the real codomain element . Reaching it would require .
- For every real input, . The required equation has no real solution, so has no preimage.
Answer: from the reals to the reals is neither one-one nor onto.
Can an onto function still repeat an image?
Yes. Consider the natural-number function specified by and for . The repeated image disproves injectivity, but it does not prevent the function from covering its entire codomain.
- The distinct inputs and share the image . Thus the function is not one-one.
- The target is reached because .
- For any natural target , choose . This input satisfies , so the second branch applies.
- Substitution gives . Hence every natural-number target is reached, proving that the function is onto.
The conclusion illustrates the independence of the two function properties on an infinite set. A successful onto proof does not repair a failed one-one test, and a repeated image does not by itself show that a target is missed.
What changes when a function maps a finite set to itself?
Result: A finite self-map is one-one if and only if it is onto
For a finite set , a function is one-one exactly when it is onto. The domain and codomain are the same finite set in this result. That condition must remain attached to the conclusion.
- If the function is one-one, distinct domain elements have distinct images. The finite domain supplies as many distinct images as there are elements in the codomain.
- Those images therefore cover the codomain, establishing that the function is onto.
- Conversely, suppose the function is onto but two distinct inputs share an image. The number of distinct images would then be smaller than the number of domain elements.
- Because the domain and codomain are the same finite set, some codomain element would be missed. This contradicts the onto assumption, so the function must be one-one.
The infinite natural-number examples show why finiteness matters. Doubling is one-one but not onto, while the function with a repeated first image and the rule afterwards is onto but not one-one.
Worked example 8. Find the number of one-one functions from to itself.
- The image of the first input can be any of the elements of the codomain.
- For a one-one function, the second input must have a different image. There are unused choices.
- The last input must use the remaining image. There is choice.
- Multiply these successive choices: Here , read as “three factorial”, means the product of the positive integers from to .
Answer: There are one-one functions from to itself.
Each such mapping is a permutation of the set. Every target is used once, so the finite self-map result also confirms that each of these one-one functions is onto.
How is the composition of two functions calculated?
Composition applies one function and then another. If and , the output of the first function lies in the domain of the second. The composite therefore maps the original input set into the final target set.
Definition: The composite is defined by for every . Apply first, then apply to its output.
What the figure shows
Following a composite function
Three sets labelled , and contain , and . An arrow labelled goes from the first set to the second, and an arrow labelled continues to the third. A curved arrow labelled connects the original input to the final image.
See Fig. 1.5 in your NCERT textbook
Worked example 9. Let satisfy , , . Let satisfy , . Find .
- For the first input, follow both rules: .
- For the second input, .
- For the third input, .
- For the fourth input, .
Answer: , with domain and codomain .
Result: Composition need not commute
The order of composition matters. For and , both defined from the reals to the reals, calculate the two orders separately.
- Apply the cosine rule first: .
- Apply the quadratic rule first: .
- At , the first composite gives , while the second gives .
- Since , the composites differ at an input in their domain. Thus .
When is a function invertible, and how is its inverse checked?
An inverse function reverses a function through composition. For , an inverse must be a function . It must return every original input after the forward mapping and recover every target after the reverse mapping.
Result: A function is invertible exactly when it is bijective
Definition: The function is invertible if there is a function such that and . Here and are the identity functions on and , respectively: for every , and for every . The inverse is written .
Being one-one and onto is equivalent to being invertible. To establish invertibility without finding a formula for the inverse, prove both properties. If an inverse formula is requested, also state its domain and verify the two identity compositions.
Worked example 10. Let satisfy , where . Find and verify its inverse.
- Start with the output equation . Subtracting gives .
- Divide by to obtain . Define by .
- Check the domain condition. The definition of guarantees that each has the form for a natural number . Thus .
- Check the first composition for every natural input:
- Check the second composition for every :
Answer: is . Both required identity compositions hold.
The specified target set is crucial here. It ensures that the reverse rule actually produces a natural number. Algebraic rearrangement supplies a candidate inverse; the domain check and the two compositions establish that it works as the required function.
How can known equivalence relations produce further results?
Result: The intersection of two equivalence relations is an equivalence relation
Suppose and are equivalence relations in the same set . Their intersection contains exactly the ordered pairs that belong to both relations. Its equivalence properties follow by applying each original relation's properties to the same elements.
- For every , reflexivity gives and . Hence .
- If , it lies in both relations. Symmetry in each gives and , so .
- If , both pairs lie in each relation. Transitivity in each gives and .
- Therefore . The intersection is reflexive, symmetric and transitive, so it is an equivalence relation.
Why do equal function values define an equivalence relation?
Let be any function, and define a relation on its domain by exactly when . Equality of the images supplies all three equivalence properties, regardless of whether the function is injective or surjective.
- For every input, . Therefore , proving reflexivity.
- If , reversing the equality gives . Therefore , proving symmetry.
- If and , then . Therefore and imply , proving transitivity.
- All three requirements hold on . The relation defined by equal images is therefore an equivalence relation.
These proofs use a common method: translate membership into its defining condition, apply a known property, and translate the resulting condition back into membership. Keep the underlying set and all three tests explicit throughout the argument.
Glossary
- Relation — A subset of a Cartesian product specifying which ordered pairs are included.
- Empty relation — A relation containing no ordered pairs from the Cartesian product of its underlying set.
- Universal relation — A relation containing every ordered pair from the Cartesian product of its underlying set.
- Reflexive relation — A relation in which every element of the underlying set is related to itself.
- Symmetric relation — A relation in which reversing any included ordered pair produces another included ordered pair.
- Transitive relation — A relation where two related pairs with a common middle element imply the corresponding direct pair.
- Equivalence relation — A relation that satisfies reflexivity, symmetry and transitivity on the same underlying set.
- Equivalence class — The subset consisting of all elements related to a chosen element under an equivalence relation.
- Codomain — The declared target set of a function, which contains all of its images.
- Range — The set of images actually obtained from all permitted inputs of a function.
- Injective function — A function in which distinct elements of the domain have distinct images.
- Surjective function — A function for which every element of the codomain has a preimage in the domain.
- Bijective function — A function that is both injective and surjective between its stated domain and codomain.
- Composition — The function obtained by applying one function to the output of another compatible function.
- Inverse function — A reverse function whose compositions with the original give the identity functions on the respective sets.
Common errors and misconceptions
- Misconception: One self-pair makes a relation reflexive. Correct: Every element of the underlying set must have its self-pair included.
- Misconception: Symmetry means every possible ordered pair is present. Correct: Symmetry requires the reverse of each included pair; it does not require the universal relation.
- Misconception: Transitivity follows from the presence of self-pairs. Correct: Check every applicable chain of two pairs and its required direct pair separately.
- Misconception: A reflexive and symmetric relation is automatically an equivalence relation. Correct: Transitivity must also be established before drawing that conclusion.
- Misconception: An onto function must assign distinct images to distinct inputs. Correct: Onto concerns coverage of the codomain; repeated images are compatible with surjectivity.
- Misconception: The formula alone determines whether a function is onto. Correct: The declared domain and codomain matter, as the two doubling functions demonstrate.
- Misconception: Composition can be performed in either order without changing the answer. Correct: applies first, and reversing the order can change the function.
- Misconception: Rearranging an equation alone proves invertibility. Correct: Check the reverse function's domain and both identity compositions, or establish bijectivity.
Exam-style questions with model answers
Q1. Define an equivalence relation. [2 marks]
- An equivalence relation on a set is a relation that is reflexive, symmetric and transitive.
- All three properties must hold on the stated underlying set; establishing only two of them is insufficient.
Q2. Why is , , not onto? [2 marks]
- The codomain contains . Reaching this target would require , giving .
- That candidate is not a natural number, so the target has no preimage in the domain. Hence the function is not onto.
Q3. Classify in . [3 marks]
- All required self-pairs, namely , are present. Thus every element is related to itself, and the relation is reflexive.
- Although , the reversed pair . This counterexample disproves symmetry.
- The included pairs and form a chain, but . Therefore transitivity also fails. The relation is reflexive but neither symmetric nor transitive, and consequently is not an equivalence relation.
Q4. Show that , , is bijective. [3 marks]
- Assume for real inputs. Substituting gives . Dividing by gives , proving that the function is one-one.
- Let be any real number in the codomain. Solve to obtain , which is an allowed real input.
- Substitution verifies . Thus every target is reached, so the function is onto. As both properties hold, it is bijective.
Q5. Prove that defined by on is an equivalence relation, and identify its classes. [5 marks]
- For any integer , the difference is divisible by . Thus each integer is related to itself, proving reflexivity.
- If , write for some integer . Then , which is also divisible by . Hence , proving symmetry.
- If also , write for an integer . Adding gives . The integer sum shows that , proving transitivity.
- All three properties hold, so the relation is an equivalence relation. The class contains all even integers and contains all odd integers. These classes are disjoint and their union is .
Q6. For and on , calculate both composites and show that they differ. [3 marks]
- Applying first and second gives .
- Applying first and second gives .
- At the common input , the first function gives , while the second gives . Because these outputs differ, the composites cannot be equal functions. This example shows that composition need not commute.
Q7. Find and verify the inverse of , , where . [5 marks]
- Write the output as . Subtracting and dividing by gives . This provides the candidate reverse rule.
- Define by . The definition of ensures that the quotient is a natural number for every allowed target, so the rule has the required domain and codomain.
- For every natural input, . Therefore the first composition is the identity on .
- For every , . Therefore the second composition is the identity on . Both checks succeed, so is invertible and .
Q8. How many one-one functions map to itself? [2 marks]
- The first input has possible images. The second has unused choices, and the third has .
- Multiplication gives one-one functions, each a permutation of the set.
Key takeaways
- A relation is a subset of the appropriate Cartesian product; both the underlying sets and the membership rule matter.
- Test reflexivity, symmetry and transitivity independently, using the precise requirements for self-pairs, reversed pairs and chains.
- An equivalence relation satisfies all three properties and divides its underlying set into mutually disjoint equivalence classes.
- One-one functions separate distinct inputs, while onto functions cover every element of the declared codomain.
- The same formula can have different function classifications when its domain or codomain changes.
- For a finite set mapped to itself, injectivity and surjectivity imply each other; infinite sets need separate treatment.
- Composition applies the inner function first, and reversing the order can produce a different function.
- Invertibility is equivalent to bijectivity; verify an explicit inverse by checking its domain and both identity compositions.
Test yourself
What must a reflexive relation contain?
It must contain for every element of its underlying set.
What disproves symmetry?
An included pair whose reverse is absent disproves the symmetry condition.
Which pair is required when and belong to a transitive relation?
The pair must also belong to the relation for that chain.
What are the classes for the even-difference relation on integers?
The two classes are the even integers and the odd integers; together they cover all integers.
When does a function's range equal its codomain?
This equality holds exactly when the function is onto, so every target has a preimage.
Which function acts first in ?
The function acts first; then acts on its output.
What are the two checks for an inverse of ?
Verify and , using the stated domains for both compositions.
Does one-one imply onto for every function from natural numbers to themselves?
No. The doubling function is one-one, but the natural-number target has no natural-number preimage.
