JEE Onto Functions vs Into Functions
The difference between onto and into functions comes down to a single question: does the range fill up the entire codomain or not? Onto functions use up every element of the codomain, while into functions leave at least one element without a pre-image. Getting this distinction right is what separates a correct answer from a wasted minute in Relations and Functions problems. This guide covers definitions, checking methods, counting formulas and the exact traps JEE sets on this topic.
What are Onto and Into Functions?
Take a function $$f: A \to B$$, where $$A$$ is the domain and $$B$$ is the codomain. The set of all images, $$f(A) = \{f(x) : x \in A\}$$, is called the range. The range is always a subset of the codomain, and how it sits inside the codomain decides the classification.
A function $$f: A \to B$$ is onto (also called surjective) if every element of $$B$$ is the image of at least one element of $$A$$. In symbols, for every $$y \in B$$ there exists some $$x \in A$$ with $$f(x) = y$$.
A function $$f: A \to B$$ is into if at least one element of $$B$$ has no pre-image in $$A$$. The range is then a proper subset of the codomain. "Into" is the term used in NCERT-based Indian textbooks and in JEE coaching material; internationally the same idea is written as "not surjective".
$$f \text{ is onto} \iff f(A) = B \qquad$$ and $$\qquad f \text{ is into} \iff f(A) \subsetneq B$$
Two quick examples make this concrete. For $$f: \mathbb{R} \to \mathbb{R}$$ with $$f(x) = 2x + 5$$, any real $$y$$ is hit by $$x = \dfrac{y-5}{2}$$, so the function is onto. For $$g: \mathbb{R} \to \mathbb{R}$$ with $$g(x) = x^2$$, no negative number is an image, so $$g$$ is into.
Notice that onto and into are mutually exclusive and exhaustive. Every function is exactly one of the two. There is no third possibility and no overlap, which is why a question asking you to "show the function is not onto" is really asking you to produce one unreachable element of the codomain.
Key Differences Between Onto and Into Functions
The table below is the fastest revision tool for this pair. Read it column-wise once, then test yourself by covering the right two columns.
| Property | Onto Function | Into Function |
|---|---|---|
| Definition | Every element of the codomain has at least one pre-image | At least one element of the codomain has no pre-image |
| Range vs codomain | Range equals codomain, $$f(A) = B$$ | Range is a proper subset, $$f(A) \subsetneq B$$ |
| Standard name | Surjective function | Non-surjective function |
| Solving $$f(x) = y$$ | Solvable in $$A$$ for every $$y \in B$$ | Has no solution in $$A$$ for some $$y \in B$$ |
| Finite set condition | Possible only when $$n(A) \ge n(B)$$ | Always possible when $$n(A) \lt n(B)$$; possible otherwise too |
| Horizontal line test | Every line $$y = c$$, $$c \in B$$, meets the graph at least once | Some line $$y = c$$, $$c \in B$$, misses the graph |
| Count for finite sets | $$\displaystyle\sum_{r=0}^{n}(-1)^r \binom{n}{r}(n-r)^m$$ | $$n^m - \displaystyle\sum_{r=0}^{n}(-1)^r \binom{n}{r}(n-r)^m$$ |
| Link with invertibility | Necessary condition; onto plus one-one gives a bijection | Never invertible on the given codomain |
| Effect of shrinking codomain to range | No change, already onto | Becomes onto immediately |
| Typical example | $$f: \mathbb{R} \to \mathbb{R},\ f(x) = x^3$$ | $$f: \mathbb{R} \to \mathbb{R},\ f(x) = e^x$$ |
Two rows deserve emphasis. First, onto-ness is a property of the triple (rule, domain, codomain), not of the formula alone. Second, an into function is not a defective object; it simply has a codomain larger than its range. Once the table is clear, solving a mixed set of JEE Questions on functions will show you how examiners hide a change of codomain inside a single line of the problem statement.
How to Check Whether a Function Is Onto or Into
For real-valued functions the reliable method is to compute the range and compare it with the stated codomain. Three standard routes work for almost every JEE-level function.
Solve for $$x$$ in terms of $$y$$. Set $$y = f(x)$$, invert the relation, and find the set of $$y$$ for which $$x$$ exists inside the domain. That set is the range.
Use monotonicity and continuity. A continuous strictly increasing or decreasing function on an interval takes every value between its end behaviour values.
Use standard ranges. Squares and even powers are non-negative, exponentials are positive, sine and cosine lie in $$[-1, 1]$$, and $$\tan^{-1}x$$ lies in $$\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$$.
Example 1. $$f: \mathbb{R} \to \mathbb{R}$$, $$f(x) = x^2 - 4x + 7$$.
$$f(x) = (x-2)^2 + 3 \ge 3$$, so the range is $$[3, \infty)$$, a proper subset of $$\mathbb{R}$$. The function is into. If the codomain is changed to $$[3, \infty)$$, the same rule becomes onto.
Example 2. $$f: \mathbb{R} \to \mathbb{R}$$, $$f(x) = x^3 + x$$.
$$f'(x) = 3x^2 + 1 \gt 0$$ for all $$x$$, so $$f$$ is strictly increasing and continuous with $$f(x) \to \pm\infty$$ at the two ends. The range is $$\mathbb{R}$$, so the function is onto and also one-one, hence bijective.
Example 3. $$f: \mathbb{Z} \to \mathbb{Z}$$, $$f(x) = 2x$$.
The range is the set of even integers. The element $$3$$ has no pre-image, so $$f$$ is into although it is one-one. This single example kills the common belief that one-one implies onto.
Example 4. $$f: \mathbb{R} \to \mathbb{R}$$, $$f(x) = \dfrac{x}{1 + x^2}$$.
Cross-multiplying gives $$yx^2 - x + y = 0$$. For $$y \ne 0$$ a real $$x$$ needs $$1 - 4y^2 \ge 0$$, that is $$|y| \le \frac{1}{2}$$. The range is $$\left[-\frac{1}{2}, \frac{1}{2}\right]$$, so the function is into.
A graphical shortcut helps in objective questions. Draw the graph and sweep horizontal lines $$y = c$$ through the codomain. If even one such line misses the curve entirely, the function is into; if every line cuts the curve at least once, it is onto. Many-one behaviour corresponds to lines cutting the curve more than once, which is a separate question from onto-ness.
Counting Onto and Into Functions on Finite Sets
When $$n(A) = m$$ and $$n(B) = n$$, the total number of functions from $$A$$ to $$B$$ is $$n^m$$, because each of the $$m$$ elements of the domain independently picks one of $$n$$ images. Splitting this total into onto and into counts is a standard inclusion-exclusion application.
Number of onto functions from $$A$$ to $$B$$:
$$N_{\text{onto}} = \sum_{r=0}^{n} (-1)^r \binom{n}{r} (n-r)^m, \qquad m \ge n$$
Number of into functions:
$$N_{\text{into}} = n^m - N_{\text{onto}}$$
Worked case. Let $$m = 5$$ and $$n = 3$$. Then
$$N_{\text{onto}} = 3^5 - \binom{3}{1}2^5 + \binom{3}{2}1^5 = 243 - 96 + 3 = 150$$
Total functions $$= 3^5 = 243$$, so $$N_{\text{into}} = 243 - 150 = 93$$.
Small case you should know by heart. From a set of $$3$$ elements to a set of $$2$$ elements there are $$2^3 = 8$$ functions. The two constant functions are into, so $$8 - 2 = 6$$ are onto, matching the formula $$2^3 - 2 = 6$$.
Three structural facts follow, and they answer most objective questions without any computation:
- If $$m \lt n$$, no onto function exists, so all $$n^m$$ functions are into.
- If $$m = n$$ and both sets are finite, a function is onto if and only if it is one-one, and the number of such functions is $$n!$$.
- If $$m \gt n$$, every onto function must be many-one, since some image is shared by at least two domain elements.
Keeping the surjection count next to your permutation and combination identities in the JEE Formula Sheets saves you from re-deriving the inclusion-exclusion expansion under time pressure.
Similarities Between Onto and Into Functions
Before the exam, be clear about what the two classifications share, so that you do not over-read a question.
- Both are genuine functions: every element of the domain has exactly one image.
- Both classifications are made with respect to the codomain, never with respect to the domain.
- Either type can be one-one or many-one; injectivity is an independent property.
- Both require the domain and codomain to be stated explicitly before the label makes sense.
- Restricting the codomain to the range turns any function into an onto function, so the two types are separated only by how the codomain is declared.
- Both appear in composition results: if $$g \circ f$$ is onto then $$g$$ must be onto, but $$f$$ may well be into.
JEE Exam Perspective
Relations and Functions is a compact, high-return chapter, and onto versus into questions appear in a few recurring formats.
- Classify the given function. A rule with a specified domain and codomain, asking whether it is one-one, onto, both or neither. The work is almost always a range calculation.
- Counting problems. The number of onto functions between finite sets, often combined with conditions such as "exactly two elements have the same image".
- Find the codomain or parameter. Determine the set of values of a constant for which a given function becomes onto.
- Invertibility. Since an inverse exists only for a bijection, showing the function is onto is half of the proof in such problems.
Three errors cost marks repeatedly. The first is treating the range as the codomain and declaring every function onto. The second is assuming that one-one forces onto, which fails for infinite sets as the doubling map on integers shows. The third is forgetting the restriction $$m \ge n$$ before applying the surjection formula, which then returns a meaningless value.
Working through the function-based problems in JEE Mains Previous Papers shows how often the examiner quietly rewrites the codomain so that an otherwise into function turns onto. In Advanced-level problems this idea is usually layered with inverse trigonometric ranges, composition or functional equations, so practise those separately once the basics are automatic.
JEE Onto Functions vs Into Functions: Conclusion
Understanding the difference between onto and into functions is essential for solving Relations and Functions questions in JEE Main and Advanced Maths. An onto function has a range equal to its codomain, while an into function has a range that is a proper subset of the codomain. The classification depends on the stated domain, codomain, and function rule.
To solve these questions confidently, practise finding the range, checking whether every codomain element has a pre-image, and applying inclusion-exclusion formulas for counting onto functions between finite sets. Remember that a one-one function is not necessarily onto, particularly when dealing with infinite sets. With regular practice and a clear understanding of these concepts, you can improve your accuracy and approach JEE function-based questions with greater confidence.
Group
Group

