

Relations and Functions is an important chapter in Class 12 Mathematics. It explains how two sets are connected and how a function assigns an output to each input. You will come across concepts such as ordered pairs, Cartesian products, types of relations, domain, range and different types of functions.
Before moving to functions, it is important to understand how relations work. Once you are clear about these basic concepts, topics such as one-to-one, onto and bijective functions become easier to understand.
An ordered pair is written as (x, y), where x is the first element and y is the second element. The position of both elements matters.
For example:
(2, 3) ≠ (3, 2)
Two ordered pairs are equal only when their corresponding elements are equal.
(x, y) = (a, b) if x = a and y = b.
Example:
If A = {1, 2, 3} and B = {a, b}, their Cartesian product is:
A × B = {(1, a), (1, b), (2, a), (2, b), (3, a), (3, b)}
The Cartesian product of two sets contains all possible ordered pairs formed by taking the first element from A and the second element from B.
Some important points to remember:
A × B is not generally equal to B × A.
The number of elements in A × B is the product of the number of elements in A and B.
If n(A) = m and n(B) = n, then n(A × B) = mn.
Before starting this chapter, revise the basics of sets with Class 11 Maths Questions.
A relation is a subset of the Cartesian product of two sets.
If R is a subset of A × B, then R is called a relation from A to B. It shows which elements of one set are related to elements of another set.
The empty set is also considered a relation because it is a subset of every set.
Formula for the number of relations
If set A has m elements and set B has n elements, then:
n(A × B) = mn
The number of possible relations from A to B is:
Number of relations = 2^(mn)
This formula is useful in questions where you are asked to find the total number of relations between two finite sets.
For a better understanding of the chapter, refer to Relations and Functions Class 12 Notes.
In Class 12 Maths, you will study different types of relations. Each type has a specific condition that you need to check.
An empty relation is a relation that has no ordered pairs.
R = ∅
A universal relation contains all possible ordered pairs of a set.
R = A × A
For example, if A = {1, 2}, then the universal relation is:
R = {(1, 1), (1, 2), (2, 1), (2, 2)}
An identity relation contains only those ordered pairs in which both elements are the same.
Iₐ = {(a, a) : a ∈ A}
A relation is called reflexive when every element of a set is related to itself.
(a, a) ∈ R for every a ∈ A.
The difference is simple: an identity relation contains only self-related pairs, while a reflexive relation can contain other pairs as well.
A relation is symmetric if reversing an ordered pair also gives a pair in the same relation.
In simple terms, if x is related to y, then y must also be related to x.
Mathematically:
If (x, y) ∈ R, then (y, x) ∈ R.
Example:
The relation 'is a sibling of' is symmetric. If A is a sibling of B, then B is also a sibling of A.
A relation is transitive when the following condition is satisfied:
If (x, y) ∈ R and (y, z) ∈ R, then (x, z) ∈ R.
Example:
Consider:
R = {(1, 2), (2, 3), (1, 3)}
Since (1, 2) and (2, 3) are present, (1, 3) must also be present. Therefore, the relation satisfies the transitive condition.
A relation is called an equivalence relation when it satisfies all three conditions:
Reflexive: Every element is related to itself.
Symmetric: If one element is related to another, the reverse relation must also exist.
Transitive: If one element is related to a second and the second is related to a third, the first must be related to the third.
You should remember all three conditions because questions on equivalence relations often ask you to check whether a given relation satisfies them.
Example:
The relation of congruence modulo 3 on integers is an equivalence relation because it is reflexive, symmetric, and transitive.
Practise textbook questions using NCERT Solutions for Class 12 Maths Chapter 1.
There are two useful formulas for finding the number of reflexive and symmetric relations on a finite set.
If a set A contains n elements:
Number of reflexive relations:
2^(n² − n)
Number of symmetric relations:
2^[n(n+1)/2]
These formulas are useful for solving direct questions based on the number of elements in a set.
A function is a special type of relation in which every input has exactly one output.
A function can have two or more inputs with the same output. However, one input cannot have more than one output.
A function from set A to set B is written as:
f : A → B
Here are three important terms you should understand:
Domain: The set of all possible input values.
Codomain: The set in which the output values are expected to lie.
Range: The set of actual output values obtained from the function.
Example:
Suppose A = {1, 2, 3, 4} and B = {a, b, c, d, e, f}.
If the elements of A map to (a, a, b, c), then:
Domain = {1, 2, 3, 4}
Range = {a, b, c}
Codomain = {a, b, c, d, e, f}
Notice that the range contains only the elements that are actually obtained as outputs. Therefore, it can be smaller than the codomain.
Example of a function's domain:
Consider:
f(x) = 1/x
This function is not defined at x = 0 because division by zero is not possible.
Therefore:
Domain = R − {0}
The vertical line test helps you identify whether a graph represents a function.
Draw imaginary vertical lines across the graph. If any vertical line cuts the graph at more than one point, it does not represent a function.
This is because a function must have only one output for every input.
Class 12 Maths covers different types of functions based on how inputs and outputs are connected.
A function is one-to-one when different inputs always have different outputs.
For example, if f(x) = 2x, then different values of x produce different values of f(x).
For finite sets, a one-to-one function is possible only when:
n(B) ≥ n(A)
A many-to-one function allows two or more different inputs to have the same output.
For example:
f(x) = x²
Here:
f(2) = 4
f(−2) = 4
Both inputs give the same output. Therefore, the function is many-to-one when its domain includes both positive and negative real numbers.
A function is onto when every element of the codomain has at least one corresponding input.
In other words:
Range = Codomain
For finite sets, an onto function is possible only when:
n(A) ≥ n(B)
A function is called into when some elements of the codomain are not mapped by any element of the domain.
Therefore:
Range ≠ Codomain
A function is bijective when it is both one-to-one and onto.
This means:
Different inputs have different outputs.
Every element of the codomain is covered.
Bijective function = One-to-one + Onto
For two finite sets containing n elements each, the number of bijective functions is:
n!
Some counting formulas are frequently used in questions from this chapter.
If n(A) = a and n(B) = b, then:
Total number of functions: b^a
Number of one-to-one functions: b!/(b − a)!, provided b ≥ a.
Number of bijective functions: n!, when both sets contain n elements.
Remember these formulas while solving questions based on the number of possible functions.
You can check whether a function is one-to-one or onto by following simple steps.
Start by assuming:
f(x₁) = f(x₂)
Now simplify both sides.
If the result gives:
x₁ = x₂
the function is one-to-one.
If you can find two different inputs with the same output, the function is not one-to-one.
First, calculate the range of the function. Then compare it with the codomain.
If Range = Codomain, the function is onto.
If Range ≠ Codomain, the function is into.
Example: f(x) = x²
The answer depends on the domain and codomain.
|
f: N → N |
Yes |
No |
|
f: Z → Z |
No |
No |
|
f: R → R |
No |
No |
For f : R → R, both 2 and −2 give the same output:
f(2) = f(−2) = 4
Therefore, the function is not one-to-one.
Its range is [0, ∞), which does not cover all real numbers. Hence, it is not onto.
Understanding Relations and Functions requires a clear understanding of sets, mappings, different types of relations and functions. Physics Wallah's Class 12 Maths Courses offer live classes where students can learn important concepts, practise NCERT questions and clarify their doubts. Study materials, practice questions and revision sessions help students understand topics such as one-to-one, onto and bijective functions and prepare effectively for their Class 12 board examinations.