

How to Identify Onto and Into Functions with Examples
In mathematics, understanding the Difference Between Onto And Into Functions is essential for analyzing how sets map to each other using functions. Comparing onto and into functions helps students grasp concepts of mapping, range, and codomainโkey topics for algebra, set theory, and competitive exams like JEE.
Meaning of Onto Function in Mathematics
An onto function, also called a surjective function, maps every element from the codomain to at least one element in the domain. No element in the codomain is left unmapped by the function.
For a function $f: A \rightarrow B$ to be onto, every $b \in B$ must have some $a \in A$ such that $f(a) = b$. The range and codomain of an onto function are equal.
$f : A \rightarrow B$ is onto $\iff$ $\text{range}(f) = \text{codomain}(B)$
Onto functions form the foundation for many advanced concepts such as Difference Between Injective And Surjective Functions in class 12 mathematics.
Understanding Into Functions
An into function is a mapping from one set to another where at least one element in the codomain has no pre-image in the domain. The range of an into function is only a subset of its codomain.
If $f: A \rightarrow B$ is an into function, there exists at least one $b \in B$ for which no $a \in A$ satisfies $f(a) = b$. Hence, not all elements in the codomain are mapped.
For more about these types and their properties, refer to the topic Functions And Its Types.
Comparative View of Onto and Into Functions
| Onto Function | Into Function |
|---|---|
| Every element in codomain has at least one pre-image | At least one element in codomain has no pre-image |
| Range equals codomain | Range is a proper subset of codomain |
| No element in codomain is left unmapped | Some elements in codomain are unmapped |
| Denoted as โsurjectiveโ function | Not surjective |
| Every output value is achievable | Some output values can never be achieved |
| Possible for multiple inputs to share an output | Possible for multiple inputs to share an output |
| All elements in codomain are used | Not all elements in codomain are used |
| Minimum requirement: range covers codomain | Minimum requirement: function defined for domain only |
| Number of such functions can be counted using combinatorics | Number equals total functions minus onto functions |
| If $A$ has $m$ elements, $B$ has $n$, number of onto functions given by: $\sum_{r=1}^{n} (-1)^{n-r} {n \choose r} r^{m}$ | If $n \geq m$, number of into functions is $n^m$ minus number of onto functions |
| Used for surjective mapping problems | Used for analyzing incomplete mappings |
| Example: $f(x) = x + 1$ from $\mathbb{R}$ to $\mathbb{R}$ | Example: $f(x) = x^2$ from $\mathbb{R}$ to $\mathbb{R}$ |
| Arrow diagram: Arrows cover every codomain element | Arrow diagram: Arrows miss some codomain elements |
| No codomain element is isolated | At least one codomain element is isolated |
| Codomain and range coincide | Range is subset, never equal to codomain |
| Applicable for surjective function analysis | Applicable when mapping is not surjective |
| Directly related to surjective property in Properties Of Relation And Function | Describes non-surjective functions in function types |
| No โunusedโ codomain elements | Has โunusedโ codomain elements |
| Surjective mapping guarantees coverage | Mapping with incomplete codomain coverage |
| Relevant to set and relation cardinality | Relevant for partial mapping analysis |
Core Distinctions in Exam Context
- Onto functions map every codomain element to at least one domain element
- Into functions leave at least one codomain element unmapped
- Range equals codomain only for onto functions
- Arrow diagrams for onto functions use all codomain points
- Into functions show codomain points with no incoming arrows
- Counting formulas differ for both types in combinatorics
Simple Numerical Examples
Example 1: Let $A = \{1, 2\}$ and $B = \{a, b\}$. Define $f$ by $f(1) = a$, $f(2) = b$. Each element of $B$ has a pre-image, so $f$ is onto.
Example 2: Let $A = \{1, 2, 3\}$ and $B = \{a, b\}$. Define $f(1) = a$, $f(2) = a$, $f(3) = b$. Both $a$ and $b$ have pre-images, so again, $f$ is onto.
Example 3: Let $A = \{1, 2, 3\}$ and $B = \{x, y, z\}$. Define $f(1) = x$, $f(2) = y$, $f(3) = y$. Here, $z$ has no pre-image, so $f$ is into.
Uses in Algebra and Geometry
- Establishing bijections for mathematical proofs
- Counting mappings in combinatorics
- Defining invertible functions and bijections
- Classifying algebraic structures like groups and rings
- Studying relations in Sets, Relations And Functions
- Applications in logic, coding theory, and cryptography
Concise Comparison
In simple words, an onto function maps every codomain element to the domain, whereas an into function leaves at least one codomain element unmapped.
FAQs on What Is the Difference Between Onto and Into Functions?
1. What is the difference between onto and into functions?
Onto and into functions differ in their mapping of elements from domain to codomain.
- Onto function (Surjective): Every element in the codomain has at least one pre-image in the domain.
- Into function: At least one element in the codomain does not have a pre-image in the domain.
2. How do you determine if a function is onto?
A function is onto if every element of the codomain is mapped by at least one element of the domain. To check:
- For each element y in the codomain, find at least one x in the domain such that f(x) = y.
- If such an x exists for every y, the function is onto; otherwise, it is into.
3. What is an example of an onto function?
An onto function covers all elements of its codomain.
- For example, f: R โ R defined by f(x) = x is onto because every real number y has a pre-image x = y in the domain.
4. What is an into function? Give an example.
An into function is a function where not every codomain element has a pre-image from the domain.
- Example: f: R โ R defined by f(x) = x2 is into because negative numbers in R have no pre-image (no real number squares to a negative).
5. Can a function be both into and onto?
No, a function cannot be both onto and into for the same domain and codomain.
- A function is classified as either onto (surjective) or into based on whether every codomain element has a pre-image.
6. What is the difference between onto and one-to-one functions?
Onto (surjective) means every codomain element is covered, while one-to-one (injective) means every domain element maps to a unique codomain element.
- Onto: every codomain value has a pre-image.
- One-to-one: no two domain elements have the same image.
7. How do you identify an into function from a given mapping diagram?
In a mapping diagram, a function is into if at least one codomain element is not connected by any arrow from the domain.
- Check for any element in the codomain with no incoming arrow.
8. Are all one-to-one functions also onto?
No, not all one-to-one (injective) functions are onto (surjective).
- A function may assign unique codomain values to each domain element without covering the entire codomain.
9. What are the key points to remember about onto and into functions?
Important points for onto and into functions:
- Onto means all codomain values are images of domain values.
- Into means at least one codomain value is not an image of any domain value.
- The classification depends on both the rule of the function and its defined domain and codomain.
10. Why are onto and into functions important in mathematics?
Onto and into functions help in understanding how sets relate via mappings.
- They are essential for concepts like bijective functions, inverse functions, and function composition.
- Identifying them aids solving problems in algebra and set theory.





















