# Into Function — Definition, Graph, and Examples (Into vs Onto)

TL;DR

An into function is one where at least one element of the codomain is never reached — its range is a strict subset of its codomain. This article defines the into function, contrasts it cleanly with an onto (surjective) function, shows how to read it off arrow diagrams and graphs, and works through six examples — including why f(x)=x² over the reals is "into."

## 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→B, the function is into when there exists some b∈B such that no a∈A satisfies f(a)=b. Equivalently, range(f)⊊B.

| Symbol                     | Meaning                                                                    |
|---------------------------|----------------------------------------------------------------------------|
| f:A→B                    | a function from domain A to codomain B                                     |
| A                         | the domain (inputs)                                                       |
| B                         | the codomain (declared possible outputs)                                   |
| range(f)                 | the outputs actually reached                                               |
| ⊊                         | "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 ⊊ codomain                  | range === codomain                |
| Arrow diagram             | some target has no incoming arrow  | every target has an incoming arrow |

## 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² from R to R into or onto?"_ — resolves quickly: the outputs are never negative, so the range is [0,∞), which is smaller than the codomain 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:R→[0,∞) 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:R→R, f(x)=x² 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²=−4? No — squares are never negative. So −4 is in the codomain R but has no pre-image. The codomain is not fully covered.

_Correct._ The range of f(x)=x² is [0,∞), which is a proper subset of R. So f is **into**, not onto.

**Final answer:** f(x)=x² over R is into — every negative codomain value is missed.

### Example 3

**Is f:R→R, f(x)=2x+1 into or onto?**

Solve 2x+1=y for x: x=(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 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:R→R, f(x)=e^x into or onto?**

The exponential function only ever outputs positive numbers, so its range is (0,∞).

The codomain R includes 0 and all negatives, which are never reached.

**Final answer:** into — no input gives e^x ≤ 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. 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² is into over R is the same insight that tells you the zeros of a function live only where the range allows.

## 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.

### 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.

### 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.

1. Is f:R→R, f(x)=x³, into or onto?
2. Classify the mapping A={1,2}→B={p,q,r} with f(1)=p, f(2)=q.
3. Explain why f(x)=|x| over R is into.
4. Is f:R→[0,∞), f(x)=x², into or onto?
5. Give the range and state whether f:R→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 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,∞), a proper subset of R, and every negative codomain value is unreached.

**Answer to Question 4:** Onto. Shrinking the codomain to [0,∞) 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 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² is into over R but onto over [0,∞).

- 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.
