Blog

One-One, Onto, Into and Many-One Functions Made Simple

Classify functions using two quick checks, with mapping tables, domain and codomain changes, algebraic proofs, solved examples and practice answers.

  • 12th
  • Study Advice
Copper threads connect porcelain seeds to destination bowls, with shared destinations and empty bowls.

You look at a mapping and feel sure it is one-one. Then the question asks whether it is onto, and suddenly the same arrows seem confusing.

The trouble usually comes from treating all four names as competing labels. They answer two separate questions. A function can be one-one and onto, or many-one and onto. Being one-one does not settle the onto question.

Think of students being assigned lockers. Does anyone share a locker? Is every available locker used? You can answer either question without knowing the answer to the other.

That is the whole idea we will build on. Once you can spot shared outputs and unused destinations, the terminology becomes much easier to manage.

The two checks that classify a function

For a function f: A -> B:

CheckWhat you are looking forConclusion
Do different inputs ever share an output?At least one repeated outputMany-one
Are all outputs different for different inputs?No repeated outputOne-one
Does every element of B receive an input?No unused codomain elementOnto
Is at least one element of B never reached?An unused codomain elementInto, meaning not onto

Here, one-one is also called injective, onto is also called surjective, and a function that is both is called bijective. These definitions agree with the NCERT chapter on relations and functions.

We use into in the school classification sense of not onto. In broader mathematical writing, the phrase “a function into B” can simply describe the codomain, so read the context.

Before classifying, check that it is a function

A function from A to B must assign exactly one element of B to every element of A.

Imagine A = {p, q, r} and B = {4, 7, 9}.

  • p -> 4, q -> 7, r -> 9 is a function.
  • p -> 4, q -> 4, r -> 9 is also a function. Sharing is allowed.
  • If p is assigned both 4 and 7, it is not a function.
  • If r has no assignment, the mapping is not a function on the stated domain A.
  • If q is assigned 12, the mapping is not a function from A to this B, because 12 is outside B.

The phrase “exactly one” belongs to each input, not to each output. An output may have no preimage, one preimage, or several preimages.

A preimage of y is an input x for which f(x) = y. If f(2) = 5 and f(8) = 5, then 2 and 8 are both preimages of 5.

This gives another useful reading of the two tests: one-one means each codomain value has at most one preimage; onto means each codomain value has at least one preimage. Bijective means each has exactly one.

Domain, codomain and range: keep three different lists

Suppose a small shop assigns each order to a delivery slot.

  • The domain is the set of orders being assigned.
  • The codomain is the full set of slots offered as destinations.
  • The range is the set of slots actually assigned to at least one order.

Take A = {a, b, c} and B = {morning, afternoon, evening, night}. Assign a to morning, b to afternoon and c to evening.

The range is {morning, afternoon, evening}. The codomain also contains night.

The mapping is one-one because the orders have different slots. It is into because night is unused.

Now change only the codomain to {morning, afternoon, evening}. The assignments have not moved, but the new function is onto. Every destination in the new codomain is reached.

If identifying allowed inputs is the part you find difficult, revise the guide to finding the domain of a function first.

All four combinations in one table

Use the same domain A = {p, q, r} throughout. The output triple below lists f(p), f(q), f(r), in that order.

Codomain BOutput tripleType
{2, 5, 8}(2, 5, 8)One-one onto
{2, 5, 8, 11}(2, 5, 8)One-one into
{2, 5}(2, 2, 5)Many-one onto
{2, 5, 8}(2, 2, 5)Many-one into

Notice the third row. Two inputs share 2, yet both elements of B are reached. So many-one does not mean into.

Notice the second row too. No inputs share anything, yet 11 remains unused. So one-one does not mean onto.

For a finite mapping question, writing the output list and then comparing its distinct values with B is often faster than redrawing every arrow.

How to prove one-one algebraically

For an infinite domain, checking five or ten inputs is not enough. A repeat could occur elsewhere.

Start with two arbitrary inputs u and v in the domain and assume:

f(u) = f(v)

Then simplify. If this forces u = v, the function is one-one.

Example 1: a linear function on the real numbers

Let f: R -> R be defined by f(x) = 5x - 7. Here R means all real numbers.

Assume f(u) = f(v).

5u - 7 = 5v - 7

5u = 5v

u = v

Therefore f is one-one.

To check onto, choose any real y and solve y = 5x - 7:

x = (y + 7)/5

This x is a real number for every real y, and substituting it gives f(x) = y. Therefore f is onto as well.

Final classification: one-one onto, or bijective.

The onto proof needs both the expression for x and the statement that x belongs to the domain. That second part becomes especially important with integers or restricted intervals.

Example 2: almost the same formula, a different answer

Let g: Z -> Z be g(x) = 5x - 7, where Z means all integers.

The one-one proof remains valid. Equality of outputs still forces equality of inputs.

But consider the integer 0 in the codomain. Reaching it would require:

5x - 7 = 0, so x = 7/5.

That is not an integer. Therefore 0 has no preimage in the domain.

Final classification: one-one into.

The real-number version and integer version use the same expression, but they are different functions because their specified sets differ.

How to disprove one-one or onto quickly

A positive claim needs a general argument. A negative claim needs just one decisive counterexample.

To disprove one-one: find two distinct allowed inputs with equal outputs.

To disprove onto: find one element of the codomain with no allowed preimage.

For h: R -> R, h(x) = (x - 2)^2 + 3:

  • h(1) = 4 and h(3) = 4. Different inputs share an output, so h is many-one.
  • Every output is at least 3. The codomain value 0 is never reached, so h is into.

Thus h is many-one into.

You do not need to find every repeated pair or every missing output. One valid example of each is sufficient.

One quadratic, four classifications

The function rule h(x) = (x - 2)^2 + 3 is a useful revision tool because changing its sets produces all four possibilities.

DomainCodomainType
RRMany-one into
R[3, infinity)Many-one onto
[2, infinity)ROne-one into
[2, infinity)[3, infinity)One-one onto

The interval [3, infinity) means all real numbers greater than or equal to 3. The square bracket includes the endpoint.

Here is why the changes work.

Restrict the codomain to the actual outputs

With domain R, the outputs are exactly the numbers at least 3. For any y >= 3, the input

x = 2 + sqrt(y - 3)

is real and gives h(x) = y. So the function is onto [3, infinity).

However, h(1) = h(3) still holds. Reducing the codomain has not removed the repeated inputs. It remains many-one.

Restrict the domain to one side of the turning point

On [2, infinity), both u - 2 and v - 2 are nonnegative. If

(u - 2)^2 = (v - 2)^2,

we can take the nonnegative square roots to get u - 2 = v - 2, hence u = v.

This restriction removes the paired inputs on opposite sides of 2. The function becomes one-one.

Its range is still [3, infinity). Therefore it is onto that interval, but into R.

Check endpoints carefully

If the domain is changed to (2, infinity), the input 2 disappears. The output 3 disappears too.

So h: (2, infinity) -> [3, infinity) is one-one into, whereas h: (2, infinity) -> (3, infinity) is one-one onto.

One bracket can change the answer. Always test whether the boundary output is actually attained.

A rational function: check excluded values on both sides

Let f: R excluding {3} -> R excluding {2} be defined by:

f(x) = (2x + 1)/(x - 3)

The domain excludes 3 because the denominator would be zero. First check that the rule never produces the excluded codomain value 2:

(2x + 1)/(x - 3) = 2 would give 2x + 1 = 2x - 6, which is impossible.

So every allowed input produces an allowed output.

One-one check

Assume f(u) = f(v). Cross-multiplication is valid because neither input is 3:

(2u + 1)(v - 3) = (2v + 1)(u - 3)

2uv - 6u + v - 3 = 2uv - 6v + u - 3

7v = 7u, so u = v.

The function is one-one.

Onto check

For any y other than 2, solve:

y(x - 3) = 2x + 1

x(y - 2) = 3y + 1

x = (3y + 1)/(y - 2)

This is defined since y is not 2. Could this x equal the forbidden input 3? That would require 3y + 1 = 3y - 6, an impossibility.

Thus every y in the codomain has an allowed preimage, and substitution recovers y.

Final classification: one-one onto.

If the codomain were R instead, the same rule on the same domain would be one-one into because it still misses 2.

What graphs can tell you

For a real-valued function of a real variable, the horizontal line test checks one-one status. If any horizontal line intersects the graph at two or more points, different inputs share an output. If every horizontal line has at most one intersection, the function is one-one. The OpenStax explanation of inverse functions illustrates this test and domain restriction.

Keep it separate from the vertical line test. A vertical line meeting a plotted relation twice means one input has two outputs, so the relation does not define y as a function of x.

For onto status, check horizontal levels belonging to the stated codomain. Every such level must be reached somewhere. Levels outside the codomain do not matter.

For example, our shifted quadratic reaches every level y >= 3, but it never reaches y = 0. Whether that missing level matters depends on whether 0 belongs to the codomain.

A small viewing window can hide intersections or outputs. Use a graph to understand the pattern, then support the conclusion with the formula and domain.

Finite sets: when counting helps

Suppose A and B are nonempty finite sets, with m and n elements respectively.

  • If m > n, a function A -> B cannot be one-one. More inputs than destinations force some sharing.
  • If m < n, it cannot be onto. Each input supplies only one output, so there are not enough inputs to reach every destination.
  • If m = n, a function is one-one if and only if it is onto.

The last point is a shortcut, not a claim that every function between equal-sized sets is bijective. A function that sends all three inputs to one of three possible outputs is neither one-one nor onto.

Why does the shortcut work? With equal finite counts, assigning each input a different destination uses every destination. Conversely, reaching every destination leaves no spare input for a repeated assignment.

Do not transfer that equal-size shortcut to infinite sets. With N = {1, 2, 3, …}, the function f: N -> N defined by f(n) = n + 3 is one-one but misses 1, 2 and 3.

Three mistakes that lose easy marks

“I found an expression for x, so it is onto”

The expression must give an allowed input for every y in the codomain. For g: Z -> Z, g(x) = 5x - 7, the expression (y + 7)/5 often fails to be an integer.

“Equal squares mean equal inputs”

From u^2 = v^2, you get u = v or u = -v. You may discard the second possibility only when the domain restriction justifies doing so. Squaring on all real numbers is many-one; squaring on nonnegative real numbers is one-one.

“A constant function is always many-one”

It is many-one if its domain contains at least two elements. On a singleton domain, there are no distinct inputs that could share an output, so it is one-one.

For f: {a, b} -> {6}, with f(a) = f(b) = 6, the function is many-one onto. For f: {a} -> {6}, it is bijective. For f: {a} -> {6, 9}, with f(a) = 6, it is one-one into.

A short answer-writing routine

Use this order when the question asks for a complete classification:

  1. Write the given domain, codomain and rule.
  2. Check that the rule defines a function between those sets.
  3. Prove one-one using f(u) = f(v), or give a repeated-output pair.
  4. Prove onto using an arbitrary codomain value, or give a missing value.
  5. State both parts of the classification together.

For finite sets, a complete output table can replace the algebra. For an infinite domain, a handful of trial values cannot prove a universal claim.

Once you are comfortable with bijections, the next natural topic is when an inverse function exists. A two-sided inverse on the entire stated codomain needs every output to have exactly one preimage.

Try these eight questions

Classify each function as one-one or many-one, and onto or into. In these questions, N starts at 1.

  1. A = {a, b, c}, B = {1, 4, 7, 10}, with outputs (7, 1, 4).
  2. A = {a, b, c, d}, B = {2, 6, 8}, with outputs (2, 6, 6, 8).
  3. f: R -> R, f(x) = -4x + 9.
  4. f: Z -> Z, f(x) = 4x + 9.
  5. f: R -> [5, infinity), f(x) = (x + 1)^2 + 5.
  6. f: [-1, infinity) -> [5, infinity), f(x) = (x + 1)^2 + 5.
  7. f: N -> N, f(n) = n + 4.
  8. f: R -> R, f(x) = x^3 + 2.

Answers with the reason you should show

1. One-one into. All three outputs differ, but 10 is unused.

2. Many-one onto. The second and third inputs share 6, and every member of B appears in the output list.

3. One-one onto. Equal outputs force equal inputs. For any real y, x = (9 - y)/4 is a real preimage.

4. One-one into. The equality proof works, but y = 0 would require x = -9/4, which is not an integer.

5. Many-one onto. Inputs -2 and 0 both give 6. For any y >= 5, the real input -1 + sqrt(y - 5) gives y.

6. One-one onto. On the stated domain, x + 1 is nonnegative, so equal squared expressions force equal inputs. The same preimage formula is always at least -1.

7. One-one into. Different natural numbers give different outputs, but 1, 2, 3 and 4 are missed.

8. One-one onto. Equal cubes imply equal real inputs. For every real y, the real cube root of y - 2 supplies a preimage, including when y - 2 is negative.

Frequently asked questions

What is the difference between one-one and onto?

One-one asks whether different inputs have different outputs. Onto asks whether every element of the codomain is reached. They are independent checks.

Can a many-one function be onto?

Yes. Repeated outputs do not prevent complete coverage of the codomain. The output list (2, 2, 5) reaches every element of the codomain {2, 5}.

Can a one-one function be into?

Yes. A function may have no repeated outputs while leaving some codomain values unused. The function n -> n + 3 from positive natural numbers to positive natural numbers is one example.

Does changing only the codomain affect one-one status?

No, provided the new codomain still contains every actual output. The input-output assignments and their repetitions stay the same. Onto status can change because it compares the range with the codomain.

Does restricting the domain always make a function one-one?

No. It works only if the restriction removes all repeated-output pairs. For (x - 2)^2 + 3, restricting to x >= 2 works, but restricting to [1, 3] does not, since 1 and 3 still share an output.

Is every function onto its range?

Yes. If you declare the codomain to be exactly the range, every codomain element is reached by definition. That does not make the original function onto a larger codomain.

Is a many-one mapping still a function?

Yes. Several inputs may share one output. What is forbidden is a single input having more than one output, or having no output within the specified domain.

Can the formula alone tell me the classification?

Usually not. You also need the domain and codomain. A quadratic can fit all four classifications when these sets are chosen appropriately.

What is the quickest way to prove a function is not onto?

Choose one value in the stated codomain and show that no allowed input produces it. Make sure your chosen value actually belongs to the codomain.

Why does a bijective function have an inverse?

Onto ensures that every element of the codomain has an original input. One-one ensures that this input is unique. Reversing the assignments therefore gives a well-defined function from the whole codomain back to the domain.

Looking for commerce tuitions?

Prachi is a gold-medalist commerce teacher with experience at Deloitte and KPMG. She focuses on fundamentals to build a strong foundation.

Start classes