
Onto Function definition formula properties and solved examples
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
-
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.
FAQs on Onto Function in Mathematics Explained Clearly
1. What is an onto function?
An onto function (surjective function) is a function in which every element of the codomain has at least one pre-image in the domain. In other words, the range is equal to the codomain.
- For a function f: A → B, f is onto if for every b ∈ B, there exists at least one a ∈ A such that f(a) = b.
- No element in the codomain is left unmapped.
- Onto functions are also called surjections.
2. How do you determine if a function is onto?
A function is onto if every element in the codomain has at least one solution in the domain. To check:
- Step 1: Write the function as y = f(x).
- Step 2: Replace f(x) with y and solve for x.
- Step 3: If for every y in the codomain you can find at least one real solution for x, then the function is onto.
3. What is the difference between onto and one-to-one functions?
The key difference is that an onto (surjective) function covers the entire codomain, while a one-to-one (injective) function maps distinct inputs to distinct outputs.
- Onto: Every element in the codomain has at least one pre-image.
- One-to-one: If f(a) = f(b), then a = b.
- A function can be onto, one-to-one, both (bijective), or neither.
4. Can you give an example of an onto function?
An example of an onto function is f: ℝ → ℝ defined by f(x) = x³. Every real number y has a real cube root.
- Set y = x³.
- Then x = ∛y.
- Since a real cube root exists for every real y, the function is onto.
5. What is the formula or condition for a function to be onto?
A function f: A → B is onto if ∀ b ∈ B, ∃ a ∈ A such that f(a) = b. This is the formal mathematical condition for surjectivity.
- The range = codomain.
- Every output value in B must be achieved by some input from A.
6. Is every linear function onto?
A linear function f(x) = ax + b (from ℝ to ℝ) is onto if a ≠ 0.
- If a ≠ 0, solving y = ax + b gives x = (y − b)/a, which exists for all real y.
- If a = 0, then f(x) = b, a constant function, which is not onto unless the codomain contains only b.
7. What is the relationship between onto and bijective functions?
A function is bijective if it is both onto (surjective) and one-to-one (injective).
- Onto ensures every element of the codomain is covered.
- One-to-one ensures no two inputs share the same output.
- Only bijective functions have an inverse function defined on the entire codomain.
8. How do you prove a function is onto in exams?
To prove a function is onto, you must show that for every y in the codomain, there exists an x in the domain such that f(x) = y.
- Step 1: Let y = f(x).
- Step 2: Solve for x in terms of y.
- Step 3: Show that this x belongs to the domain for all y in the codomain.
9. Can a function be onto but not one-to-one?
Yes, a function can be onto but not one-to-one if multiple inputs map to the same output while still covering the entire codomain.
- Example: f: ℝ → [0, ∞) defined by f(x) = x² is onto because every non-negative real number has a square root.
- However, f(2) = 4 and f(−2) = 4, so it is not one-to-one.
10. Why is the concept of onto function important?
The concept of an onto function is important because it ensures complete mapping of the codomain and is essential for defining inverse functions.
- Only functions that are both onto and one-to-one are bijective.
- Surjective functions are widely used in algebra, calculus, and linear transformations.
- They help determine whether an inverse function exists over the entire codomain.

































