Summarize this article:
Last updated on October 16, 2025
A surjective function is one in which every element of set B is associated with at least one element of set A. In a surjective function, the range is the same as the codomain. In this article, we will learn more about surjective functions, their properties, and formulas.
The surjective function ensures that every element in set B is matched with at least one element in set A. It means that each item in set B gets mapped to at least one element in set A.
Example:
If A = {1, 2, 3} and B = {a, b}, and the function is f = {(1, a), (2, b), (3, b)}. Here, both a and b are used. No element in the set B is unmapped, so this is a surjective function.
Look at the given image to understand how a surjective function works visually.
Functions can be classified into different types based on how elements from one set are mapped to elements of another set. The two main types of functions are: injective functions and surjective functions. The difference between injective and surjective functions is given below:
Category |
Injective Function |
Surjective Function |
Nature of Mapping |
Every element from the domain set maps to a different unique element in the codomain set. |
Every element in the codomain set is connected to at least one element from the domain. |
Collisions |
Two different elements in the domain never map to the same element in the codomain. |
Two or more elements from the same domain map to the same element in the codomain. |
Inverse Function |
A function has an inverse only if the function is surjective and injective |
A surjective function may not have an inverse unless it is also injective. |
Range and codomain |
Range can be equal to or smaller than the codomain. |
Range and codomain are always equal. |
Symbolic Notation |
f: A → B |
g: A → B |
Example |
f(x) = x2 |
g(x) = ex |
A function is said to be a surjective function only when the range is equal to the codomain. Given are some of the properties of a surjective function:
For finding the number of onto functions from a set A with n elements to a set B with m elements:
Total number of functions from A to B = mn
Number of surjective functions = Total number of functions - Number of functions that are not surjective.
The number of surjective functions can be calculated by using a special formula.
The formula to find the total number of functions that are not surjective:
1mm - 1n + 2mm - 2n - 3mm - 3n + … - m - 1m1n
The number of surjective functions that can be found using the formula:
mn - 1mm - 1n + 2mm - 2n - 3mm - 3n + … - m - 1m1n
When n < m, the number of surjective functions = 0
n = m, the number of surjective functions = m!
In real life, we sometimes need to match items from one group to another so that nothing in the second group is left out. This idea is similar to a surjective function. Such functions are useful in many areas, like computer science, business, and daily activities. Some examples include:
When learning about surjective functions, students often make mistakes, such as misunderstanding the difference between the range and codomain or confusing surjective with one-to-one functions. Identifying and rectifying these mistakes can help them understand it more clearly.
Let A = {1, 2, 3} and B = {a, b}. Is the function f = {(1, a), (2, b), (3, b)} surjective?
Yes, the given function is surjective.
The codomain (B) is {a, b}
The range of f is {a, b}
Since the range and the codomain are the same, this function is surjective.
Let A = {x, y, z} and B = {1, 2, 3}. Is the function g = {(x, 1), (y, 1), (z, 2)} surjective?
No, the function is not surjective.
codomain of the given expressions is B = {1, 2, 3}
The range of g is {1, 2}
Since, range and codomain are not equal so the function g is not surjective.
Consider the function f: R → R defined by f(x) = x + 2. Is the function surjective?
Yes, the function is surjective.
The codomain is all the real numbers(R)
For any real number y, we can find an x such that f(x) = y.
Given f(x) = x + 2,
Solving x + 2 = y, which gives x = y - 2
Since x exists for every y ∈ R, the function is surjective.
Let A = {1, 2, 3, 4} and B = {a, b, c}. Is the function h = {(1, a), (2, b), (3, b), (4, c)} surjective?
Yes, the function is surjective
codomain B = {a, b, c}
The range of h is {a, b, c}, because all elements of B are covered.
Since the range and codomain are the same, the function is surjective.
Is the function f: R → R defined by f(x) = x2 surjective?
No, the function is not surjective
The codomain is all real numbers
The range of f(x) = x2 is [0, ∞), which includes only non-negative numbers.
Since negative numbers in R are not covered, f is not surjective.
Jaskaran Singh Saluja is a math wizard with nearly three years of experience as a math teacher. His expertise is in algebra, so he can make algebra classes interesting by turning tricky equations into simple puzzles.
: He loves to play the quiz with kids through algebra to make kids love it.