Physics Wallah

Relations And Functions Class 12 Maths: Concepts, Types, Formulas, And Examples

Relations and Functions is an important chapter in Class 12 Maths. It covers Cartesian products, different types of relations, equivalence relations, functions, domain, codomain, and range. You will also learn how to identify one-to-one, onto, into, and bijective functions. Understanding these concepts and practising examples will help you solve questions from this chapter.

authorImageAnanya Gupta14 Nov, 2026
Relations And Functions Class 12 Maths: Concepts, Types, Formulas, And Examples

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.

Ordered Pairs And Cartesian Products

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.

Relations And Their Number

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.

Important Types Of Relations

In Class 12 Maths, you will study different types of relations. Each type has a specific condition that you need to check.

Empty And Universal Relations

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)}

Identity And Reflexive Relations

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.

Symmetric Relation

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.

Transitive Relation

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.

Equivalence Relation

A relation is called an equivalence relation when it satisfies all three conditions:

  1. Reflexive: Every element is related to itself.

  2. Symmetric: If one element is related to another, the reverse relation must also exist.

  3. 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.

Number Of Reflexive And Symmetric Relations

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.

Functions: Meaning And Basic Terms

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}

Vertical Line Test

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.

Types Of Functions

Class 12 Maths covers different types of functions based on how inputs and outputs are connected.

One-To-One Or Injective Function

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)

Many-To-One Function

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.

Onto Or Surjective Function

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)

Into Function

A function is called into when some elements of the codomain are not mapped by any element of the domain.

Therefore:

Range ≠ Codomain

Bijective Function

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!

Important Formulas For Functions

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.

Testing One-To-One And Onto Properties

You can check whether a function is one-to-one or onto by following simple steps.

How To Check Whether A Function Is One-To-One

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.

How To Check Whether A Function Is Onto

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.

 

Relations And Functions FAQs

What is the difference between range and codomain?

The codomain is the complete set of possible output values, while the range contains only the values that a function actually produces. The range can be equal to or smaller than the codomain.

Is every identity relation reflexive?

Yes. An identity relation contains every pair of the form (a, a). Therefore, every element is related to itself, which makes it reflexive. However, a reflexive relation may contain additional ordered pairs.

How can you check whether a graph represents a function?

Use the vertical line test. If a vertical line intersects the graph at more than one point, the graph does not represent a function.
Join 15 Million students on the app today!
Point IconLive & recorded classes available at ease
Point IconDashboard for progress tracking
Point IconLakhs of practice questions
Download ButtonDownload Button
Banner Image
Banner Image
Free Learning Resources
Know about Physics Wallah
Physics Wallah is an Indian edtech platform that provides accessible & comprehensive learning experiences to students from Class 6th to postgraduate level. We also provide extensive NCERT solutions, sample paper, NEET, JEE Mains, BITSAT previous year papers & more such resources to students. Physics Wallah also caters to over 3.5 million registered students and over 78 lakh+ Youtube subscribers with 4.8 rating on its app.
We Stand Out because
We provide students with intensive courses with India’s qualified & experienced faculties & mentors. PW strives to make the learning experience comprehensive and accessible for students of all sections of society. We believe in empowering every single student who couldn't dream of a good career in engineering and medical field earlier.
Our Key Focus Areas
Physics Wallah's main focus is to make the learning experience as economical as possible for all students. With our affordable courses like Lakshya, Udaan and Arjuna and many others, we have been able to provide a platform for lakhs of aspirants. From providing Chemistry, Maths, Physics formula to giving e-books of eminent authors like RD Sharma, RS Aggarwal and Lakhmir Singh, PW focuses on every single student's need for preparation.
What Makes Us Different
Physics Wallah strives to develop a comprehensive pedagogical structure for students, where they get a state-of-the-art learning experience with study material and resources. Apart from catering students preparing for JEE Mains and NEET, PW also provides study material for each state board like Uttar Pradesh, Bihar, and others

Copyright © 2026 Physicswallah Limited All rights reserved.