Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Onto Function in Maths: Meaning, Definition, and Examples

Reviewed by:
ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon
SearchIcon

How to Check if a Function is Onto?

The concept of onto function plays a key role in mathematics and is widely applicable to both real-life situations and exam scenarios. Understanding onto functions helps students master core ideas from set theory, relations and functions, and prepares them for competitive exams like JEE and Olympiads.


What Is Onto Function?

An onto function (or surjective function) is a type of mapping from set A (domain) to set B (codomain) in which every element in set B is the image of at least one element in set A. In simple terms, an onto function covers the entire codomain with the image of the function. You’ll find this concept applied in areas such as set theory, discrete mathematics, and combinatorics.


Key Formula for Onto Function

Here’s the standard formula for calculating the number of onto functions from set A (with n elements) to set B (with m elements):

\( \text{Number of onto functions} = m! \left[ \sum_{k=0}^m \frac{(-1)^k}{k!} \cdot (m-k)^n \right] \)
If \( n < m \), then there are no onto functions. If \( n = m \), the number is \( m! \).


Cross-Disciplinary Usage

An onto function is not only useful in Maths but also plays an important role in Physics, Computer Science, and daily logical reasoning. Students preparing for JEE or NEET will see its relevance in various questions about mappings, invertible functions, and problem-solving involving permutations and combinations.


Step-by-Step Illustration

  1. Given the function \( f: \mathbb{R} \rightarrow \mathbb{R} \) defined by \( f(x) = 2x + 3 \). Is it an onto function?
    1. Start by setting \( y = 2x + 3 \) where \( y \in \mathbb{R} \).

    2. Solve for \( x \): \( x = \frac{y - 3}{2} \).

    3. For every \( y \) in \( \mathbb{R} \), there exists a real \( x \), so every codomain value is hit.

    4. Conclusion: This is an onto function.

Speed Trick or Vedic Shortcut

Here’s a quick shortcut to check whether a function \( f: A \rightarrow B \) is onto: Compare the range and codomain. If every value needed in the codomain can be made by the function for some input, the function is onto.


Example Trick: For polynomial or algebraic functions, try solving \( f(x) = y \) for a generic \( y \) in the codomain. If you can always find such an \( x \), then \( f \) is onto. This approach helps during MCQ exams. More such tips are available during Vedantu’s live classes for competitive exams.


Try These Yourself

  • Identify if \( f(x) = x^2 \), \( f: \mathbb{R} \rightarrow \mathbb{R} \) is an onto function.
  • For set A = {1,2,3}, set B = {a,b}, list all onto functions from A to B.
  • Given \( f(x) = 5x - 4 \), is the function onto for \( f: \mathbb{Z} \rightarrow \mathbb{Z} \)?
  • Does every function with the same range and codomain become onto?

Frequent Errors and Misunderstandings

  • Confusing onto function (surjective) with one-to-one (injective).
  • Ignoring codomain elements left unmapped (range not equal to codomain).
  • Assuming all functions from equal-sized sets are automatically onto—look for duplicates and missing elements!

Relation to Other Concepts

The idea of onto function connects closely with topics such as one-to-one (injective) functions, bijective functions, and basic set mapping concepts. Mastering onto functions makes it easier to handle questions on the inverse of a function, graph-based function analysis, and permutation problems.


Classroom Tip

A quick way to remember an onto function is to think: “No element in the codomain left behind.” Draw arrows from domain to codomain (like in a mapping diagram): if every codomain box has at least one arrow pointing to it, the function is onto. Vedantu’s teachers use similar visual tricks in their functions lessons here.


Typical Example and Solution

Example: Let \( f: \mathbb{R} \to \mathbb{R} \) be defined as \( f(x) = x^2 \). Is this function onto?

1. Let \( y \in \mathbb{R} \), try to find \( x \) such that \( x^2 = y \).

2. For \( y < 0 \), there is no real value of \( x \) that satisfies \( x^2 = y \) (since square of real number is always non-negative).

3. The range is \( \mathbb{R}_{\geq 0} \), but codomain is \( \mathbb{R} \), so not all codomain values are reached.

Conclusion: The function is NOT onto.


Comparison Table: Onto, Into & Bijective Functions

Function Type Meaning Example
Onto (Surjective) Every codomain element is mapped f(x) = 2x + 3, f: ℝ → ℝ
Into At least one codomain element is NOT mapped f(x) = x^2, f: ℝ → ℝ
Bijective Both one-to-one and onto f(x) = x, f: ℝ → ℝ

Wrapping It All Up

We explored onto function—from definition, formula, examples, mistakes, and connections to other subjects. Continue practicing with Vedantu to become confident in solving problems using this important topic. For deeper study, visit more on types of functions, domain and range, and function inverses.


Best Seller - Grade 12 - JEE
View More>
Previous
Next

FAQs on Onto Function in Maths: Meaning, Definition, and Examples

1. What is an onto function in Maths, and what is its other name?

An onto function, also known by its technical name surjective function, is a mapping from a domain (set A) to a codomain (set B) where every single element in the codomain B is the image of at least one element from the domain A. In simple terms, every possible output is achieved at least once.

2. What is the main condition that proves a function is onto?

The single most important condition for a function to be onto is that its range must be equal to its codomain. The range is the set of all actual outputs the function produces, while the codomain is the set of all possible outputs. If these two sets are identical, the function is onto.

3. How does an onto (surjective) function differ from a one-to-one (injective) function?

The primary difference lies in what each property guarantees:

  • An onto (surjective) function guarantees that every element in the codomain is mapped to. It is concerned with covering all possible outputs.
  • A one-to-one (injective) function guarantees that distinct inputs have distinct outputs. It is concerned with the uniqueness of the mapping.
A function can be onto but not one-to-one, one-to-one but not onto, both (bijective), or neither.

4. Could you give an example of a function that is onto and another that is not?

Certainly. Consider functions from the set of real numbers (ℝ) to itself (f: ℝ → ℝ):

  • Example of an Onto Function: The linear function f(x) = 2x + 1 is onto. For any real number 'y' in the codomain, we can always find an x = (y-1)/2 in the domain that maps to it.
  • Example of a NON-Onto Function: The function f(x) = x² is not onto. The range consists only of non-negative numbers [0, ∞), which is a proper subset of the codomain ℝ. No negative real number like -4 has a real pre-image.

5. Why is the 'onto' property essential for a function to have an inverse?

A function can only have an inverse if it is bijective (both one-to-one and onto). The 'onto' property is crucial because it ensures every element in the codomain has a pre-image. When finding an inverse, the original codomain becomes the new domain. If the function weren't onto, some elements in the inverse's domain would have no value to map to, which violates the definition of a function.

6. How can you use a graph to determine if a function is onto?

You can use a modified version of the Horizontal Line Test. For a function f: A → B to be onto, every horizontal line drawn at a y-value belonging to the codomain B must intersect the function's graph at least once. If you can draw any horizontal line corresponding to a value in the codomain that does not intersect the graph at all, the function is not onto.

7. What is the step-by-step method to formally prove a function is onto?

To prove a function f: A → B is onto, you must show that for any element in the codomain, there's a corresponding element in the domain. The steps are:

  1. Choose an arbitrary element 'y' from the codomain B (i.e., let y ∈ B).
  2. Set the function's formula equal to y: f(x) = y.
  3. Solve this equation for 'x' in terms of 'y'.
  4. Show that for any 'y' in B, the resulting 'x' is a valid element of the domain A.
If this holds true, the function is surjective.

8. Can an onto function exist from a smaller set to a larger set? Explain why or why not.

No, an onto function cannot exist from a smaller set to a larger set. Let the domain be set A with 'm' elements and the codomain be set B with 'n' elements. If m < n, it is impossible to map to every distinct element in set B because there are not enough elements in set A to do so. This is a fundamental concept based on the pigeonhole principle. Therefore, for an onto function to exist, the condition m ≥ n must be satisfied.