Relations and Functions: Class 12 Maths · Chapter 1
Mathematics Part 1 · Companion notes, simulations and practice · Official NCERT chapter PDF ↗
Published · Updated
What you will learn in Relations and Functions
- Describe a relation as a set of ordered pairs and recognise empty and universal relations.
- Test a relation for the reflexive, symmetric and transitive properties, giving a counterexample whenever a property fails.
- Prove that a relation is an equivalence relation and find its equivalence classes as a partition of the set.
- Decide whether a function is one-one, onto or bijective, using algebra, graphs or counting.
- Explain why a one-one function on a finite set is onto, and why this can fail on an infinite set.
- Form the composition of two functions and show that the order of composition matters.
- Decide whether a function is invertible, find its inverse and check it through both compositions.
- Count functions and relations with given properties on small finite sets.
Original companion text aligned to NCERT Mathematics Class 12, Chapter 1, pp. 1–17. Not affiliated with or endorsed by NCERT.
1.1 Introduction
A class register pairs each student with a roll number, a railway chart pairs each passenger with a berth, and a scorecard pairs each batter with a score. Mathematics keeps only the bare bones of such pairings, a collection of ordered pairs, and studies the shapes that collection can take. You met relations, functions, domain, codomain and range in Class XI. In this chapter we sort relations by three properties, sort functions by how they cover their codomain, and then chain functions together and run them backwards.
Recall that for sets and , the Cartesian product is the set of all ordered pairs with and . A relation (संबंध) from to is nothing more than a subset of . The pairs may be chosen by a meaningful rule, such as is a factor of, or by no rule at all; once they are chosen, the relation simply is that set of pairs. When we write and say that is related to .
A relation from to is any subset of . When , we call a relation in ; it is then a subset of .
ExampleWith and , the rule ' divides ' selects .
2/3The rule divides keeps 6 of them. That set of pairs is the relation .
A grid has rows 2, 3 and 5 for the set A and columns 4, 6, 9 and 10 for the set B, with a small dot in each of its 12 cells. In the first step every cell is plain: these are all the pairs of A × B, and the label says there are 3 × 4 = 12 of them. In the second step six cells are ringed, the pairs where a divides b: (2, 4), (2, 6), (2, 10), (3, 6), (3, 9) and (5, 10); the other dots fade and the label names the relation R. In the third step the grid slides to the left and the same six pairs appear on the right as arrows from the circles 2, 3 and 5 to the circles 4, 6, 9 and 10.
A function is a relation of a special kind: every element of the first set has exactly one arrow leaving it. In Fig. 1.1 the number 2 has three arrows, so this relation is not a function from to . Keep both pictures in mind, the grid and the arrows, as we classify relations in Section 1.2 and functions in Section 1.3.
Show answer
Answer 4096
Show answer
Answer (B) and
Show answer
Answer False
1.2 Types of Relations
From now on most of our relations live inside a single set: a relation in is a subset of . Two subsets are always available, however strange is. One is the empty set , which relates nothing to anything. The other is the whole of , which relates everything to everything.
The relation : the subset of that contains no pairs at all, so nothing in is linked to anything.
ExampleIn the rule is never met, because the largest possible sum is .
The relation , which contains every ordered pair from ; each element is linked to all elements, itself included.
ExampleIn the same , the rule holds for all pairs.
These two extremes, the empty (रिक्त) and the universal (सार्वत्रिक) relation, are called the trivial relations. On their own they are dull, but they make excellent test cases for the properties that follow.
Months of the year
Let be the set of the 12 months of a non-leap year. In , let mean that months and together have more than 62 days, and let mean that the numbers of days in and differ by at most 3. Show that is the empty relation and is the universal relation.
Try it yourself first. Then reveal the solution one step at a time.
Three ways to write one relation. Take in where is twice . In roster form, . In set-builder form, . In a third, very common style, we just say that if and only if . All three describe the same set of pairs, so use whichever is clearest at the moment.
Reflexive, symmetric and transitive relations
The relations that matter most in mathematics, such as equality, congruence of triangles and 'leaves the same remainder', share three habits. Draw a relation in as arrows between the elements of , with a small loop when an element is related to itself. Each habit then becomes a rule about the arrows (Fig. 1.2).
A relation in with for every : each element is related to itself.
Example'was born in the same year as', in a set of people.
A relation in such that implies , for all .
Example in the set of integers.
A relation in such that and together imply , for all .
Example'is older than', in a set of people.
4/4Side by side. A relation with all three habits is an equivalence relation.
Three panels each show the points 1, 2 and 3 as circles. In the first step the left panel is highlighted: every point has a loop arrow back to itself, and one ordinary arrow runs from 1 to 2, so the relation is reflexive. In the second step the middle panel is highlighted: arrows join 1 and 2 in both directions, and 2 and 3 in both directions, so every arrow has a partner coming back and the relation is symmetric. In the third step the right panel is highlighted: arrows go from 1 to 2 and from 2 to 3, and a dashed shortcut arrow goes straight from 1 to 3, as transitivity demands. In the last step all three panels are shown at full strength side by side.
Two warnings save many marks. First, symmetry and transitivity are if–then statements. If a relation has no two-step paths at all, transitivity demands nothing, and the relation is transitive automatically (we say vacuously). Second, reflexivity is a claim about every element, so one missing loop spoils it: in the relation is not reflexive, because is absent.
To prove that a property holds, argue with arbitrary elements. To show that it fails, one specific counterexample is enough, and you should name it.
A relation that is reflexive, symmetric and transitive.
ExampleEquality, , in any set; 'leaves the same remainder on division by 7 as' in .
Rectangles with equal area
Let be the set of all rectangles drawn on a sheet of paper, and let let mean that and have the same area. Show that is an equivalence relation in .
Try it yourself first. Then reveal the solution one step at a time.
Notice the pattern in Example 2: the relation was 'has the same area as', an equality of some attribute. Every relation of the form 'has the same ___ as' inherits all three properties directly from equality. Example 21 proves this once and for all.
Opposite signs
In the set of non-zero real numbers, let , so that when and have opposite signs. Prove that is symmetric, and that it fails to be reflexive and fails to be transitive.
Try it yourself first. Then reveal the solution one step at a time.
There is a simple reason behind Example 3. Two 'opposite sign' steps bring you back to your original sign, so the shortcut that transitivity asks for would always join two numbers of the same sign, and never contains such a pair.
Reading properties off a list
Let and . Decide which of the three properties has.
Try it yourself first. Then reveal the solution one step at a time.
For a small relation given as a list, check transitivity systematically: for every pair , look at each pair that starts where it ends, and confirm that is present. Loops never cause trouble, since followed by only asks for itself.
Same remainder on division by 4
Show that is an equivalence relation in the set of integers.
Try it yourself first. Then reveal the solution one step at a time.
Equivalence classes
Run the relation of Example 5 on the numbers 0 to 11 and watch what happens (Fig. 1.4). The number 1 is related to 5 and 9, which differ from it by multiples of 4, and to nothing else in the list. The number 2 is related to 6 and 10. The twelve numbers fall into four clusters, and every number lands in exactly one of them.
3/3Every number belongs to exactly one of , and the four classes together make up the whole set.
Twelve circles numbered 0 to 11. In the first step they are scattered with no order, and the rule a R b if 4 divides a minus b is written below. In the second step only 1, 5 and 9 stay bright and are ringed, forming the class of 1, while the other numbers fade. In the third step all the circles slide into four dashed boxes labelled [0], [1], [2] and [3]: the box [0] holds 0, 4 and 8; [1] holds 1, 5 and 9; [2] holds 2, 6 and 10; and [3] holds 3, 7 and 11. The boxes do not overlap and together they contain every number, as the label below them states.
Why does the remainder decide everything? Write and , with remainders . Then , so 4 divides exactly when 4 divides . Since , the only multiple of 4 it can equal is 0. So if and only if .
For an equivalence relation in and an element , the class of is , the set of everything related to .
ExampleUnder 'same remainder on division by 4' in , , and .
Let be an equivalence relation in a set . Then (i) every element lies in its own class, ; (ii) any two classes are either identical or disjoint; (iii) the union of all the classes is . Conversely, if is split into non-empty, pairwise disjoint pieces whose union is (a partition of ), then 'lies in the same piece as' is an equivalence relation whose classes are exactly those pieces.
So the same information can be given in two ways: as an equivalence relation, or as a partition of the set into classes. The integers split into 2 classes under 'same parity', into 4 classes under 'same remainder on division by 4', and into classes under 'same remainder on division by '. In the other direction, any way of sorting a set into non-overlapping groups defines an equivalence relation: 'is in the same group as'.
Sorting by number of digits
Let , and let mean that and have the same number of digits. Prove that is an equivalence relation, list its classes, and confirm that never links two numbers from different classes.
Try it yourself first. Then reveal the solution one step at a time.
Classes need not be finite lists. In the plane, call two points related when they are at the same distance from the origin . This is again 'has the same ___ as', so it is an equivalence relation. Use the simulation to explore the class of the point .
A coordinate grid from minus 6 to 6 on both axes, with the origin O and a fixed point P at (3, 4), whose distance 5 from O is drawn and measured. A second point Q can be dragged to any grid point; its distance from O is drawn and updated as it moves, so you can hunt for the points that are related to P under the relation 'same distance from O'.
- Drag to , then to . Is each one related to ?
- Find all 12 grid points at distance 5 from . What shape do they lie on?
- Drag to . Which grid points are in the same class as ?
The class of is the whole circle of radius 5 centred at . It contains infinitely many points, only twelve of which have whole-number coordinates: , , and . The classes of this relation are the circles centred at , together with the one-point class , and they partition the plane.
Show answer
Answer (C)
Show answer
Answer False
Show answer
Answer 7 elements
Show answer
- (A) 'is in the same section as'
- (C) 'has the same blood group as'
Practice 1.1: questions with answers
Decide whether each relation is reflexive, symmetric and transitive. Give a counterexample for every property that fails.
in
Show solution
AnswerSymmetric only.
Not reflexive: , so (the only loop is ). Symmetric: gives . Not transitive: and are in , but is not.
in
Show solution
AnswerTransitive only.
Not reflexive: . Not symmetric: but . Transitive: would need and at once, which never happens, so there are no two-step paths and the condition holds vacuously.
In , when and have a common factor greater than 1
Show solution
AnswerReflexive and symmetric, not transitive.
Reflexive: each shares the factor with itself. Symmetric: a common factor of and is a common factor of and . Not transitive: and are in , but 2 and 3 have no common factor greater than 1.
in , where is the greatest integer not exceeding
Show solution
AnswerAn equivalence relation.
This is 'has the same greatest integer as', an equality of an attribute, so it is reflexive, symmetric and transitive. Its classes are the intervals for .
In the set of students of a school: ' and belong to the same house'
Show solution
AnswerAn equivalence relation.
Equality of an attribute (the house), so all three properties hold.
In the same set: ' was born exactly one day before '
Show solution
AnswerNone of the three.
Not reflexive: nobody is born a day before themselves. Not symmetric: if was born a day before , then was born a day after . Not transitive: if is a day older than and a day older than , then is two days older than .
In the same set: ' is younger than '
Show solution
AnswerTransitive only.
Not reflexive and not symmetric (if is younger than , then is not younger than ). Transitive: younger than someone who is younger than means younger than .
Show that in is neither reflexive, nor symmetric, nor transitive.
Show solution
Not reflexive: is false, so .
Not symmetric: since , but since is false.
Not transitive: since , and since . But , since is false.
In , list the relation and check whether it is reflexive, symmetric or transitive.
Show solution
Answer; none of the three properties holds.
. Not reflexive: . Not symmetric: but . Not transitive: but .
In a group of people, let mean ' is not taller than '. Prove that has the reflexive and transitive properties but lacks symmetry (assume the group has two people of different heights).
Show solution
means , where is height. Reflexive: . Transitive: and give .
Not symmetric: if Asha is 150 cm and Ravi is 165 cm tall, then Asha Ravi, but Ravi is taller than Asha, so Ravi is not related to Asha.
Check whether in is reflexive, symmetric or transitive.
Show solution
AnswerReflexive only.
Reflexive: always. Not symmetric: since , but since is false.
Not transitive: since , and since , but since is false.
Show that in is symmetric but neither reflexive nor transitive.
Show solution
Symmetric: and come as a pair, and the loop is its own reverse.
Not reflexive: . Not transitive: the path demands , which is missing.
In the set of mobile phones on sale in a shop, show that ' and have the same price' is an equivalence relation.
Show solution
Let be the price of phone . Reflexive: . Symmetric: . Transitive: and give .
Let and . Prove that is reflexive, symmetric and transitive. Then check that any two numbers from are linked by , that the same holds inside , and that never links a number of the first set with a number of the second.
Show solution
Reflexive: is even. Symmetric: . Transitive: if and are even, then is even.
Two even numbers have an even sum, and so do two odd numbers, so each of the two sets is related within itself. An even number plus an odd number is odd, so no element of is related to any element of . These two sets are the equivalence classes.
Let . Show that each relation is an equivalence relation in , and find the class of 1 in each case.
Show solution
Answer
Reflexive: . Symmetric: if then . Transitive: if and , then . The elements of that differ from 1 by a multiple of 5 are , and , so .
Show solution
Answer
This is 'has the same square as', an equality of an attribute, so it is an equivalence relation. means , so .
Using , give an example of a relation in that is:
reflexive, but neither symmetric nor transitive;
Show solution
AnswerFor example, the pairs and together with the three loops , , .
All loops are present. but , so it is not symmetric; demands , which is missing, so it is not transitive.
symmetric and transitive, but not reflexive;
Show solution
AnswerFor example, .
Every pair among 1 and 2 is present, so it is symmetric and transitive, but is missing.
transitive, but neither reflexive nor symmetric;
Show solution
AnswerFor example .
There is no two-step path, so it is transitive vacuously; there are no loops, and is missing.
reflexive and symmetric, but not transitive;
Show solution
AnswerFor example, the pairs , , , together with the three loops.
All loops are present and every pair has its reverse, but demands , which is missing.
an equivalence relation other than the identity and universal relations.
Show solution
AnswerFor example, the pairs and together with the three loops.
Its classes are and , a partition of , so by the partition theorem it is an equivalence relation.
In the set of points of the coordinate plane, let when . Show that is an equivalence relation, and describe the class of the point .
Show solution
AnswerThe square with vertices , , and .
is 'has the same value of as', an equality of an attribute, so it is an equivalence relation.
For the value is 3, so its class is . In the first quadrant this is the segment from to ; the other quadrants give its mirror images. Together they form a square with vertices and , standing on one corner.
Two rectangles are similar when the ratio of the longer side to the shorter side is the same. Show that similarity is an equivalence relation in the set of all rectangles. Which of these are related: is , is , is , is and is ?
Show solution
Answer and are related; and are related; is related only to itself.
Similarity is 'has the same side ratio as', so it is an equivalence relation.
The ratios are , , , and . So and , while is in a class of its own among these five.
In the set of all polyhedra (solids with flat faces), let when and have the same number of faces. Show that is an equivalence relation. Is a square pyramid related to a cube? Is a pentagonal pyramid?
Show solution
AnswerA square pyramid (5 faces) is not related to a cube (6 faces); a pentagonal pyramid (6 faces) is.
is 'has the same number of faces as', an equality of an attribute, so it is an equivalence relation.
A cube has 6 faces. A square pyramid has faces, so it is not related to the cube (it is related to a triangular prism, which also has 5). A pentagonal pyramid has faces, so it is in the cube's class, together with every cuboid.
In the set of all circles in the -plane, let when and have the same centre. Show that is an equivalence relation, and describe the class of the circle .
Show solution
AnswerAll circles with .
'Has the same centre as' is an equality of an attribute, so is an equivalence relation.
gives , a circle with centre and radius 4. Its class is the family of all circles centred at : , .
In , let consist of the four loops together with . Which statement is correct?
Show answer
Answer (D) has only the reflexive and symmetric properties.
All four loops are present and every pair comes with its reverse, but while .Let in . Which pair belongs to ?
Show answer
Answer (C)
and . The pairs and satisfy the equation but have , and gives .
1.3 Types of Functions
In Class XI you met the identity, constant, polynomial, rational, modulus and signum functions, drew their graphs and combined functions by adding and multiplying them. Here we ask a new question about a function : how does it cover the codomain ? Does it ever send two inputs to the same output? Does it reach every element of ?
A relation from to in which every is related to exactly one element of , written . is the domain, the codomain, and the range.
ExampleThe PIN code of a post office: every post office has exactly one PIN code, though one PIN code may serve several post offices.
Fig. 1.6 shows the four possibilities with four inputs. Look at two things in each picture: whether two arrows ever land on the same square, and whether some square is left without an arrow.
1/4Two inputs share the output , and is never reached.
Four circles labelled 1 to 4, the set X, sit in a row above a row of squares, the set Y, and each circle sends one arrow down to a square. Step one: 1 and 2 both point to a, 3 points to c and 4 to d, while b receives no arrow and is drawn dashed; the labels read one-one: no and onto: no. Step two: there are five squares a to e, and the arrows go to a, b, d and e, all different, but c is missed and dashed: one-one yes, onto no. Step three: there are three squares; 1 goes to a, 2 and 3 both go to b, and 4 goes to c, so every square is hit but b is hit twice: one-one no, onto yes. Step four: four squares, with arrows 1 to b, 2 to d, 3 to a and 4 to c, so every square is hit exactly once: one-one yes, onto yes.
A function in which different inputs give different outputs. Equivalently, whenever we must have . A function that is not one-one is called many-one.
Example on is one-one; on is many-one, since .
The form '' is the one to use in proofs: assume two outputs are equal and deduce that the inputs were equal. To show that is not one-one, exhibit two different inputs with the same output.
A function in which every is the image of at least one ; that is, the equation has a solution in for every .
Example, is onto, because is the image of .
Put differently, is onto exactly when its range equals its codomain. So 'onto' depends on the codomain we declare: is not onto as a map , since nothing goes to , but it is onto as a map . Always read the arrow before you judge.
A function that is both one-one and onto. Every element of the codomain is then the image of exactly one element of the domain.
Example, .
Accession numbers in a library
A school library has 1850 books, and each book is stamped with an accession number from 1 to 1850, no two books sharing a number. Let be the set of these books and , the accession number of . Prove that is one-one and that it is not onto.
Try it yourself first. Then reveal the solution one step at a time.
Shifting the natural numbers
Show that , , is one-one but not onto.
Try it yourself first. Then reveal the solution one step at a time.
A bijection of the real line
Prove that , , is one-one and onto.
Try it yourself first. Then reveal the solution one step at a time.
Graphs give a quick picture of both properties (Fig. 1.8). Draw horizontal lines across the graph of a function . If some line meets the graph twice, two inputs share the output , and is not one-one. If some line misses the graph, is never reached, and is not onto. A bijection of is a graph that every horizontal line meets exactly once; the straight line of Example 9, with slope , passes this test.
1/3The line meets at and : not one-one.
Axes with x from minus 2 to 6 and y from minus 7 to 9. Step one: the U-shaped graph of y = x squared minus 4x, lowest at the point (2, minus 4), is cut by the dashed horizontal line y = 5 at two marked points, x = minus 1 and x = 5. Step two: the dashed line moves down to y = minus 6, below the lowest point, and meets the graph nowhere. Step three: the U-shaped graph fades and an S-shaped cubic, y equals one half of (x minus 2) cubed plus 1, appears; three dashed lines at y = minus 5, minus 1 and 5 each meet it at exactly one marked point.
Counting digits
Let give the number of digits of , so that , and . Show that is onto but not one-one.
Try it yourself first. Then reveal the solution one step at a time.
A parabola that fails twice
Show that , , is neither one-one nor onto.
Try it yourself first. Then reveal the solution one step at a time.
Swapping neighbours
Define by if leaves remainder 1 on division by 3, if it leaves remainder 2, and if is a multiple of 3. So swaps 1 and 2, swaps 4 and 5, swaps 7 and 8, and fixes 3, 6, 9, …. Show that is one-one and onto.
Try it yourself first. Then reveal the solution one step at a time.
On a finite set the two properties are tied together. Picture four letters being posted into four letter-boxes, each letter going into exactly one box.
Onto forces one-one on a finite set
Let . Show that every onto function is one-one.
Try it yourself first. Then reveal the solution one step at a time.
One-one forces onto on a finite set
With again, show that every one-one function is onto.
Try it yourself first. Then reveal the solution one step at a time.
Let be a finite set and a map from to itself. Then is one-one exactly when it is onto, so either property alone makes a bijection.
Show answer
Answer (B)
Show answer
Answer (C)
Show answer
Answer False
Show answer
Answer 12 functions
Practice 1.2: questions with answers
Let be .
Show that is one-one and onto.
Show solution
AnswerIt is a bijection.
One-one: gives , so .
Onto: for put . Since , , so is in the domain, and .
If the domain is replaced by (same rule, same codomain), is still one-one? Is it still onto?
Show solution
AnswerStill one-one, but not onto.
Still one-one: the argument in (a) works for any inputs. Not onto: would need , which is not an integer.
Decide, for each function, whether it is one-one and whether it is onto.
,
Show answer
Answer (B) one-one, not onto
. The range is , so 1 and every even number are missed.,
Show answer
Answer (B) one-one, not onto
Still one-one, and now every odd integer is reached, but even integers such as 0 are not.,
Show answer
Answer (A) one-one and onto
One-one as before, and for every real .,
Show answer
Answer (B) one-one, not onto
On the values strictly increase, so different inputs give different outputs; but 1 is never reached.,
Show answer
Answer (D) neither one-one nor onto
. Also is a product of consecutive integers, so it is always even and 1 is missed.
The fractional-part function is , , where is the greatest integer not exceeding . Prove that fails both tests: it is not one-one and not onto.
Show solution
Not one-one: and .
Not onto: gives , so the range is and, for example, 2 is never reached. (The greatest integer function itself, , fails both tests too: , and 0.5 is never an output.)
Show that , , is not one-one and is not onto.
Show solution
for and for . Not one-one: . Not onto: for all , so is never reached.
Dirichlet's function is defined by if is rational and if is irrational. Explain why it is not one-one and not onto.
Show solution
Not one-one: . Not onto: the range is , so for example 5 is never reached.
Let , and . Show that is a one-one function from to . Is it onto?
Show solution
AnswerOne-one, not onto.
Each of 2, 4, 6 appears exactly once as a first entry, so is a function. The images 3, 7, 1 are all different, so it is one-one. It is not onto, because 5 and 9 are never reached (three inputs cannot cover five outputs).
State whether each function is one-one, onto or bijective, and justify your answer.
,
Show solution
AnswerBijective.
One-one: . Onto: for any real , gives .
,
Show solution
AnswerNeither one-one nor onto.
Not one-one: . Not onto: , so 0 is never reached.
Show that , , is a bijection.
Show solution
One-one: if , adding the two coordinates gives , so , and then .
Onto: for any , the pair , gives .
Let be if is odd and if is even. Is bijective? Justify your answer.
Show solution
AnswerNo: it is onto but not one-one.
Not one-one: and . Onto: any equals , because is even. So is onto but not bijective.
Let , and , . Decide, with reasons, whether is a bijection.
Show solution
AnswerYes, is a bijection.
really maps into : would mean , which is impossible.
One-one: gives , so and .
Onto: for , gives , so . This is never , since would mean . So and .
Let be . Which statement is correct?
Show answer
Answer (B) is many-one and onto
, so is many-one. For any real , the cubic equation has at least one real root (the graph of a cubic rises from far below the -axis to far above it without a break), so is onto.Let be . Which statement is correct?
Show answer
Answer (D) is one-one but not onto
forces , so is one-one. But needs , not an integer, so 0 is missed and is not onto.
1.4 Composition of Functions and Invertible Function
A taxi fare depends on the distance travelled, and the distance depends on the destination you choose. Feed a destination into the first rule, feed the result into the second, and you get the fare directly. Chaining two functions in this way produces a new function, called their composition.
For and , the composite is defined by for every . Read it as ' after '. NCERT writes it as .
ExampleIf and on , then .
Two details matter. The function written on the right, , acts first. And the composite only makes sense when every output of is a valid input for , which is why the codomain of is the domain of in the definition (Fig. 1.9).
4/4Seen from outside, the two machines form one function, .
A dashed conveyor belt runs from left to right through two square machines, f on the left and g on the right, with f(x) = x + 2 written under f and g(x) = x squared written under g. Step one: a chip showing 3 waits at the input end. Step two: a chip showing 5 slides in between the machines, since f(3) = 5, and the input chip fades. Step three: a chip showing 25 slides in at the output end, since g(5) = 25. Step four: a dashed box encloses both machines and is labelled g composed with f, with (g composed with f)(x) = (x + 2) squared written below, so the pair acts as one machine that turns 3 into 25.
Composing finite functions
Let be , and let give the remainder when is divided by 3. Find .
Try it yourself first. Then reveal the solution one step at a time.
Order matters
Let be and . Find and , and show that they are different functions.
Try it yourself first. Then reveal the solution one step at a time.
So composition is not commutative. It is, however, associative: for , and , both and send to . That is why we may write without brackets.
Invertible functions
Some functions can be run backwards. If sends 3 to 5, then sends 5 back to 3, and it undoes for every input. To say this precisely we use the identity function , , which leaves every element where it is.
A function is invertible if there is a function with and . We then call the inverse of and write it as .
Example, , is invertible with .
Both conditions are needed. says that undoes : start in , go to and come back to where you began. says that undoes . Which functions have an inverse? Reverse the arrows of and ask whether the result is still a function (Fig. 1.10).
2/3Reversed, each element of has exactly one arrow out: this is .
Two columns of circles: A with 1, 2 and 3 on the left and B with p, q and r on the right. Step one: the arrows of f go from 1 to q, from 2 to r and from 3 to p, and the line below lists these values. Step two: the arrows are reversed and highlighted, running from q to 1, from r to 2 and from p to 3; every element of B has exactly one arrow leaving it, so the reversed picture is the function f inverse. Step three shows a different function h with h(1) = h(2) = p and h(3) = q, reversed: p now has two arrows leaving it, labelled two arrows, and r, drawn dashed, has none, labelled no arrow, so the reversed picture is not a function.
A function is invertible if and only if it is one-one and onto.
This gives two practical routes. To show that is invertible without finding , prove that it is one-one and onto. To find , solve for : the expression you get is , and you can confirm it by checking both compositions.
Finding and checking an inverse
Let and let be . Show that is invertible and find .
Try it yourself first. Then reveal the solution one step at a time.
Restricting the domain
The rule is not invertible as a map from to . Show that , , is invertible and find .
Try it yourself first. Then reveal the solution one step at a time.
Show answer
Answer 13
Show answer
Answer (A)
Show answer
Answer False
Show answer
Answer (C)
Miscellaneous Examples
These examples mix the ideas of the chapter. Several are proofs about relations in general; others count relations or functions on small sets, where listing the cases carefully is the whole skill.
Combining two equivalence relations
In , let be 'same parity' (2 divides ) and be 'same remainder on division by 3' (3 divides ). (a) Show that if and are any two equivalence relations in a set , then is an equivalence relation. (b) Describe for the two relations above. (c) Show that is not an equivalence relation here.
Try it yourself first. Then reveal the solution one step at a time.
Pairs with equal differences
In the set of ordered pairs of natural numbers, define if and only if . Show that is an equivalence relation.
Try it yourself first. Then reveal the solution one step at a time.
One relation, two descriptions
Let , and let mean that and both lie in the same one of the sets , , and . Show that .
Try it yourself first. Then reveal the solution one step at a time.
Same output, same class
In , call two numbers related when they have the same square: if . (a) Show that is an equivalence relation and find its classes. (b) Explain why 'have the same output under ' is an equivalence relation in for every function , and what its classes tell you about .
Try it yourself first. Then reveal the solution one step at a time.
Counting one-one functions
How many one-one functions are there from to ?
Try it yourself first. Then reveal the solution one step at a time.
Counting relations with given properties
Let . How many relations in contain and and are reflexive and transitive, but not symmetric?
Try it yourself first. Then reveal the solution one step at a time.
Counting equivalence relations is the same as counting the ways to sort the elements into groups, which is easy to picture (Fig. 1.11).
4/4 partitions, so 5 equivalence relations.
Five panels each show the points a, b and c with shaded outlines around the classes. In the first step only the first panel is highlighted: one outline holds all three points, which gives the universal relation. In the second step the second panel is highlighted: each point has its own outline, three classes, which gives the identity relation. In the third step the last three panels are highlighted: in each, two points share an outline and the third stands alone, once for each choice of the lone point. In the last step all five panels are shown and the count 1 + 3 + 1 = 5 is written below.
All equivalence relations on three elements
Find all the equivalence relations in and count them.
Try it yourself first. Then reveal the solution one step at a time.
A sum of onto functions
Let be and . Show that and are both onto, but is not.
Try it yourself first. Then reveal the solution one step at a time.
A sum of one-one functions
Prove that the maps and of are both one-one, and that their sum is not. Call the maps and .
Try it yourself first. Then reveal the solution one step at a time.
Show answer
Answer 16 functions
Tap an item on the left, then its match on the right.
Show answer
- 'is a factor of' in : reflexive and transitive only
- 'differs by exactly 1' in : symmetric only
- 'same remainder on division by 5' in : an equivalence relation
- in : transitive only
Relations and Functions: key points and summary
- A relation from to is any subset of ; a relation in is a subset of (Section 1.1).
- The empty relation and the universal relation are the two trivial relations (Section 1.2).
- Reflexive: for every . Symmetric: . Transitive: (Reflexive, symmetric and transitive relations).
- An equivalence relation has all three properties; 'has the same ___ as' is the typical example (Example 21).
- The class is the set of elements related to . The classes partition the set, and every partition comes from an equivalence relation (Property).
- is one-one if , onto if its range is , and bijective if it is both (Section 1.3).
- For : one-one means no horizontal line meets the graph twice; onto means every horizontal line meets it (Fig. 1.8).
- For maps from a finite set to itself, one-one and onto are equivalent; for infinite sets they are not (Property).
- , so acts first. Composition is associative, but in general (Section 1.4).
- is invertible when some has and ; this happens exactly when is bijective (Theorem).
- To find , solve for , then check both compositions (Example 17).
- There are functions from a -element set to an -element set, and of them are one-one (Example 22).
How the idea of a function grew
- 1637
Curves become equations
René Descartes's La Géométrie describes curves by equations in two unknowns, so that one quantity depends on another.
- 1673
Leibniz uses the word 'function'
In his notes on curves, Gottfried Leibniz uses it for quantities such as the slope or the tangent at a point.
- 1718
A function of a variable
Johann Bernoulli calls a function a quantity built from a variable and constants, and writes it .
- 1734
Euler writes
Leonhard Euler introduces the notation , and later makes functions the central objects of analysis.
- 1797
Lagrange's analytic functions
Joseph-Louis Lagrange builds calculus on functions in Théorie des fonctions analytiques and writes for the derivative.
- 1837
Dirichlet: any rule will do
Peter Gustav Lejeune Dirichlet lets depend on by any rule at all, not necessarily a formula.
- Early 1900s
Functions as sets of pairs
With Georg Cantor's set theory in place, a function becomes a set of ordered pairs in which no first entry repeats: the definition used in this chapter.
Practice questions with answers (NCERT “Miscellaneous exercises”)
Show that , , is a bijection.
Show solution
For , ; for , . So has the same sign as , and only at .
One-one: if , then and lie on the same side of 0. If both are , gives , so . If both are negative, gives in the same way.
Onto: for , take ; then and . For , take ; then and . In both cases , which is in fact the formula for .
Show that , , is one-one.
Show solution
If , then .
The second factor equals , so it is never zero. Hence , and is one-one.
Let be a non-empty finite set and the set of all its subsets. For , let when and have the same number of elements.
Is an equivalence relation in ? Justify your answer.
Show solution
AnswerYes.
is 'has the same size as', an equality of an attribute, so it is reflexive, symmetric and transitive.
For , list the equivalence classes. How many are there?
Show solution
Answer4 classes.
The classes are ; the three one-element subsets; the three two-element subsets; and . So there are 4 classes, with 1, 3, 3 and 1 members (8 subsets in all).
Let .
How many functions are there?
Show answer
Answer 3125
Each of 5 inputs has 5 choices: .How many of them are one-one?
Show answer
Answer 120
.How many of them are onto?
Show answer
Answer 120
On a finite set, onto is the same as one-one, so again .How many are neither one-one nor onto?
Show answer
Answer 3005
The 120 one-one functions are exactly the onto ones, so functions are neither.
Let , , and let be and . Two functions with the same domain and codomain are equal when they agree at every point of the domain.
Are and equal?
Show solution
AnswerYes.
, and , which match , and . So , even though the formulas look different.
Would and still be equal on the domain (with a large enough codomain)?
Show solution
AnswerNo.
but . Indeed , which vanishes only at 1, 2 and 3.
Let . How many relations in contain and are reflexive and symmetric, but not transitive?
Show answer
Answer 2
The link must be present, so there are 4 candidates: add nothing, add , add , or add both. Adding nothing gives an equivalence relation, and adding both gives the universal relation, both transitive. Adding exactly one link breaks transitivity (for example needs ), so the answer is 2.How many equivalence relations in contain the pair ?
Show answer
Answer 5
The partitions with 1 and 2 together are , , , and : 5 in all.How many relations in a set with 3 elements are reflexive?
Show answer
Answer 64
Of the 9 pairs, the 3 loops must be in, and each of the other 6 can be in or out: .How many relations in are both reflexive and symmetric?
Show answer
Answer 8
The loops are forced, and each of the three two-way links , , is in or out: .If and are both one-one, then is
Show answer
Answer (A) always one-one
gives because is one-one, and then because is one-one.Match each function with its type.
Tap an item on the left, then its match on the right.
Show answer
Answer- on : bijective
- on : one-one, not onto
- on : neither
- number of digits, : onto, not one-one
has the inverse ; misses 1, 2, 3; has and misses ; the digit count is onto with .A function is invertible if and only if it is and .
Show answer
Answer (1) one-one, (2) onto
Invertible means bijective: one-one and onto (Theorem).Put the steps for finding the inverse of a bijection in order.
- Check and
- Call the result
- Solve for in terms of
- Write
Show answer
Answer- Write
- Solve for in terms of
- Call the result
- Check and
Solving for gives the inverse formula, and the two compositions confirm it.
Find your NCERT exercise question
Our practice questions are written for ncert.ai and follow the NCERT exercises. Find the one that matches the question in your textbook; its answer is with it.
| In your NCERT textbook | Practice question here |
|---|---|
| NCERT Exercise 1.1, Q1 | Practice 1.1 · Q1 |
| NCERT Exercise 1.1, Q2 | Practice 1.1 · Q2 |
| NCERT Exercise 1.1, Q3 | Practice 1.1 · Q3 |
| NCERT Exercise 1.1, Q4 | Practice 1.1 · Q4 |
| NCERT Exercise 1.1, Q5 | Practice 1.1 · Q5 |
| NCERT Exercise 1.1, Q6 | Practice 1.1 · Q6 |
| NCERT Exercise 1.1, Q7 | Practice 1.1 · Q7 |
| NCERT Exercise 1.1, Q8 | Practice 1.1 · Q8 |
| NCERT Exercise 1.1, Q9 | Practice 1.1 · Q9 |
| NCERT Exercise 1.1, Q10 | Practice 1.1 · Q10 |
| NCERT Exercise 1.1, Q11 | Practice 1.1 · Q11 |
| NCERT Exercise 1.1, Q12 | Practice 1.1 · Q12 |
| NCERT Exercise 1.1, Q13 | Practice 1.1 · Q13 |
| NCERT Exercise 1.1, Q14 | Practice 1.1 · Q14 |
| NCERT Exercise 1.1, Q15 | Practice 1.1 · Q15 |
| NCERT Exercise 1.1, Q16 | Practice 1.1 · Q16 |
| NCERT Exercise 1.2, Q1 | Practice 1.2 · Q1 |
| NCERT Exercise 1.2, Q2 | Practice 1.2 · Q2 |
| NCERT Exercise 1.2, Q3 | Practice 1.2 · Q3 |
| NCERT Exercise 1.2, Q4 | Practice 1.2 · Q4 |
| NCERT Exercise 1.2, Q5 | Practice 1.2 · Q5 |
| NCERT Exercise 1.2, Q6 | Practice 1.2 · Q6 |
| NCERT Exercise 1.2, Q7 | Practice 1.2 · Q7 |
| NCERT Exercise 1.2, Q8 | Practice 1.2 · Q8 |
| NCERT Exercise 1.2, Q9 | Practice 1.2 · Q9 |
| NCERT Exercise 1.2, Q10 | Practice 1.2 · Q10 |
| NCERT Exercise 1.2, Q11 | Practice 1.2 · Q11 |
| NCERT Exercise 1.2, Q12 | Practice 1.2 · Q12 |
| NCERT Miscellaneous Exercise, Q1 | Miscellaneous exercises · Q1 |
| NCERT Miscellaneous Exercise, Q2 | Miscellaneous exercises · Q2 |
| NCERT Miscellaneous Exercise, Q3 | Miscellaneous exercises · Q3 |
| NCERT Miscellaneous Exercise, Q4 | Miscellaneous exercises · Q4 |
| NCERT Miscellaneous Exercise, Q5 | Miscellaneous exercises · Q5 |
| NCERT Miscellaneous Exercise, Q6 | Miscellaneous exercises · Q6 |
| NCERT Miscellaneous Exercise, Q7 | Miscellaneous exercises · Q7 |
Quick check: MCQs on Relations and Functions
- 1.1 Introduction3 questions
- Equivalence classes4 questions
- 1.3 Types of Functions4 questions
- Invertible functions4 questions
- Miscellaneous Examples2 questions
Key terms (English–Hindi)
- bijective functionएकैकी आच्छादक फलनekaiki aachchhaadak phalan
- A function that is both one-one and onto.
- compositionफलनों का संयोजनphalanon ka sanyojan
- For and , the function , .First seen in the chapter →
- empty relationरिक्त संबंधrikt sambandh
- The relation , in which no element is related to any element.
- equivalence classतुल्यता वर्गtulyata varg
- For an equivalence relation, the set of all elements related to .
- equivalence relationतुल्यता संबंधtulyata sambandh
- A relation that is reflexive, symmetric and transitive.
- functionफलनphalan
- A relation from to that relates each element of to exactly one element of .
- identity functionतत्समक फलनtatsamak phalan
- The function with for every .First seen in the chapter →
- invertible functionव्युत्क्रमणीय फलनvyutkramaniya phalan
- A function with a function such that and .
- one-one functionएकैकी फलनekaiki phalan
- A function with : different inputs give different outputs.
- onto functionआच्छादक फलनaachchhaadak phalan
- A function whose range equals its codomain: every element of the codomain is an image.
- reflexive relationस्वतुल्य संबंधsvatulya sambandh
- A relation with for every in the set.
- relationसंबंधsambandh
- A subset of ; a relation in is a subset of .First seen in the chapter →
- symmetric relationसममित संबंधsammit sambandh
- A relation in which always implies .
- transitive relationसंक्रामक संबंधsankraamak sambandh
- A relation in which and always imply .
- universal relationसार्वत्रिक संबंधsaarvatrik sambandh
- The relation , in which every element is related to every element.