What Is an Into Function?
An into function is a function in which at least one element of the codomain has no pre-image in the domain — that is, at least one allowed output value is never actually produced. Its range is a proper subset of its codomain.
In symbols, for $f: A \to B$, the function is into when there exists some $b \in B$ such that no $a \in A$ satisfies $f(a) = b$. Equivalently, $\text{range}(f) \subsetneq B$.
Symbol | Meaning |
|---|---|
$f: A \to B$ | a function from domain $A$ to codomain $B$ |
$A$ | the domain (inputs) |
$B$ | the codomain (declared possible outputs) |
$\text{range}(f)$ | the outputs actually reached |
$\subsetneq$ | "is a proper subset of" (smaller, not equal) |
Note that "into" describes the relationship between range and codomain — it is a property of how the function is declared, not a flaw. Every function is either into or onto, never both at once.
Into Function vs Onto Function — What Is the Difference?
This is the question readers ask most, so here it is directly. An onto function (also called surjective) reaches every element of its codomain — its range equals its codomain. An into function misses at least one.
Feature | Into function | Onto function (surjective) |
|---|---|---|
Codomain coverage | at least one element unreached | every element reached |
Range vs codomain | range $\subsetneq$ codomain | range $=$ codomain |
Arrow diagram | some target has no incoming arrow | every target has an incoming arrow |
For the full treatment of the opposite case, see surjective function. The two terms partition all functions: if a function is not onto, it is into.
How Do You Tell If a Function Is Into?
For a finite mapping, check the arrow diagram — if any codomain element has no incoming arrow, the function is into. For a real-valued function, compare the range against the stated codomain.
A common reader question — "is $f(x) = x^2$ from $\mathbb{R}$ to $\mathbb{R}$ into or onto?" — resolves quickly: the outputs are never negative, so the range is $[0, \infty)$, which is smaller than the codomain $\mathbb{R}$. Negative numbers in the codomain have no pre-image, so the function is into.
The codomain matters as much as the rule. The same squaring rule declared as $f: \mathbb{R} \to [0, \infty)$ becomes onto, because now every codomain value is reached. Changing the codomain can flip the answer — which is why "into" is never about the formula alone.
Examples of Into Function
Six examples, from finite arrow diagrams to real-valued functions and a graph test.
Example 1
Let $A = {1, 2, 3}$ and $B = {x, y, z}$ with $f(1) = x$, $f(2) = y$, $f(3) = y$. Is $f$ into?
The range is ${x, y}$. The codomain is ${x, y, z}$.
Element $z$ has no pre-image.
Final answer: yes, $f$ is into ($z$ is never reached).
Example 2
A student says $f: \mathbb{R} \to \mathbb{R}$, $f(x) = x^2$ is onto "because every real number squared is somewhere on the graph." Is that right?
Wrong attempt. The student sees the parabola filling the plane and reasons that all the codomain is covered.
Why it breaks. Pick a codomain value: is there any real $x$ with $x^2 = -4$? No — squares are never negative. So $-4$ is in the codomain $\mathbb{R}$ but has no pre-image. The codomain is not fully covered.
Correct. The range of $f(x) = x^2$ is $[0, \infty)$, which is a proper subset of $\mathbb{R}$. So $f$ is into, not onto.
Final answer: $f(x) = x^2$ over $\mathbb{R}$ is into — every negative codomain value is missed.
Example 3
Is $f: \mathbb{R} \to \mathbb{R}$, $f(x) = 2x + 1$, into or onto?
Solve $2x + 1 = y$ for $x$: $x = \dfrac{y - 1}{2}$.
Every real $y$ produces a valid real $x$, so every codomain value is reached.
Final answer: onto, not into — the range equals $\mathbb{R}$.
Example 4
Let $A = {1, 2, 3, 4}$ and $B = {5, 10, 15}$ with $f(1) = 5$, $f(2) = 5$, $f(3) = 10$, $f(4) = 10$. Is $f$ into?
Range $= {5, 10}$; codomain $= {5, 10, 15}$.
Element $15$ has no pre-image.
Final answer: yes, $f$ is into ($15$ is unmapped).
Example 5
Is $f: \mathbb{R} \to \mathbb{R}$, $f(x) = e^x$, into or onto?
The exponential function only ever outputs positive numbers, so its range is $(0, \infty)$.
The codomain $\mathbb{R}$ includes $0$ and all negatives, which are never reached.
Final answer: into — no input gives $e^x \leq 0$.
Example 6
The temperature controller for a freezer can be set to any value the dial allows ($-30°$C to $30°$C), but in practice it only ever outputs settings between $-30°$C and $-15°$C. Treating the dial range as the codomain, is the controller's output an into function?
Codomain $= [-30, 30]$; range $= [-30, -15]$.
Most of the codomain (everything above $-15°$C) is never produced.
Final answer: into — the achievable output is a proper subset of the dial's full range.
Where the Into Idea Earns Its Keep
"Declaring more outputs than you ever use is normal — and worth tracking."
The into/onto distinction exists because the target of a function and the values it actually produces are two different things, and the gap between them carries real information.
Coverage testing. In software and engineering, asking "does this process ever produce every allowed output?" is exactly the onto question — and finding it is into tells you which outputs are dead.
Function classification. Sorting functions into injective, surjective, and bijective starts with the into/onto split. A bijection (the gold standard for invertibility) must be onto, so "is it into?" is the first filter.
Range analysis. Knowing $f(x) = x^2$ is into over $\mathbb{R}$ is the same insight that tells you the zeros of a function live only where the range allows.
The destination is the full classification — one-to-one, onto, and bijective functions — where "into vs onto" is the very first question you learn to ask of any mapping.
Common Errors With Into Functions
Mistake 1: Judging into/onto from the rule alone, ignoring the codomain
Where it slips in: Any real-valued function where the codomain is stated separately, as in Examples 2 and 5.
Don't do this: Decide a function is onto just because its graph "fills the plane."
The correct way: Compare the range against the declared codomain. The same rule can be into or onto depending only on which codomain was chosen.
The first instinct is to look at the formula and forget the codomain was declared at all. The case of $f(x) = x^2$ being into over $\mathbb{R}$ but onto over $[0, \infty)$ is exactly where ignoring the codomain goes wrong.
Mistake 2: Confusing "into" with "not a function"
Where it slips in: Reading an arrow diagram with an unmapped codomain element.
Don't do this: Conclude that an empty target makes the mapping invalid.
The correct way: A function only requires each input to map to exactly one output. An unused codomain element is fine — that is the definition of into, not a violation. The memorizer who learned "every element must be used" applies the rule to the wrong set.
Mistake 3: Treating into and one-to-one as the same thing
Where it slips in: Mixing the codomain-coverage idea with the input-uniqueness idea.
Don't do this: Call a function into because two inputs share an output.
The correct way: "Into" is about the codomain not being fully covered. "One-to-one" is about no two inputs sharing an output. They are independent — a function can be into and one-to-one, into and not one-to-one, and so on.
Practice Questions
Try these, then check the answers below.
Is $f: \mathbb{R} \to \mathbb{R}$, $f(x) = x^3$, into or onto?
Classify the mapping $A = {1, 2} \to B = {p, q, r}$ with $f(1) = p$, $f(2) = q$.
Explain why $f(x) = |x|$ over $\mathbb{R}$ is into.
Is $f: \mathbb{R} \to [0, \infty)$, $f(x) = x^2$, into or onto?
Give the range and state whether $f: \mathbb{R} \to \mathbb{R}$, $f(x) = \cos x$, is into.
Answers
Answer to Question 1: Onto. Every real number has a real cube root, so the range equals $\mathbb{R}$ — no codomain value is missed.
Answer to Question 2: Into. The range is ${p, q}$, so $r$ has no pre-image.
Answer to Question 3: The absolute value never returns a negative number, so the range is $[0, \infty)$, a proper subset of $\mathbb{R}$, and every negative codomain value is unreached.
Answer to Question 4: Onto. Shrinking the codomain to $[0, \infty)$ makes every codomain value reachable, so the same squaring rule is now onto.
Answer to Question 5: Range $= [-1, 1]$. Yes, it is into — everything in $\mathbb{R}$ outside $[-1, 1]$ has no pre-image.
Conclusion
An into function leaves at least one codomain element with no pre-image, so its range is a proper subset of its codomain.
It is the exact opposite of an onto (surjective) function, which reaches every codomain element.
Whether a function is into depends on the codomain, not the rule alone: $f(x) = x^2$ is into over $\mathbb{R}$ but onto over $[0, \infty)$.
An unused codomain element is allowed; it does not make the mapping invalid.
Into and one-to-one are independent properties — one is about codomain coverage, the other about input uniqueness.
Try These Three
Work through the practice questions above to solidify your understanding. If you get stuck, return to the codomain comparison in Example 2 before deciding. At Bhanzu, trainers make students name the codomain out loud before classifying any function, so the into/onto call is never made from the formula alone. Want a live Bhanzu trainer to walk through more into function problems? Book a free demo class.
Was this article helpful?
Your feedback helps us write better content