ONTO, One To One and Injective Functions
ONTO, One To One and Injective Functions
ONTO, One To One and Injective Functions
Onto Function
Onto function is a function f that maps an element x to every element y. That means, for every
y, there is an x such that f(x) = y. Onto Function is also called surjective function. The concept
of onto function is very important while determining the inverse of a function. In order to
determine if a function is onto, we need to know the information about both the sets that are
involved. Onto functions are used to project the vectors on 2D flat screens in a 3D video game.
Any function can be decomposed into an onto function or a surjection and an injection. In this
article, let's learn about onto function definition and properties with examples.
What is an Onto Function?
An onto function is a function whose image is equal to its codomain. Also, the range and
codomain of an onto function are equal. We can also say that function is onto when every
y ∈ codomain has at least one pre-image x ∈ domain. Let's go ahead and learn the onto
function definition.
A function f from set A to set B is called an onto function if for each b ∈ B there exists at least
one a ∈ A such that f(a) = b. None of the elements are left out in the onto function because they
are all mapped to some element of A. Consider the example given below:
Consider a function representing the roll numbers of 15 students in a class. Here, the 15
students are the domain of the function, while their roll numbers constitute the codomain
of the given function. Since, for every roll number in the system, there would be a student,
this is an example of onto function.
Onto Function Formula
There is a formula to find the number of onto functions from one set to another. In onto
function from A to B, we need to make sure that all the elements of B are used.
If A has m elements and B has n elements, then the total number of onto functions can be
calculated using the formula,
nm−(n1)(n−1)m+(n2)(n−2m)……..(−1)n−1(nn−1)1m𝑛𝑚−(𝑛1)(𝑛−1)𝑚+(𝑛2)(𝑛−2𝑚)……..(−1)𝑛−1(𝑛
𝑛−1)1𝑚
We need to note that this formula will work only if m ≥ n. But if m < n, then the number of onto
functions will be 0 as it is not possible to use all the elements of B.
Therefore,
Let us see how to find the number of onto functions using an example. If A has m elements and
B has 2 elements, then the number of onto functions will be 2m - 2. This can be explained as:
• From a set of m elements in A to the set of 2 elements in B, the total number of
functions will be 2m.
• And, out of these functions, 2 functions are not onto, if all elements are mapped to
the 1st element of B or all elements are mapped to the 2nd element of B.
• Thus, the total number of onto functions is 2m - 2.
Properties of Onto Function
A function is considered to be an onto function only if the range is equal to the codomain. Here
are some of the important properties of onto function:
• In the onto function, every element in the codomain will be assigned to at least one
value in the domain.
• Every function that is an onto function has a right inverse.
• Every function which has a right inverse can be considered as an onto function.
• A function f: A →B is an onto, or surjective, function if the range of f equals the
codomain of the function f.
• Let f: A →B be an arbitrary function then, every member of A has an image under f
and all the images will be considered as members of T. The set R of these images
can be considered as the range of the function f.
Graph of Onto Function
The easiest way to determine whether a function is an onto function using the graph is to
compare the range with the codomain. If the range equals the codomain, then the function is
onto. A graph of any function can be considered as onto if and only if every horizontal
line intersects the graph at least one or more points. If there is an element of the range of a
function that fails the horizontal line test by not intersecting the graph of the function, then the
function is not surjective. The below-given image is an example of the graph of onto function:
In addition to onto function, the one-to-one function is also an essential prerequisite for learning
about inverse functions. Surjective and Injective functions are the different names for onto and
one-to-one functions, respectively. The primary difference is that onto functions hit all the output
values, whereas one-to-one functions are the ones where each x is connected to only one y.
A function that is both One to One and Onto is called the bijective function. Each value of the
output set is connected to the input set, and each output value is connected to only one input
value.
In the above image, you can see that each element on the left set is connected exactly once to
each element in the right set, hence this function is one to one, and each element on the right
set is connected to the left set, and thus it is onto as well. As it is both one-to-one and onto, it is
said to be bijective. For example, the function y = x is also both one to one and onto; hence it is
bijective. Bijective functions are special classes of functions; they are said to have an inverse.
• Inverse of a Function
• Graphing Functions
• One to One Function
Here is a list of a few points that should be remembered while studying onto function.
• Example 1: Let C = {1, 2, 3}, D = {4, 5} and let g = {(1, 4), (2, 5), (3, 5)}. Show that
the function g is an onto function from C into D.
Solution:
Since, there is no real number x such that x2 = −1, therefore the given function is not
an onto function. However, the function g : R → R ≥ 0 defined by g(x) = x2 , with the
restricted codomain is an onto function, since, for every y in the non-negative real
codomain Y, there is at least one x in the real domain X such that x2 = y.
Practice Questions on Onto Function
"A function is onto when its range and codomain are equal"
Responses
• True
True
• False
False
Check Answer
• Surjective function
Surjective function
• Constant function
Constant function
• Identity function
Identity function
• Injective function
Injective function
Check Answer
FAQs on Onto Function
A function is onto function when its range and codomain are equal. We can also say that
function is onto when every y ∈ codomain has at least one pre-image x ∈ domain.
How Do You Know if a Function is an Onto Function?
A function g from set A to set B is called an onto function if for each b ∈ B there exists at least
one a ∈ A such that g (a) = b. To show that g is an onto function, we can set y = g(x), and then
solve for x, or we can also show that x can always be expressed in terms of y for any y ∈ B.
What is the Difference Between Onto and Into Functions?
One main difference between onto function and into the function is that, for onto function, each
element of the output set B should definitely be connected to the elements in the input set A.
Whereas for an into function, there should be at least one element in the output set B that
should not be connected to the elements of the input set A.
How Do You Prove a Function is Not Onto?
In order to prove that a function is not onto, we should find an element in the codomain that is
not the image of any element of the domain.
Can a Function Be Both One to One and Onto?
Yes, there can be a function that is both one to one and onto and it is called the bijective
function. Each value of the output set is connected to the input set, and each output value is
connected to only one input value.
What is the Other Name of the Onto Function?
Onto function is also called a surjective function. Any function can be decomposed into an onto
function or a surjection and an injection.
What is the Difference Between One-to-One vs Onto Functions?
Surjective and Injective functions are the different names for Onto and One to One functions,
respectively. The primary difference is that Surjective functions hit all the output values,
whereas Injective functions are the ones where each x is connected to only one y.
What are One-One and Onto Functions?
One-to-one functions are special functions that return a unique range for each element in their
domain while, onto functions are the functions with the range equal to the codomain.
How to Determine if the Function is Onto Function Using Graph?
The method to determine whether a function is an onto function using the graph is to compare
the range with the codomain from the graph. If the range equals the codomain, then the given
function is onto.
What is the Relation Between Codomain and Range for an Onto Function?
A function is considered to be an onto function only if the range is equal to the codomain. This is
the relationship between the codomain and the range for an onto function.
Injective Function
Injective function is a function with relates an element of a given set with a distinct element of
another set. An injective function is also referred to as a one-to-one function. There are
numerous examples of injective functions. The name of a student in a class, and his roll
number, the person, and his shadow, are all examples of injective function.
Let us learn more about the definition, properties, examples of injective functions.
What Is an Injective Function?
In an injective function, every element of a given set is related to a distinct element of another
set. A function f : X → Y is defined to be one-one (or injective), if the images of distinct elements
of X under f are distinct, i.e., for every x1, x2 ∈ X, there exists distinct y1, y2 ∈ Y, such that f(x1)
= y1, and f(x2) = y2.
The injective function can be represented in the form of an equation or a set of elements. The
function f(x) = x + 5, is a one-to-one function. This can be understood by taking the first five
natural numbers as domain elements for the function. The function f = {(1, 6), (2, 7), (3, 8), (4,
9), (5, 10)} is an injective function.
The following images in Venn diagram format helpss in easily finding and understanding the
injective function. We can observe that every element of set A is mapped to a unique element in
set B. Further, if any element is set B is an image of more than one element of set A, then it is
not a one-to-one or injective function.
Properties of Injective Function
• The domain and the range of an injective function are equivalent sets.
• The sets representing the domain and range set of the injective function have an
equal cardinal number.
• Injective functions if represented as a graph is always a straight line.
• The injective function follows a reflexive, symmetric, and transitive property.
Related Topics
• Example 1: Show that the function relating the names of 30 students of a class with
their respective roll numbers is an injective function.
Solution:
Given that the domain represents the 30 students of a class and the names of these
30 students. The range represents the roll numbers of these 30 students. Here no
two students can have the same roll number. Hence the function connecting the
names of the students with their roll numbers is a one-to-one function or an injective
function.
• Example 2: The two function f(x) = x + 1, and g(x) = 2x + 3, is a one-to-one function.
Find gof(x), and also show if this function is an injective function.
Solution:
the given functions are f(x) = x + 1, and g(x) = 2x + 3. We need to combine these two
functions to find gof(x).
gof(x) = 2x + 5
Let us now take the first five natural numbers as domain of this composite function.
gof(1) = 2(1) + 5 = 2 + 5 = 7
gof(2) = 2(2) + 5 = 4 + 5 = 9
gof(3) = 2(3) + 5 = 6 + 5 = 11
gof(4) = 2(4) + 5 = 8 + 5 = 13
gof(5) = 2(5) + 5 = 10 + 5 = 15
gof(x) = {(1, 7), (2, 9), (3, 11), (4, 13), (5, 15)}.
Here the distinct element in the domain of the function has distinct image in the
range.
Responses
• Onto Function
Onto Function
• Constant Function
Constant Function
• One-to-One & Onto Function
One-to-One & Onto Function
• One-to-One Function
One-to-One Function
Check Answer
• Q 2. What is the range of the injective function f(x) = 5x + 3, having the domain
elements as {2, 3, 5}?
Responses
Check Answer
FAQs on Injective Function
The function in which every element of a given set is related to a distinct element of another set
is called an injective function. A function f : X → Y is defined to be one-one (or injective), if the
images of distinct elements of X under f are distinct, i.e., for every x1, x2 ∈ X, there exists
distinct y1, y2 ∈ Y, such that f(x1) = y1, and f(x2) = y2.
How Do You Know If a Function is an Injective Function?
A function can be identified as an injective function if every element of a set is related to a
distinct element of another set. The codomain element is distinctly related to different elements
of a given set. If this is not possible, then it is not an injective function.
What Is the Difference Between Injective and Surjective Function?
The injective function related every element of a given set, with a distinct element of another
set, and is also called a one-to-one function. The subjective function relates every element in
the range with a distinct element in the domain of the given set. A subjective function is also
called an onto function. The injective function and subjective function can appear together, and
such a function is called a Bijective Function.
Give a Few Real-Life Examples of Injective Function?
• The name of the student in a class and the roll number of the class.
• The person and the shadow of the person, for a single light source.
• The traveller and his reserved ticket, for traveling by train, from one destination to
another.